didppy.BoolTable

class didppy.BoolTable

Table of bool constants.

t[index] returns a condition referring to an item where t is BoolTable and index is a sequence of 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({(0, 0, 0, 0): False, (1, 1, 1, 1): True}, default=False)
>>> table[1, var, 1, 1].eval(model.target_state, model)
True

Methods