fix numeric issues
This commit is contained in:
parent
6ac8ddbaed
commit
201308b1dd
@ -315,7 +315,7 @@ def simulate_craw_and_calendar(thread, nSimulations):
|
||||
# print(cal.objVal)
|
||||
|
||||
# if cal.status!=2 or cal.objVal>-288:
|
||||
if cal.getProbStatus()!=6 or cal.getObjVal()>-288:
|
||||
if cal.getProbStatus()!=6 or cal.getObjVal()>-287.5:
|
||||
sol= [ (t1,t2) for (t1,t2) in sol if t1<t2]
|
||||
# sol= [ (t1,t2) for (t1,t2) in sol if t1[0]=="A" and t2[0]=="D" ]
|
||||
print ("No calendar for ", sol)
|
||||
@ -364,7 +364,8 @@ n = sys.maxsize
|
||||
pool = Pool()
|
||||
result = {}
|
||||
answer = {}
|
||||
threads = cpu_count()//2
|
||||
# threads = cpu_count()//2
|
||||
threads = 10
|
||||
|
||||
for cpu in range(threads):
|
||||
result[cpu] = pool.apply_async(simulate_craw_and_calendar, args=(f'thread_{cpu}', n,))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user