linear ODE as a constraint within an milp problem
古いコメントを表示
Good Morning,
I have a syntax question regarding a milp problem that I would like to solve with intlinprog function:
My objective function that I would like to minimize is f = 2 x1 + 3 x2 where x1 and x2 are binary variables.
Furthermore,
y01 = 5 x1 & y02 = 5 x2
where y01 and y02 are the initial conditions used to solve following first order linear ODE system:
dy1/dl = -a0 & dy2/dl = b0
y1 and y2 over whole interval L are calculated by iterational solving of the ODE system using ODE45 (since the parameters a0 and b0 are different on each small interval)
Now I have a constraint which is C sum(y1) + D sum(y2) < 100.
Following documentation it is easy to define the objective function and the binary variables:
f=[2;3];
intcon=1:2
However now I have no idea how to integrate the solving of the ODE routine into the constraint expression.
Can you give some hint?
Thanks!!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!