mrgsolve
Public Member Functions | Public Attributes | List of all members
odeproblem Class Reference

#include <odeproblem.h>

Public Member Functions

 odeproblem (Rcpp::NumericVector param, Rcpp::NumericVector init, Rcpp::List funs, int n_capture_)
 
 ~odeproblem ()
 
void do_init_calc (bool answer)
 
void advance (double tfrom, double tto, LSODA &solver)
 
void call_derivs (double *t, double *y, double *ydot)
 
void init (int pos, double value)
 
double init (int pos)
 
void init_call (const double &time)
 
void init_call_record (const double &time)
 
void init_derivs (double time)
 
void y_init (int pos, double value)
 
void y_init (Rcpp::NumericVector init)
 
void y_add (const unsigned int pos, const double &value)
 add value to compartment pos More...
 
void table_call ()
 Call $TABLE function. More...
 
void table_init_call ()
 
void config_call ()
 Call $PREAMBLE function. More...
 
void set_d (rec_ptr this_rec)
 
void omega (Rcpp::NumericMatrix &x)
 
void sigma (Rcpp::NumericMatrix &x)
 
arma::mat mv_omega (int n)
 
arma::mat mv_sigma (int n)
 
void pass_envir (Rcpp::Environment *x)
 
bool CFONSTOP ()
 
const std::vector< double > & param ()
 
void param (int pos, double value)
 
void rate (unsigned int pos, double value)
 
double rate (unsigned int pos)
 
void rate0 (unsigned int pos, double value)
 
double rate0 (unsigned int pos)
 
int rate_count (unsigned int pos)
 
void rate_add (unsigned int pos, const double &value)
 
void rate_rm (unsigned int pos, const double &value)
 
void rate_bump (const unsigned int pos, const double &value)
 
void rate_main (rec_ptr rec)
 
void rate_reset ()
 Reset all infusion rates. More...
 
void dur (unsigned int pos, double value)
 
double dur (unsigned int pos)
 
void reset_newid (const double id_)
 Reset odeproblem object for new individual. More...
 
void eta (int pos, double value)
 
void eps (int pos, double value)
 
unsigned short int systemoff ()
 
void on (unsigned short int cmt)
 
void off (unsigned short int cmt)
 
int is_on (unsigned int eq_n)
 
void fbio (unsigned int pos, double value)
 
double fbio (unsigned int pos)
 
double alag (int cmt)
 
void time (double time_)
 
void newind (unsigned int newind_)
 
unsigned int newind ()
 
void advan (int x)
 
int advan ()
 
void advan2 (const double &tfrom, const double &tto)
 
void advan4 (const double &tfrom, const double &tto)
 
void neta (const int n)
 set number of ETAs in the model More...
 
void neps (const int n)
 set number of EPSs in the model More...
 
void nid (int n)
 sets the number of IDs More...
 
void nrow (int n)
 sets the number of data set rows More...
 
void idn (int n)
 sets the current ID number More...
 
void rown (int n)
 sets the currenw data set row number More...
 
dvecget_capture ()
 
double capture (int i)
 
void copy_parin (const Rcpp::List &parin)
 copies items passed in through parin into the odeproblem object More...
 
void copy_funs (const Rcpp::List &funs)
 
bool any_mtime ()
 
std::vector< mrgsolve::evdatamtimes ()
 
void clear_mtime ()
 
void y (const int pos, const double value)
 
double y (const int pos)
 
int istate ()
 
void istate (int value)
 
void lsoda_init ()
 
int npar ()
 returns the number of parameters More...
 
int neq ()
 returns the number of state variables More...
 
void tol (double atol, double rtol)
 sets the absolute and relative tolerances More...
 

Public Attributes

std::vector< double > Y
 compartment amounts More...
 
std::vector< double > Ydot
 dxdt values More...
 
std::vector< double > Yout
 used to hold Y values during solving More...
 
std::vector< double > Param
 parameter vector More...
 
std::vector< double > Capture
 captured data items More...
 
double Atol
 absolute tolerance used by ODE solver More...
 
double Rtol
 relative tolerance used by ODE solver More...
 
double ssAtol
 absolute tolerance when finding steady state More...
 
double ssRtol
 
int Npar
 number of parameters More...
 
int Neq
 number of equations More...
 
int Istate
 istate value More...
 
bool ss_fixed
 If true, then no warning is issued if SS not reached in ss_n doses. More...
 
int ss_n
 Max number of doses during SS advance before warning is issued. More...
 
bool ss_flag
 flag indicating when the system is advancing to SS More...
 
std::vector< int > Ss_cmt
 vector of compartments to consider for SS More...
 
std::vector< double > R0
 acutal current infusion rate More...
 
std::vector< unsigned int > infusion_count
 number of active infusions More...
 
std::vector< double > R
 receive user input for infusion rate More...
 
std::vector< double > D
 receive user input for infusion duration More...
 
std::vector< double > Init_value
 initial conditions More...
 
std::vector< double > Init_dummy
 initial conditions for user input More...
 
std::vector< double > F
 bioavability More...
 
std::vector< double > Alag
 dosing lag time More...
 
std::vector< int > On
 compartment on/off indicator More...
 
databox d
 various data passed to model functions More...
 
int Advan
 simulation mode: 1/2/3/4 (PK models) or 13 (odes) More...
 
std::vector< double > a
 used for advan 1/2/3/4 calculations More...
 
std::vector< double > alpha
 used for advan 1/2/3/4 calculation More...
 
mrgsolve::resim simeta
 functor for resimulating etas More...
 
mrgsolve::resim simeps
 functor for resimulating epsilons More...
 
arma::mat Omega
 variance/covariance matrix for between-subject variability More...
 
arma::mat Sigma
 variance/covariance matrix for within-subject variability More...
 
std::vector< double > pred
 brings clearances, volumes, and & for advan 1/2/3/4 More...
 
deriv_func Derivs
 $ODE function More...
 
init_func Inits
 $MAIN function More...
 
table_func Table
 $TABLE function More...
 
config_func Config
 $PREAMBLE function More...
 
bool Do_Init_Calc
 Flag regulating whether or not initials are taken from $MAIN More...
 

Constructor & Destructor Documentation

◆ odeproblem()

odeproblem::odeproblem ( Rcpp::NumericVector  param,
Rcpp::NumericVector  init,
Rcpp::List  funs,
int  n_capture_ 
)

◆ ~odeproblem()

odeproblem::~odeproblem ( )
inline

Member Function Documentation

◆ advan() [1/2]

int odeproblem::advan ( )
inline

◆ advan() [2/2]

void odeproblem::advan ( int  x)

◆ advan2()

void odeproblem::advan2 ( const double &  tfrom,
const double &  tto 
)

◆ advan4()

void odeproblem::advan4 ( const double &  tfrom,
const double &  tto 
)

◆ advance()

void odeproblem::advance ( double  tfrom,
double  tto,
LSODA solver 
)

◆ alag()

double odeproblem::alag ( int  cmt)

◆ any_mtime()

bool odeproblem::any_mtime ( )
inline

◆ call_derivs()

void odeproblem::call_derivs ( double *  t,
double *  y,
double *  ydot 
)

◆ capture()

double odeproblem::capture ( int  i)
inline

◆ CFONSTOP()

bool odeproblem::CFONSTOP ( )
inline

◆ clear_mtime()

void odeproblem::clear_mtime ( )
inline

◆ config_call()

void odeproblem::config_call ( )

Call $PREAMBLE function.

◆ copy_funs()

void odeproblem::copy_funs ( const Rcpp::List &  funs)

◆ copy_parin()

void odeproblem::copy_parin ( const Rcpp::List &  parin)

copies items passed in through parin into the odeproblem object

◆ do_init_calc()

void odeproblem::do_init_calc ( bool  answer)
inline

◆ dur() [1/2]

double odeproblem::dur ( unsigned int  pos)
inline

◆ dur() [2/2]

void odeproblem::dur ( unsigned int  pos,
double  value 
)
inline

◆ eps()

void odeproblem::eps ( int  pos,
double  value 
)
inline

◆ eta()

void odeproblem::eta ( int  pos,
double  value 
)
inline

◆ fbio() [1/2]

double odeproblem::fbio ( unsigned int  pos)

◆ fbio() [2/2]

