linprog and ode45

1 view (last 30 days)
Taehun Kim
Taehun Kim on 13 Apr 2022
Edited: Torsten on 14 Apr 2022
Dear All,
I am solving a linear program (LP) within the right hand side function of ode45. The linear system has about 200 equality constraints. Compare to my previous solution method, without linprog.m inside the right hand side function, I am seeing a dramatic slow down in my code...
Do you know if there is a way to accelerate the performance of linprog or is it just not possible to solve LPs any faster?
Also, when I surpress the output of the linprog.m using option, the call to the options function is quite slow too...
Sincerely,
Tae
  10 Comments
Matt J
Matt J on 14 Apr 2022
Because the numerical methods used (especially the error estimators) assume that the functions of the right-hand side are smooth.
Do they? I find it hard to imagine they couldn't handle a step input, given how common those are in engineering applications of ODEs.
Torsten
Torsten on 14 Apr 2022
Edited: Torsten on 14 Apr 2022
Engineers are optimistic people ...
I had to smile when I recently saw a book titled "Numerical methods for engineers and scientists".

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!