How do I reduce the running time when I call thousands of 'intlinprog' ?

2 ビュー (過去 30 日間)
梦娇 何
梦娇 何 2022 年 7 月 15 日
コメント済み: 梦娇 何 2022 年 7 月 16 日
  • 'intlinprog' is used in a subfunction that is called many times, and the running time is too long. I want to get a faster running time, so what can i do?
  2 件のコメント
Torsten
Torsten 2022 年 7 月 15 日
If the calls don't depend on each other, make a parfor loop.
梦娇 何
梦娇 何 2022 年 7 月 16 日
Thanks, but I used 'parfor' in the main function, so this subfunction can't use 'parfor' (nesting is not allowed, right? ).

サインインしてコメントする。

回答 (1 件)

Bruno Luong
Bruno Luong 2022 年 7 月 15 日
編集済み: Bruno Luong 2022 年 7 月 15 日
You can try to call multiple problems at once by
  • Concatenate f, intcon, b, beq, lb, yb, x0,
  • Make matrices A, Aeq block diagonal (possibly sparse format is better).
Not sure if it saves time or the solution is not degraded though.
  2 件のコメント
梦娇 何
梦娇 何 2022 年 7 月 16 日
Thanks, this is really something I didn't think of. I'll give it a try.
梦娇 何
梦娇 何 2022 年 7 月 16 日
Bruno Luong, i don't know how to concatenate f, intcon, b, beq, lb, yb and x0, and could you mind explaining specifically? thank you very much.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeParallel and Cloud についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by