Giter Club home page Giter Club logo

Comments (2)

balos1 avatar balos1 commented on September 1, 2024

This was answered on the SUNDIALS mailing list.

Hello Kim Aaron,

Yes, to solve that problem with CVODE will have to
make a change of variables from y_i to y_i - bound
in order to enforce a bound y_i < bound.

-Alan H

from sundials.

AaronHKim avatar AaronHKim commented on September 1, 2024

Thank you for the reply!

Do you happen to know of any additional information on the second question regarding how to implement a 2-banded constraint where a<=y<=b?

Edit (answered by mailing list):

As with the upper bound question, CVODE has no built-in
constraint option of that type. Here is how you can do it:
In addition to changing variables from y to y-b and requiring this variable to be <= 0, add to the system another dependent variable z which is equal to y-a,
have z satisfy the same ODE that y does (with the shift accounted for in its right-hand side function), and require the constraint z >= 0. The two resulting numerical solutions for y will agree within specified tolerances.

In any case, please be aware that if the true solution of the ODE system takes y outside of that band, CVODE cannot resolve that conflict, and will grind to a halt. If the true solution does indeed stay in the band, any actual numerical violations of the bounds (detected internally), will be temporary and will be corrected by CVODE.

-Alan H

from sundials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.