Skip to content

fixed constraints handling in the simulator

Marmaduke Woodman requested to merge github/fork/i-Zaak/constraints_fix into master

Created by: i-Zaak

The constraints are transferred from the Model to the Integrator in the Simulator.preconfigure function. However, while it correctly takes the Model.state_variable_boundaries, it creates an incorrect attributes Integrator.constraint_state_variable_indices and Integratorconstraint_state_variable_boundaries. These are then not used in the integration.

See the before / after time series for a variable with [0, np.inf] constraint:

download (8)

download (7)

Merge request reports