didppy.BoolTable1D

class didppy.BoolTable1D

1-dimensional table of bool constants.

t[x] returns a condition referring to an item where t is BoolTable1D and x is ElementExpr, ElementVar, ElementResourceVar, or int.

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([True, False])
>>> table[var].eval(model.target_state, model)
False

Methods