didppy.ElementTable1D

class didppy.ElementTable1D

1-dimensional table of element constants.

t[x] returns an element expression referring to an item where t is ElementTable1D 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_element_table([2, 3])
>>> table[var].eval(model.target_state, model)
3

Methods