-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I was trying to write a conditional statement in $ODE. It gave me a error message as below. Could anyone let me know how should I write this statement? I tried to put double mt1 = self.mtime(Tmax); in $MAIN as introduced in the user guide. It gave a similar error message.
$ODE if(TIME<=Tmax) dxdt_EFFE = p*EFFE; if(TIME>Tmax) dxdt_EFFE = - alpha*EFFE;
Example-mread-source.cpp: In function ‘void _model_Example_ode__(const double*, const double*, double*, const dvec&, const double*)’: /opt/scp/software/mro/3.5.1-foss-2017a/lib64/R/site-library/mrgsolve/base/modelheader.h:100:14: error: ‘self’ was not declared in this scope #define TIME self.time ^ Example-mread-source.cpp:104:4: note: in expansion of macro ‘TIME’ if(TIME<=Tmax) dxdt_EFFE = p*EFFE; ^~~~ /opt/scp/software/mro/3.5.1-foss-2017a/lib64/R/site-library/mrgsolve/base/modelheader.h:100:14: error: ‘self’ was not declared in this scope #define TIME self.time ^ Example-mread-source.cpp:105:4: note: in expansion of macro ‘TIME’ if(TIME>Tmax) dxdt_EFFE = - alpha*EFFE; ^~~~ make: *** [Example-mread-source.o] Error 1