void odeproblem::fbio ( unsigned int  pos,
double  value 
)
inline

◆ get_capture()

dvec& odeproblem::get_capture ( )
inline

◆ idn()

void odeproblem::idn ( int  n)
inline

sets the current ID number

◆ init() [1/2]

double odeproblem::init ( int  pos)
inline

◆ init() [2/2]

void odeproblem::init ( int  pos,
double  value 
)
inline

◆ init_call()

void odeproblem::init_call ( const double &  time)

Call $MAIN to get the initial conditions.

Parameters
timethe time to assume for the calculation

◆ init_call_record()

void odeproblem::init_call_record ( const double &  time)

Call $MAIN with the dummy initial condition vector.

Parameters
timethe time to assume when making the call.

◆ init_derivs()

void odeproblem::init_derivs ( double  time)

◆ is_on()

int odeproblem::is_on ( unsigned int  eq_n)
inline

◆ istate() [1/2]

int odeproblem::istate ( )
inline

◆ istate() [2/2]

void odeproblem::istate ( int  value)
inline

◆ lsoda_init()

void odeproblem::lsoda_init ( )
inline

◆ mtimes()

std::vector<mrgsolve::evdata> odeproblem::mtimes ( )
inline

◆ mv_omega()

arma::mat odeproblem::mv_omega ( int  n)

◆ mv_sigma()

arma::mat odeproblem::mv_sigma ( int  n)

◆ neps()

void odeproblem::neps ( const int  n)

set number of EPSs in the model

◆ neq()

int odeproblem::neq ( )
inline

returns the number of state variables

◆ neta()

void odeproblem::neta ( const int  n)

set number of ETAs in the model

◆ newind() [1/2]

unsigned int odeproblem::newind ( )
inline

◆ newind() [2/2]

void odeproblem::newind ( unsigned int  newind_)
inline

◆ nid()

void odeproblem::nid ( int  n)
inline

sets the number of IDs

◆ npar()

int odeproblem::npar ( )
inline

returns the number of parameters

◆ nrow()

void odeproblem::nrow ( int  n)
inline

sets the number of data set rows

◆ off()

void odeproblem::off ( unsigned short int  cmt)

◆ omega()

void odeproblem::omega ( Rcpp::NumericMatrix &  x)

◆ on()

void odeproblem::on ( unsigned short int  cmt)

◆ param() [1/2]

const std::vector<double>& odeproblem::param ( )
inline

◆ param() [2/2]

void odeproblem::param ( int  pos,
double  value 
)
inline

◆ pass_envir()

void odeproblem::pass_envir ( Rcpp::Environment *  x)
inline

◆ rate() [1/2]

double odeproblem::rate ( unsigned int  pos)
inline

◆ rate() [2/2]

void odeproblem::rate ( unsigned int  pos,
double  value 
)
inline

◆ rate0() [1/2]

double odeproblem::rate0 ( unsigned int  pos)
inline

◆ rate0() [2/2]

void odeproblem::rate0 ( unsigned int  pos,
double  value 
)
inline

◆ rate_add()

void odeproblem::rate_add ( unsigned int  pos,
const double &  value 
)

◆ rate_bump()

void odeproblem::rate_bump ( const unsigned int  pos,
const double &  value 
)

◆ rate_count()

int odeproblem::rate_count ( unsigned int  pos)
inline

◆ rate_main()

void odeproblem::rate_main ( rec_ptr  rec)

◆ rate_reset()

void odeproblem::rate_reset ( )

Reset all infusion rates.

◆ rate_rm()

void odeproblem::rate_rm ( unsigned int  pos,
const double &  value 
)

◆ reset_newid()

void odeproblem::reset_newid ( const double  id_)

Reset odeproblem object for new individual.

◆ rown()

void odeproblem::rown ( int  n)
inline

sets the currenw data set row number

◆ set_d()

void odeproblem::set_d ( rec_ptr  this_rec)

◆ sigma()

void odeproblem::sigma ( Rcpp::NumericMatrix &  x)

◆ systemoff()

unsigned short int odeproblem::systemoff ( )
inline

◆ table_call()

void odeproblem::table_call ( )

Call $TABLE function.

◆ table_init_call()

void odeproblem::table_init_call ( )

