settoolsetting

Navigation:  Language Reference > Functions > External >

settoolsetting

Previous pageReturn to chapter overviewNext page

Syntax

 

status = settoolsetting('key', value)

 

Description

The settoolsetting() function can b used to change simulator settings from your model

 

The following values for key are possible:

 

modelname

modelfilename

modelexperimentname

fastmode

simulationmode

endless

integrationmethod

starttime

finishtime

eventdelta

outputaftereach

instructionset

integrationmethod.Euler.stepsize

integrationmethod.BackwardEuler.alpha

integrationmethod.BackwardEuler.stepsize

integrationmethod.BackwardEuler.absolutetolerance

integrationmethod.BackwardEuler.relativetolerance

integrationmethod.AdamsBashforth.stepsize

integrationmethod.RungeKutta2.stepsize

integrationmethod.RungeKutta4.stepsize

integrationmethod.RungeKutta8.absolutetolerance

integrationmethod.RungeKutta8.relativetolerance

integrationmethod.RungeKutta8.initialstepsize

integrationmethod.RungeKutta8.maximumstepsize

integrationmethod.RungeKuttaFehlberg.absolutetolerance

integrationmethod.RungeKuttaFehlberg.relativetolerance

integrationmethod.RungeKuttaFehlberg.initialstepsize

integrationmethod.RungeKuttaFehlberg.maximumstepsize

integrationmethod.VodeAdams.absolutetolerance

integrationmethod.VodeAdams.relativetolerance

integrationmethod.VodeAdams.initialstepsize

integrationmethod.VodeAdams.maximumstepsize

integrationmethod.BDFMethod.initialstepsize

integrationmethod.BDFMethod.maximumstepsize

integrationmethod.BDFMethod.absolutetolerance

integrationmethod.BDFMethod.relativetolerance

integrationmethod.MeBDFiMethod.initialstepsize

integrationmethod.MeBDFiMethod.maximumstepsize

integrationmethod.MeBDFiMethod.absolutetolerance

integrationmethod.MeBDFiMethod.relativetolerance

 

Example

variables

 real x, y, dummy;

code

 y = int (x);

 x = sin (time);

 

 if time > 7 then

         dummy = settoolsetting ('integrationmethod.Euler.stepsize', 0.1 );

 else

         if time > 6 then

                 dummy = settoolsetting ('integrationmethod.Euler.stepsize', 0.01 );

         else

                 if time > 5 then

                         dummy = settoolsetting ('integrationmethod.Euler.stepsize', 1 );

                 end;

         end;

 end;