C++ Reference: class MPVariable

Note: This documentation is automatically generated.

The class for variables of a Mathematical Programming (MP) model.
Method
basis_status

Return type: MPSolver::BasisStatus

branching_priority

Return type: int

index

Return type: int

Returns the index of the variable in the MPSolver::variables_.

integer

Return type: bool

Returns the integrality requirement of the variable.

lb

Return type: double

Returns the lower bound.

name

Return type: const std::string&

Returns the name of the variable.

reduced_cost

Return type: double

SetBounds

Return type: void

Arguments: double lb, double ub

Sets both the lower and upper bounds.

SetBranchingPriority

Return type: void

Arguments: int priority

SetInteger

Return type: void

Arguments: bool integer

Sets the integrality requirement of the variable.

SetLB

Return type: void

Arguments: double lb

Sets the lower bound.

SetUB

Return type: void

Arguments: double ub

Sets the upper bound.

solution_value

Return type: double

ub

Return type: double

Returns the upper bound.

unrounded_solution_value

Return type: double