How do I set a conditional condition in an optimization probem using Linprog

I want to optimize my bond portfolio using Linprog. But how do I incorporate the conditional condition that: if I choose a bond out of my bond-list then the minimum piece is 200'000 and any step upward is +1000 pieces (e.g. 201k, 202k, 203k etc). So if the bond is not attractive the minimum weight must be zero but if it is selected the condition has to be applied. Using inequalities, I was only able to say that the weights are not allowed to exceed a certain limit.

 採用された回答

Alan Weiss
Alan Weiss 2016 年 6 月 14 日

0 投票

Perhaps this MIQP documentation example has the modeling information you need. For your case you don't need to use the MIQP model, but I believe that you should use an MILP formulation, not a linear programming formulation.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

2 件のコメント

Pascal
Pascal 2016 年 6 月 21 日
編集済み: Pascal 2016 年 6 月 21 日
Hello Alan, Many thanks for your answer. However, looking at the MIQP documentation I still don't see how to enter the condition that each x can either be zero or at least the minimum investment. Regards, Pascal
Alan Weiss
Alan Weiss 2016 年 6 月 23 日
Look at the semicontinuous constraints in the MIQP example. They do exactly what you ask.
Alan Weiss
MATLAB mathematical toolbox documentation

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLinear Programming and Mixed-Integer Linear Programming についてさらに検索

質問済み:

2016 年 6 月 14 日

コメント済み:

2016 年 6 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by