didppy.BoolTable
- class didppy.BoolTable
Table of bool constants.
t[index]
returns a condition referring to an item wheret
isBoolTable
andindex
is a sequence ofElementExpr
,ElementVar
,ElementResourceVar
, orint
.Examples
>>> import didppy as dp >>> model = dp.Model() >>> obj = model.add_object_type(number=2) >>> var = model.add_element_var(object_type=obj, target=1) >>> table = model.add_bool_table({(0, 0, 0, 0): False, (1, 1, 1, 1): True}, default=False) >>> table[1, var, 1, 1].eval(model.target_state, model) True
Methods