Class amifun
Defined in File amifun.m
Class Documentation
- class amifun
AMIFUN defines functions which later on will be transformed into appropriate C code.
Public Functions
- amifun::amifun(matlabtypesubstitute funstr, matlabtypesubstitute model)
amievent constructs an amifun object from the provided input.
- param funstr
name of the requested function
- param model
amimodel object which carries all symbolic definitions to construct the function
- noret::substitute amifun::writeCcode_sensi(::amimodel model, ::fileid fid)
writeCcode_sensi is a wrapper for writeCcode which loops over parameters and reduces overhead by check nonzero values
- param model
model defintion object
- param fid
file id in which the final expression is written
- returns
fid – void
- noret::substitute amifun::writeCcode(::amimodel model, ::fileid fid)
writeCcode is a wrapper for gccode which initialises data and reduces overhead by check nonzero values
- param model
model defintion object
- param fid
file id in which the final expression is written
- returns
fid – void
- noret::substitute amifun::writeMcode(::amimodel model)
writeMcode generates matlab evaluable code for specific model functions
- param model
model defintion object
- returns
model – void
- mlhsInnerSubst<::amifun > amifun::gccode(::amimodel model, ::fileid fid)
gccode transforms symbolic expressions into c code and writes the respective expression into a specified file
- param model
model definition object
- param fid
file id in which the expression should be written
- returns
this – function definition object
- mlhsInnerSubst<::amifun > amifun::getDeps(::amimodel model)
getDeps populates the sensiflag for the requested function
- param model
model definition object
- returns
this – updated function definition object
- mlhsInnerSubst<::amifun > amifun::getArgs(::amimodel model)
getFArgs populates the fargstr property with the argument string of the respective model function (if applicable). model functions are not wrapped versions of functions which have a model specific name and for which the call is solver specific.
- param model
model definition object
- returns
this – updated function definition object
- mlhsInnerSubst<::amifun > amifun::getNVecs()
getfunargs populates the nvecs property with the names of the N_Vector elements which are required in the execution of the function (if applicable). the information is directly extracted from the argument string
- returns
this – updated function definition object
- mlhsInnerSubst<::amifun > amifun::getCVar()
getCVar populates the cvar property
- returns
this – updated function definition object
- mlhsInnerSubst<::amifun > amifun::getSensiFlag()
getSensiFlag populates the sensiflag property
- returns
this – updated function definition object
- mlhsSubst< mlhsInnerSubst<::amifun >,mlhsInnerSubst<::amimodel > > amifun::getSyms(::amimodel model)
getSyms computes the symbolic expression for the requested function
- param model
model definition object
- returns
this – updated function definition object
model – updated model definition object
Public Members
- ::symbolic sym = sym("[]")
symbolic definition struct
Default: sym(“[]”)
- ::symbolic sym_noopt = sym("[]")
symbolic definition which was not optimized (no dependencies on w)
Default: sym(“[]”)
- ::symbolic strsym = sym("[]")
short symbolic string which can be used for the reuse of precomputed values
Default: sym(“[]”)
- ::symbolic strsym_old = sym("[]")
short symbolic string which can be used for the reuse of old values
Default: sym(“[]”)
- ::char funstr = char.empty("")
name of the model
Default: char.empty(“”)
- ::char cvar = char.empty("")
name of the c variable
Default: char.empty(“”)
- ::char argstr = char.empty("")
argument string (solver specific)
Default: char.empty(“”)
- ::cell deps = cell.empty("")
dependencies on other functions
Default: cell.empty(“”)
- matlabtypesubstitute nvecs = cell.empty("")
nvec dependencies
Default: cell.empty(“”)
- matlabtypesubstitute sensiflag = logical.empty("")
indicates whether the function is a sensitivity or derivative with respect to parameters
Default: logical.empty(“”)