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.

 Akzeptierte Antwort

Alan Weiss
Alan Weiss am 14 Jun. 2016
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 Kommentare

Pascal
Pascal am 21 Jun. 2016
Bearbeitet: Pascal am 21 Jun. 2016
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
Look at the semicontinuous constraints in the MIQP example. They do exactly what you ask.
Alan Weiss
MATLAB mathematical toolbox documentation

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 14 Jun. 2016

Kommentiert:

am 23 Jun. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by