# CPLEX abc2gap

## Purpose

Converting a general assignment problem (GAP) to a standard form suitable for a MIP solver.

The GAP problem is formulated as

${\begin{array}{cl}\min \limits _{x_{ij}}&f(x)=\sum _{i=1}^{m}\sum _{j=1}^{n}c_{ij}*x_{ij}\\&\\s/t&\sum _{j=1}^{n}x_{ij}=1~~,i=1,...,m\\&\sum _{i=1}^{m}a_{ij}*x_{ij}\leq b_{j}~~,j=1,..,n\\&x\in B^{m\times n},B=\{0,1\}.\\\end{array}}$ ## Calling Syntax

[c, x L, x U, b L, b U, a, sos1] = abc2gap( A, b, C, SOS1);


## Description of Input

Input Description
A A m × n constraint matrix for GAP constraints.
b A m × 1 right hand side vector.
C A m × n cost matrix for GAP constraints.
SOS1 Logical variable, default false. If true, generate output for sos1 handling with CPLEX. Otherwise generate output giving an equivalent formulation with standard integer variables.

## Description of Output

Output Description
c Linear objective function cost coefficients, vector m * n × 1.
x_L Lower bounds on design parameters x.
x_U Upper bounds on design parameters x.
b_ L Lower bounds on the m + n linear constraints.
b_U Upper bounds on the linear constraints.
a Sparse m + n × m * n matrix for linear constraints.
sos1 If input variable SOS1 is true, structure with sos1 variable information in the form suitable for the Matlab CPLEX interface routine cplex.m, otherwise empty.

## Description

Converting a general assignment problem (GAP) to standard form suitable for a mixed-integer programming solver. Either binary or sos1 variables are used.