didppy.BoolTable3D

class didppy.BoolTable3D

3-dimensional table of bool constants.

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

Methods