Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Does Dynamic Optimization with OM and IpOpt support Integer Variable?

Does Dynamic Optimization with OM and IpOpt support Integer Variable?

If we change the input Real u into the input Integer u, there will be an error shows that messages: Failed to build model: nmpcBatchReactor.
Does Dynamic Optimization with OM and IpOpt support Integer Variable?
Great Thanks.

Code:


model BatchReactor
  Real x1(start =1, fixed=true, min=0, max=1);
  Real x2(start =0, fixed=true, min=0, max=1);
  input Real u(min=0, max=5);
equation
  der(x1) = -(u+u^2/2)*x1;
  der(x2) = u*x1;
end BatchReactor;

optimization nmpcBatchReactor(objective=-x2)
  extends BatchReactor;
end nmpcBatchReactor;

Edited by: shawnli89 - Jan-07-20 04:07:01
There are 0 guests and 0 other users also viewing this topic
You are here: