Home > mpt > solvers > mpt_solveMILP.m

# mpt_solveMILP

## PURPOSE

MPT_SOLVEMILP Interface to various MILP solvers

## SYNOPSIS

function [xmin,fmin,how,exitflag]=mpt_solveMILP(f,A,B,Aeq,Beq,lb,ub,vartype,param,options,solver)

## DESCRIPTION

MPT_SOLVEMILP Interface to various MILP solvers

[xmin,fmin,how,exitflag]=mpt_solveMILP(f,A,B,Aeq,Beq,lb,ub,vartype,param,options,solver)

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Solves an MILP problem:

min  f'x
s.t. A*x  <= B
Aeq*x = Beq
some 'x' integer/boolean

by using the method specified in 'solver'

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
f          An (n x 1) vector containing the linear objective function coefficients.
REQUIRED INPUT ARGUMENT.

A          An (m x n) matrix (in full or sparse format) containing the constraint
coefficients. REQUIRED INPUT ARGUMENT.

b          An (m x 1) vector containing the right-hand side value for each
constraint in the constraint matrix. REQUIRED INPUT ARGUMENT.

Aeq        An (k x n) matrix (in full or sparse format) containing the constraint
coefficients for equality constraints (i.e. Aeq*x = Beq)

beq        An (k x 1) vector containing the right-hand side value for each
constraint in the constraint matrix for equality constraints

LB         An (n x 1) vector containing the lower bound on each of the variables.
Any lower bound that is set to a value less than or equal to that of
the constant -CPX_INFBOUND will be treated as negative \infty.
CPX_INFBOUND is defined in the header file cplex.h.
Default: [], (lower bound of all variables set to -CPX_INFBOUND).

UB         An (n x 1) vector containing the upper bound on each of the variables.
Any upper bound that is set to a value greater than or equal to that of
the constant CPX_INFBOUND will be treated as \infty.
CPX_INFBOUND is defined in the header file cplex.h.
Default: [], (upper bound of all variables set to CPX_INFBOUND).

VARTYPE    An (n x 1) vector containing the types of the variables
VARTYPE(i) = 'C' Continuous variable
VARTYPE(i) = 'B' Binary(0/1) variable
VARTYPE(i) = 'I' Integer variable
VARTYPE(i) = 'S' Semi-continuous variable
VARTYPE(i) = 'N' Semi-integer variable
(This is case sensitive).
Default: [], (all variables are continuous).

solver     which solver to use:
0 - CPLEX 9 (cplexint)
1 - YALMIP
2 - GLPK (glpkmex)
3 - XPRESS
4 - MOSEK
5 - bintprog
6 - CPLEX 8 (cplexmex)
7 - CPLEXMEX (by Nicolo Giorgetti)

Note: if 'solver' is not specified, mptOptions.milpsolver will be used instead
(see help mpt_init)

---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
xopt      - The optimizer
fmin      - Value of the objective
exitflag  - An integer specifying result of the optimization
(1 - optimal solution found, -1 - problem is infeasible)
how       - States the result of optimization ('ok', 'unbounded', 'infeasible')

see also MPT_SOLVELP, MPT_SOLVEMIQP

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• set SET Set a field of MPTCTRL objects
• double DOUBLE Function used to access internal properties of the given polytope
• end END Returns the last element in a given polytope array
• length LENGTH Returns number of elements in a polytope array
• set SET Used to modify internal properties of a given polytope object
• size SIZE Returns size of the given polytope object
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
• sub_getyalmipdata SUB_GETYALMIPDATA Internal function
• sub_setyalmipdata Copyright is with the following author(s)
This function is called by:
• mpt_verify MPT_VERIFY Verifies if states enter a given set in a given number of steps
• mpt_mldsim MPT_MLDSIM Simulates an MLD system for one time step
• mpc_mip ===============================================================================
• mpt_solveMPC MPT_SOLVEMPC Solves the on line optimization MPC problem
• mpt_getInput MPT_GETINPUT For a given state, extracts the (optimal) output from a controller structure

Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003