Bincont2lin

From TomWiki
Jump to navigationJump to search

Purpose

Adds constraints when modeling with binary variables which are multiplied by integer or continuous variables.

This is the most efficient way to get rid off quadratic objectives or constraints.

Calling Syntax

Prob = bincont2lin(Prob, idx_prod, idx_bin, idx_cont)

Inputs

Prob Problem structure to be converted.
idx_prod Indices for product variables.
idx_bin Indices for binary variables.
idx_cont Indices for continuous/integer variables.

Outputs

Output Description
Prob Problem structure with added constraints.

Description

prod = bin * cont. The problem should be built with the extra variables prod in place of the bin * cont products.

The indices of the unique product variables are needed to convert the problem properly.

Three inequalities are added to the problem:

prod <= cont

prod >= cont - xU * (1 - bin)

prod <= xU * bin

By adding this prod will always equal bin * cont.