didppy.State

class didppy.State

DyPDL state.

Values of state variables can be accessed by state[var], where state is State and var is either of ElementVar, ElementResourceVar, SetVar, IntVar, IntResourceVar, FloatVar, and FloatResourceVar.

Examples

>>> import didppy as dp
>>> model = dp.Model()
>>> var = model.add_int_var(target=4)
>>> state = model.target_state
>>> state[var]
4
>>> state[var] = 5
>>> state[var]
5

Methods