Adding upper and lower boundaries for states

  • arash

    arash - 2012-06-08

    Hi, I am wondering whether it is possible to add upper and lower boundaries on state variables as integrator or simulator options. If not is there any sample to show me how can I do that? At this stage I have modelled my system in CasADi and I am just simulating it.

  • Joel Andersson

    Joel Andersson - 2012-06-10

    Hello, what do you mean by adding boundaries? To force the integrator to take steps within some range? I'm afraid there is no such option. If there is such an option in the underlying integrator (like Sundials), we could easily add it to the CasADi interface though.

    What we usually do is to output the values and then put bounds on the output values.

  • arash

    arash - 2012-06-12

    Thanks joel. Have all IDAS options been implemented in CasADi? I mean can I set for instance IDASetMaxNumSteps option? If so is there any naming convention?

  • Joel Andersson

    Joel Andersson - 2012-07-01

    Hello and sorry for late answer,

    I have not added all IDAS options systematically, but if you need one, like the one you suggested, just make a post and we'll add it. It is a few minutes work for us, at most.

    The naming conversion is basically lower case option names with works separated by underscore. So "IDASetMaxNumSteps" would become "max_num_steps", I guess. But this convension is not always followed. Better to look at the list of option in the API doc.

    I want to point out that there is a new version of the Sundials interface in the trunk now. The new version assumes a semi-explicit form. That's important to keep in mind.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks