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일
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
Look at the semicontinuous constraints in the MIQP example. They do exactly what you ask.
Alan Weiss
MATLAB mathematical toolbox documentation

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

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