フィルターのクリア

How make Integer linear programming optimization, intlinprog built-in function, takes binary data or even single as its input rather than double?

1 回表示 (過去 30 日間)
I am using intlinprog built-in function using binary decision variables and I run out of memory cause the matrices I am building are of type double. When I cast them as single, unit8 and so on I also get this error that matrices should be double. I am clearing my workspace of some temporary variables but I still run of memory. Is there any way to stay with only binary data rather than double to save up some memory?

採用された回答

Matt J
Matt J 2017 年 6 月 12 日
You could convert your matrices to type sparse, if they contain mostly zeros.

その他の回答 (1 件)

John D'Errico
John D'Errico 2017 年 6 月 12 日
編集済み: John D'Errico 2017 年 6 月 12 日
Sorry. intlinprog requires doubles. According to doc intlinprog, even single is not an option. Just wanting software to do what it was not written to do is so rarely successful.
You could write your own solver of course. Or you could find a solver out there that allows you to provide input in the form you want, then learn how to call it.

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by