Skip to content

Error message for conditional statement in $ODE #6

@Wendy723

Description

@Wendy723

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions