You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- (#189) - Correct an issue with how arrays with constraints on sum are
grouped into rand sets.
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
Thanks, the testcase is very helpful. After investigating, it seems that constraints involving array sum were not being properly grouped for solving. Specifically, the sum constraint wasn't causing all array elements to be solved together. The 0.8.5 release contains a fix that allows this testcase to pass.
Hi
As #188 said, I tried random sized list:
` def test_group_size(self):
@vsc.randobj
class ThreadGroupConstraintItem():
def init(self, aThreadNum, aSharePercent):
self.mThreadNum = aThreadNum
self.mSharePercent = aSharePercent
`
The output is not as expected: mThreadNum is 8, but GroupList.sum != mThreadNum:
test_randsz_array.py size: 16
.Iter %d 0
Thread_num: 8, GroupList.sum: 17
GroupList[0]: 1
GroupListScore[0]: 0
GroupList[1]: 5
GroupListScore[1]: 1
GroupList[2]: 8
GroupListScore[2]: 1
GroupList[3]: 1
GroupListScore[3]: 0
GroupList[4]: 2
GroupListScore[4]: 1
Iter %d 1
Thread_num: 8, GroupList.sum: 1
GroupList[0]: 1
GroupListScore[0]: 0
Iter %d 2
Thread_num: 8, GroupList.sum: 8
GroupList[0]: 8
GroupListScore[0]: 1
Iter %d 3
Thread_num: 8, GroupList.sum: 11
GroupList[0]: 8
GroupListScore[0]: 1
GroupList[1]: 3
GroupListScore[1]: 1
Iter %d 4
Thread_num: 8, GroupList.sum: 1
GroupList[0]: 1
GroupListScore[0]: 0
Iter %d 5
Thread_num: 8, GroupList.sum: 30
GroupList[0]: 8
GroupListScore[0]: 1
GroupList[1]: 8
GroupListScore[1]: 1
GroupList[2]: 1
GroupListScore[2]: 0
GroupList[3]: 6
GroupListScore[3]: 1
GroupList[4]: 3
GroupListScore[4]: 1
GroupList[5]: 4
GroupListScore[5]: 1
Iter %d 6
Thread_num: 8, GroupList.sum: 1
GroupList[0]: 1
GroupListScore[0]: 0
Iter %d 7
Thread_num: 8, GroupList.sum: 26
GroupList[0]: 8
GroupListScore[0]: 1
GroupList[1]: 2
GroupListScore[1]: 1
GroupList[2]: 4
GroupListScore[2]: 1
GroupList[3]: 6
GroupListScore[3]: 1
GroupList[4]: 6
GroupListScore[4]: 1
Iter %d 8
Thread_num: 8, GroupList.sum: 2
GroupList[0]: 2
GroupListScore[0]: 1
Iter %d 9
Thread_num: 8, GroupList.sum: 33
GroupList[0]: 8
GroupListScore[0]: 1
GroupList[1]: 3
GroupListScore[1]: 1
GroupList[2]: 1
GroupListScore[2]: 0
GroupList[3]: 8
GroupListScore[3]: 1
GroupList[4]: 8
GroupListScore[4]: 1
GroupList[5]: 5
GroupListScore[5]: 1
.Size: 4
.
The text was updated successfully, but these errors were encountered: