[fix] numeric conditions in place config
This commit is contained in:
@@ -88,11 +88,13 @@ class PlaceConfig(object):
|
|||||||
if k not in exc:
|
if k not in exc:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
res = op(exc[k], population)
|
res = op(population, exc[k])
|
||||||
if not res:
|
if not res:
|
||||||
support = 0
|
support = 0
|
||||||
break
|
break
|
||||||
|
|
||||||
|
support += 1
|
||||||
|
|
||||||
if support > 0:
|
if support > 0:
|
||||||
probability = exc.get('probability', 0.0)
|
probability = exc.get('probability', 0.0)
|
||||||
return random.random() < probability
|
return random.random() < probability
|
||||||
|
|||||||
Reference in New Issue
Block a user