didppy.BoolTable2D

class didppy.BoolTable2D

2-dimensional table of bool constants.

t[x, y] returns a condition referring to an item where t is BoolTable2D and x and y are 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], [False, True]])
>>> table[0, var].eval(model.target_state, model)
False

Methods