Odd/even number constraint in linear programming

I'm about to use intlinprog function with x1,x2,x3 have to be integers. How can I say to my program that I want x1 to be an even number?

Respuestas (1)

Matt J
Matt J el 13 de Oct. de 2020
Editada: Matt J el 13 de Oct. de 2020

0 votos

Make a change of variables of the form x1=2*y1, where y1 is also an integer-constrained variable.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 13 de Oct. de 2020

Editada:

el 13 de Oct. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by