Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial values for alg variables of casadi model #1

Open
FelixStege opened this issue Jun 24, 2024 · 0 comments
Open

Initial values for alg variables of casadi model #1

FelixStege opened this issue Jun 24, 2024 · 0 comments
Assignees

Comments

@FelixStege
Copy link
Contributor

When running a casadi model with the simulator, .alg variables do not get an initial value through the config, leading to the default value of 0. This leads to errors when dividing by an .alg variable.

How to fix?
Add initial values for algebraic values through the config. In the do_step() function of the casadi model, add z0 as an input:

while t_sim < t_sample:
                result = self.integrator(x0=curr_x, p=pars)
@FelixStege FelixStege self-assigned this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant