-
Notifications
You must be signed in to change notification settings - Fork 21
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
Analyser/Generator: support systems of non-linear algebraic equations #942
Conversation
…one unknown that requires root finding.
Reworked our test for an algebraic equation with one non-isolated unknown.
Reworked our test for an algebraic equation with one non-isolated unknown.
ecb1985
to
feb6e2a
Compare
585c446
to
36a7c05
Compare
… system. Such variables are the only unknown variable in an equation, but they are not on their own on either the LHS or RHS of that equation, hence we solve them using an NLA system. This means that we need to provide an initial guess and we can safely use zero since that NLA system has only one solution.
79d585a
to
3f5928a
Compare
Now, rates are also computed using an NLA equation.
In the end, there is nothing preventing us from doing that since we already do it for variables, e.g., x = y+z with x and y known and z the unknown variable for which we use an initial guess of zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the void initialiseVariables(double *states, double *rates, double *variables);
function is the rates argument ever used without the external variable argument?
It actually has nothing to do with external variables. The reason it was introduced is that |
Do we have a test showing this, I couldn't see a test generating a rates argument in the |
Yes: libcellml/tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.c Lines 489 to 517 in 842346d
|
Fixes #882.