integerConstraint
Description
Specify indices of extended integer variables for the mixed-integer linear
programming solver intlinprog
. Extended integer variables have the
types integer, semicontinuous, and semi-integer. For more information, see Extended Integer Variables.
Creation
Description
specifies that variables passed to intcon
= integerConstraint(Name=Value
)intlinprog
in the
intcon
argument are extended integer variables. For example, if the
first five indices of a variable x
are semicontinuous, and the next
five are integer, set intcon =
integerConstraint(SemiContinuous=1:5,Integer=6:10)
.
Name-Value Arguments
Properties
Examples
More About
Alternative Functionality
Problem-Based Approach to Extended Integer Variables
For the problem-based approach, specify the variable type in optimvar
when
creating variables.
x = optimvar("x",Type="semi-continuous",... LowerBound=3,UpperBound=10) y = optimvar("y",2,Type="semi-integer",... LowerBound=[3,5],UpperBound=[10,20])
Version History
Introduced in R2025a