You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in using CVode to integrate with inequality constraints where the right-hand side is different than zero, e.g., y_1 < 5. What is the intended method for doing this? Should I be modifying my states so that the inequality constraint changes, i.e., change y_1 = y_1 - 5 so that the new inequality constraint is y_1 <0, or is there a different method that I can use instead? I would like to avoid modifying my states if possible.
Additionally is there some intended method of implementing a 2-sided band constraint, where a<=y<=b?
The text was updated successfully, but these errors were encountered:
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.
I am interested in using CVode to integrate with inequality constraints where the right-hand side is different than zero, e.g., y_1 < 5. What is the intended method for doing this? Should I be modifying my states so that the inequality constraint changes, i.e., change y_1 = y_1 - 5 so that the new inequality constraint is y_1 <0, or is there a different method that I can use instead? I would like to avoid modifying my states if possible.
Additionally is there some intended method of implementing a 2-sided band constraint, where a<=y<=b?
The text was updated successfully, but these errors were encountered: