IDA/Analysis: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Created page with "''This pages contains some notes on the analysis algorithm that is used in our IDA solver in ASCEND. Work in progress!'' The IDA integrator works a bit differently in the..."
 
No edit summary
Line 1: Line 1:
''This pages contains some notes on the analysis algorithm that is used in our [[IDA]] solver in ASCEND. Work in progress!''
''This pages contains some notes on the analysis algorithm that is used in our [[IDA]] solver in ASCEND. Work in progress!''


The IDA integrator works a bit differently in the analysis phase to [[DOPRI5]] and [[LSODE]] (it would be nice to be able to unify these things).
# ''<tt>reanalyze_solver_lists</tt>'', to update the rels/vars in the system system according to the WHENs
# set the 'nonbasic' flag to zero for all normal variables, and to one for the independent variable ('x')
# ''<tt>integrator_ida_check_vars</tt>'', to check for differential variables that are not incident, downgrading 'differential' variables to algebraic variables if no derivative is present, and marking any...
# ''<tt>integrator_ida_flag_rels</tt>''
# ''<tt>integrator_ida_sort_rels_and_vars</tt>''
# ''<tt>integrator_ida_create_lists</tt>''
# ''<tt>integrator_ida_check_diffindex</tt>''
# (there is some code commented out here to do with checking the structure of the system for structural singularity etc)
# ''<tt>integrator_ida_check_index</tt>'' should tell the user if there is an index problem (perhaps we can apply automatic index reduction?)
# some checks of the diffvars: do we have a single indep var, is the indep var what we expected it to be
# copy the list of observed vars (both continuous and discrete) into the integ data struct.


See also [[Integrator API#Analysis|Analysis]] in the [[Integrator API]].
# work out the list of observed variables and store them in <tt>sys-&gt;obs</tt>.


Currently it looks like overkill, and we're hoping that a re-think will help to streamline this code.
TODO complete this section.


In <tt>integrator_ida_analyse</tt>, we carefully deal with the case where a variable is declared as differential even when a deriv
The IDA integrator works a bit differently in the analysis phase to [[DOPRI5]] and [[LSODE]] (it would be nice to be able to unify these things).


* <tt>reanalyze_solver_lists</tt>, to update the rels/vars in the system system according to the WHENs
See also [[Integrator API#Analysis|Analysis]] in the [[Integrator API]].
* <tt>integrator_ida_check_vars</tt>, to check for differential variables that are not incident, downgrading 'differential' variables to algebraic variables if no derivative is present, and marking any
* run <tt>integrator_ida_flag_rels</tt>, then
* <tt>integrator_ida_sort_rels_and_vars</tt>.
* <tt>integrator_ida_create_lists</tt> and
* <tt>integrator_ida_check_diffindex</tt>. Then
* <tt>integrator_ida_check_index</tt> checks the index of the DAE system, then
* work out the list of observed variables and store them in <tt>sys-&gt;obs</tt>.
 
TODO complete this section.


[[Category:Development]]
[[Category:Development]]

Revision as of 12:52, 21 March 2015

This pages contains some notes on the analysis algorithm that is used in our IDA solver in ASCEND. Work in progress!

  1. reanalyze_solver_lists, to update the rels/vars in the system system according to the WHENs
  2. set the 'nonbasic' flag to zero for all normal variables, and to one for the independent variable ('x')
  3. integrator_ida_check_vars, to check for differential variables that are not incident, downgrading 'differential' variables to algebraic variables if no derivative is present, and marking any...
  4. integrator_ida_flag_rels
  5. integrator_ida_sort_rels_and_vars
  6. integrator_ida_create_lists
  7. integrator_ida_check_diffindex
  8. (there is some code commented out here to do with checking the structure of the system for structural singularity etc)
  9. integrator_ida_check_index should tell the user if there is an index problem (perhaps we can apply automatic index reduction?)
  10. some checks of the diffvars: do we have a single indep var, is the indep var what we expected it to be
  11. copy the list of observed vars (both continuous and discrete) into the integ data struct.
  1. work out the list of observed variables and store them in sys->obs.

TODO complete this section.

The IDA integrator works a bit differently in the analysis phase to DOPRI5 and LSODE (it would be nice to be able to unify these things).

See also Analysis in the Integrator API.