◆ time()

void odeproblem::time ( double  time_)
inline

◆ tol()

void odeproblem::tol ( double  atol,
double  rtol 
)

sets the absolute and relative tolerances

◆ y() [1/2]

double odeproblem::y ( const int  pos)
inline

◆ y() [2/2]

void odeproblem::y ( const int  pos,
const double  value 
)
inline

◆ y_add()

void odeproblem::y_add ( const unsigned int  pos,
const double &  value 
)

add value to compartment pos

◆ y_init() [1/2]

void odeproblem::y_init ( int  pos,
double  value 
)

Assigns values to both the compartment and the vector of initial conditions.

Parameters
posthe compartment number (C++ indexing)
valuethe value for the compartment

◆ y_init() [2/2]

void odeproblem::y_init ( Rcpp::NumericVector  init)

Member Data Documentation

◆ a

std::vector<double> odeproblem::a

used for advan 1/2/3/4 calculations

◆ Advan

int odeproblem::Advan

simulation mode: 1/2/3/4 (PK models) or 13 (odes)

◆ Alag

std::vector<double> odeproblem::Alag

dosing lag time

◆ alpha

std::vector<double> odeproblem::alpha

used for advan 1/2/3/4 calculation

◆ Atol

double odeproblem::Atol

absolute tolerance used by ODE solver

◆ Capture

std::vector<double> odeproblem::Capture

captured data items

◆ Config

config_func odeproblem::Config

$PREAMBLE function

◆ D

std::vector<double> odeproblem::D

receive user input for infusion duration

◆ d

databox odeproblem::d

various data passed to model functions

◆ Derivs

deriv_func odeproblem::Derivs

$ODE function

◆ Do_Init_Calc

bool odeproblem::Do_Init_Calc

Flag regulating whether or not initials are taken from $MAIN

◆ F

std::vector<double> odeproblem::F

bioavability

◆ infusion_count

std::vector<unsigned int> odeproblem::infusion_count

number of active infusions

◆ Init_dummy

std::vector<double> odeproblem::Init_dummy

initial conditions for user input

◆ Init_value

std::vector<double> odeproblem::Init_value

initial conditions

◆ Inits

init_func odeproblem::Inits

$MAIN function

◆ Istate

int odeproblem::Istate

istate value

◆ Neq

int odeproblem::Neq

number of equations

◆ Npar

int odeproblem::Npar

number of parameters

◆ Omega

arma::mat odeproblem::Omega

variance/covariance matrix for between-subject variability

◆ On

std::vector<int> odeproblem::On

compartment on/off indicator

◆ Param

std::vector<double> odeproblem::Param

parameter vector

◆ pred

std::vector<double> odeproblem::pred

brings clearances, volumes, and & for advan 1/2/3/4

◆ R

std::vector<double> odeproblem::R

receive user input for infusion rate

◆ R0

std::vector<double> odeproblem::R0

acutal current infusion rate

◆ Rtol

double odeproblem::Rtol

relative tolerance used by ODE solver

◆ Sigma

arma::mat odeproblem::Sigma

variance/covariance matrix for within-subject variability

◆ simeps

mrgsolve::resim odeproblem::simeps

functor for resimulating epsilons

◆ simeta

mrgsolve::resim odeproblem::simeta

functor for resimulating etas

◆ Ss_cmt

std::vector<int> odeproblem::Ss_cmt

vector of compartments to consider for SS

◆ ss_fixed

bool odeproblem::ss_fixed

If true, then no warning is issued if SS not reached in ss_n doses.

◆ ss_flag

bool odeproblem::ss_flag

flag indicating when the system is advancing to SS

◆ ss_n

int odeproblem::ss_n

Max number of doses during SS advance before warning is issued.

◆ ssAtol

double odeproblem::ssAtol

absolute tolerance when finding steady state

◆ ssRtol

double odeproblem::ssRtol

◆ Table

table_func odeproblem::Table

$TABLE function

◆ Y

std::vector<double> odeproblem::Y

compartment amounts

◆ Ydot

std::vector<double> odeproblem::Ydot

dxdt values

◆ Yout

std::vector<double> odeproblem::Yout

used to hold Y values during solving


The documentation for this class was generated from the following files: