You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many problems currently fail during initialization. The initialization approaches in Sundials and DASSL are pretty simple. Lots has been written on the subject:
We can use KINSOL or NLSolve.jl to help. The main issue is that most models have underdetermined initial conditions, and KINSOL can't handle that. The methods outlined in the papers above might take a bit of work. It'd be nice to find something simple that's at least better than what we do now. The last paper above mentions turning the initial solution into an optimization problem. That might be something to try given that Julia has several good optimization packages.
The text was updated successfully, but these errors were encountered:
Kinsol should be able to find a solution if you give it a reasonable initial guess. By the way, does 'solve' update its input SimState with the solution it has found? If not, perhaps the API should be updated so that the solution found with solve can be passed to the main simulation procedures.
I'm going to leave this open for now. initialize! has been added, but has some limitations:
I've got a working initialize!. The issues are:
It only works for scalar Unknowns, not vectors.
It uses JuMP, and this increases load times. I tried using @require to make it optional, but I couldn't get it to work. Overall, I think this is okay. We'll have package caching sooner or later. JuMP is an uber-cool package.
It doesn't work after events, so if you have events in a model, you don't want to use sim(m, init = :none).
Many problems currently fail during initialization. The initialization approaches in Sundials and DASSL are pretty simple. Lots has been written on the subject:
We can use KINSOL or NLSolve.jl to help. The main issue is that most models have underdetermined initial conditions, and KINSOL can't handle that. The methods outlined in the papers above might take a bit of work. It'd be nice to find something simple that's at least better than what we do now. The last paper above mentions turning the initial solution into an optimization problem. That might be something to try given that Julia has several good optimization packages.
The text was updated successfully, but these errors were encountered: