processState <- create_process_state()
# add attribute container to process state
attribute <- create_attribute_container(rep(2.0, 5))
processState <- add_attribute_container(processState, attribute, name = "poissonAttribute")
attributeIndex <- get_attribute_container_index(processState, name = "poissonAttribute")
# add timer variable to process state
processState <- add_global_attribute(processState, name = "timer", value = 0)
timerIndex <- get_global_attribute_index(processState, name = "timer")
# create time models based on process state pointers
timeModel1 <- create_round_based_time_model(timerIndex)
timeModel2 <- create_poisson_model(3.0)
timeModel3 <- create_attribute_poisson_model(attributeIndex)
# a change of the attribute container changes time model 3
set_value(attribute, 0, 0.5)
Run the code above in your browser using DataLab