Initializing help system before first use

problem.delVariable

problem.delVariable


Purpose
Delete one or more variables from the problem.
Synopsis
problem.delVariable(x1, x2, ...)
Example
N = 20

x = [xpress.var() for i in range(N)]
p = xpress.problem()
p.addVariable(x)
p.addConstraint(x[i] >= x[i+1] for i in range(N-1))

# deletes x[2], x[3], i.e., third and fourth variable
p.delVariable(x[2:4])
Further information
All arguments can be single variables or lists, tuples, or NumPy arrays of variables. They can also be variable indices (from 0 to COLS-1). The index of variables, constraints, and SOSs can be obtained with problem.getIndex.