Functional description of MINTO

aMixed INTeger Optimizer

Version



Martin WPSavelsb ergh



George L Nemhauser

Georgia Institute of Technology

School of Industrial and Systems Engineering

Atlanta GA

USA

martinsavelsb erghisyegatechedu

georgenemhauserisyegatechedu

March

Contents

Functional description of MINTO

a Mixed INTeger Optimizer

Version

Martin WPSavelsb ergh

George L Nemhauser

Georgia Institute of Technology

School of Industrial and Systems Engineering

Atlanta GA

USA

Abstract

MINTO is a software system that solves mixedinteger linear programs by a branchand

b ound algorithm with relaxations It also provides automatic constraint

classication prepro cessing primal heuristics and constraint generation Moreover the user can

enrich the basic algorithm by providing a variety of sp ecialized application routines that can

customize MINTO to achieve maximum eciency for a problem class This pap er do cuments

MINTO by sp ecifying what it is capable of doing and how to use it

Intro duction

MINTO Mixed INTeger Optimizer is a to ol for solving mixed integer linear programming MIP

problems of the form

X X X

max c x c x c x

j j j j j j

j B j I j C

X X X

a x a x a x b i m

ij j ij j ij j i

j B j I j C

x j B

j

l x u j I C

xj j xj

x IIZ j B I

j

x IR j C

j

where B is the set of binary variables I is the set of integer variables C is the set of continuous

variables the sense of a constraintcanbe orandthelower and upp er b ounds maybe

negative or p ositive innityorany rational numb er

A great variety of problems of resource allo cation lo cation distribution pro duction scheduling

reliability and design can b e represented by MIP mo dels One reason for this rich mo deling capability

is that various nonlinear and nonconvex optimization problems can b e p osed as MIP problems

Unfortunately this robust mo deling capability is not supp orted by a comparable algorithmic

capability Existing branchandb ound co des for solving MIP problems are far to o limited in the

size of problems that can b e solved reliably relative to the size of problems that need to b e solved

esp ecially with resp ect to the number of integer variables and they p erform to o slowly for many

realtime applications To remedy this situation sp ecial purp ose co des havebeendevelop ed for

particular applications and in some cases exp erts have b een able to stretch the capabilities of the

general co des with ad ho c approaches But neither of these remedies is satisfactory The rst is very

exp ensive and timeconsuming and the second should b e necessary only for a very limited number

of instances

Our idea of what is needed to solve large mixedinteger programs eciently without having to

develop a fullblown sp ecial purp ose co de in each case is an eective general purp ose mixed integer

optimizer that can b e customized through the incorp oration of application functions MINTO is

such a system Its strength is that it allows users to concentrate on problem sp ecic asp ects rather

than data structures and implementation details such as linear programming and branchandb ound

The heart of MINTO is a linear programming based branchandb ound algorithm It can b e

implemented on top of any LPsolver that provides capabilities to solve and mo dify linear programs

and interpret their solutions The currentversion can either b e built on top of the CPLEX callable

libraryversion and up on top of Optimization Subroutine Library OSL version and up

or on top of XPRESSMP Optimisation Subroutine Library XOSL version and up

To b e as eective and ecient as p ossible when used as a general purp ose mixedinteger optimizer

MINTO attempts to

improve the formulation by prepro cessing and probing

construct feasible solutions

generate strong valid inequalities

perform variable xing based on reduced prices

control the size of the linear programs by managing active constraints

To b e as exible and p owerful as p ossible when used to build a sp ecial purp ose mixedinteger opti

mizer MINTO provides various mechanisms for incorp orating problem sp ecic knowledge Finally

to make future algorithmic developments easy to incorp orate MINTOs design is highly mo dular

This do cument fo cuses on the mechanisms for incorp orating problem structure and only contains

a minimal description of the general purp ose techniques mentioned ab ove

The mechanisms for incorp orating problem structure and customizing MINTO are discussed in

Sections and under information application control bypassand miscellaneous

functions Section explains how to run MINTO and Sections and presenttheoverall system

design and a brief description of the system functions Section discusses the developmentof

applications that call MINTO recursively Sections and discuss environmentvariables

direct access to the linear program programming considerations and computational results Finally

Section contains some remarks on availability and future releases

Release of MINTO was prompted by the addition of XPRESSMP as an alternativeLP

solver a complete rewrite of the prepro cessor the addition of improved and more exible branching

schemes and the p ort to Windows NT

Running MINTO

The following command should b e used to invoke MINTO

minto xomtbeE phcik g f r RB sn a name

As a default MINTO assumes that the mixed integer program that has to b e solved is sp ecied in

MPSformat in a le name in the currentworking directory It is also p ossible to generate

the mixed integer program directly within MINTO using the application function appl mps see

Section However even in that case MINTO requires a name to b e sp ecied on the command

line MINTO always op ens a le name l og to write out information that may b e useful to

determine the cause of a premature exit in case this o ccurs Furthermore this name will b e used

as the problem name whichwould otherwise have b een sp ecied in the MPSle

The runtime b ehavior of MINTO dep ends on the command line options The meanings of the

various command line options are given in Table The command line options allow the user to

deactivate selectively one or more system functions and to sp ecify the amount of output desired

option eect

x assume maximization problem

o level of output

m maximum numberofnodestobeevaluated

t maximum cpu time in seconds

b deactivate b ound improvement

e typ e of branching

E typ e of no de selection

p level of prepro cessing and probing

h deactivate primal heuristic

c deactivate clique generation

i deactivate implication generation

k deactivate knapsackcover generation

g deactivate GUB cover generation

f deactivate owcover generation

r deactivate row management

R deactivate restarts

B typ e of forced branching

s deactivate all system functions

n activate a names mo de

a activate use of advance basis

Table Command line options

MINTO assumes that the mixed integer program that has to b e solved represents a minimization

problem unless the x command line option is sp ecied in which case MINTO assumes it represents

a maximization problem

Regardless of whether MINTO has found an optimal solution or not it will ab ort after evaluating

no des The m command line option can b e used to change the maximum number

of no des to b e evaluated

Regardless of whether MINTO has found an optimal solution or not it will ab ort after

cpu seconds The t command line option can b e used to change the maximum cpu time

In default mo de MINTO pro duces very little output The o command line option

can b e used to change the amount of output generated by MINTO There are four output levels no

very little normal and extensive

In default mo de MINTO p erforms prepro cessing and limited probing if the numb er of binary

variables is not to o large For a description of prepro cessing and probing and all other system

functions see Section The p command line option can b e used to change the

amount of prepro cessing and probing done by MINTO There are four levels no prepro cessing

and no probing prepro cessing but no probing prepro cessing and limited probing and

prepro cessing and extensive probing Probing although p otentially very eective can b e time

very consuming esp ecially for problems with many binary variables

A branching scheme is sp ecied bytwo rules a branching variable selection rule and a no de

selection rule In default mo de MINTO uses its own adapativevariable selection and no de selection

rules The e command line option can b e used to sp ecify a branching variable

selection rule There are six variable branching selection rules maximum infeasibility p enalty

based strong branching pseudo cost based adaptive and SOS branching The

E command line option can b e used to sp ecify a no de selection rule There are

ve no de selection rules b est b ound depth rst b est pro jection b est estimate and

adaptive

MINTO attempts to generates cuts to improvetheformulation during the evaluation of a no de

As a consequence there is a risk of tailingo Therefore MINTO monitors the progress resulting

form cut generation If the amount of progress do es not warrant cut generation anymore MINTO

forces branching The B command line option can b e used to sp ecify a forcing strategy

There are three strategies no forcing at all no forcing at the ro ot but forcing at the other no des

and forcing at all no des

In default mo de MINTO do es not asso ciate names with variables and constraints The n

command line option can b e used to indicate that an application do es want to asso ciate

names with variables constraints or with b oth variables and constraints

In default mo de MINTO do es not load an advanced basis when it starts evaluating a new no de

but relies on the LP solver to determine a go o d starting basis In most cases this works very well

Stateoftheart LP solver keep the basis asso ciated with the last solved LP and employ sophisticated

techniques to convert it to a go o d starting basis for the currentLPFurthermore loading an advanced

basis usually results in refactorization op erations by the LP solver whichmaytake a substantial

amount of time Finally it is not at all obvious what constitutes a go o d advanced basis if rowor

column generation techniques are applied in the solution pro cess The a command line option can

b e used to activate the use of an advance basis In that case MINTO will use the basis asso ciated

with the last LP solved in the parent no de to create an advanced basis

System design

It is well known that problem sp ecic knowledge can b e used advantageously to increase the p erfor

mance of the basic linear programming branchandb ound algorithm for mixed

MINTO attempts to use problem sp ecic knowledge on twolevels to strengthen the LPrelaxation

to obtain b etter feasible solutions and to improve branching

At the rst level system functions use general structures and at the second level application

functions use problem sp ecic structures A call to an application function temp orarily transfers

control to the application program which can either accept control or decline control If control

is accepted the application program p erforms the asso ciated task If control is declined MINTO

p erforms a default action which in many cases will b e do nothing The user can also exercise

control at the rst level by selectively deactivating system functions

Figure and giveowcharts of the underlying algorithm and the asso ciated application func

tions To dierentiate b etween actions carried out by the system and those carried out by the

application program there are dierentboxes System actions are in solid line b oxes and appli

cation program actions are in dashed line b oxes A solid line b ox with a dashed line b ox enclosed is

used whenever an action can b e p erformed by b oth the system and the application program Finally

to indicate that an action has to b e p erformed by either the system or the application program

but not b oth a b ox with one half in solid lines and the other half in dashed lines is used If an

application program do es not carry out an action but one is required the system falls backtoa

default action For instance if an application program do es not provide a division scheme for the

branching task the system will apply the default branching scheme

Formulations

The concept of a formulation is fundamental in describing and understanding MINTO MINTO is

constantly manipulating formulations storing a formulation retrieving a formulation mo difying a

formulation duplicating a formulation handing a formulation to the LPsolver providing informa

tion ab out the formulation to the application program etc Wewillalways use the following terms

to refer to elementsofaformulation ob jective function constraint co ecient sense righthand

side variable lower b ound and upp er b ound

It is b enecial to distinguish four typ es of formulations The original formulation is the for

mulation sp ecied in the pr obl emname mps le The initial formulation is the formulation

asso ciated with the ro ot no de of the branchandb ound tree It may dier from the original formu

lation as MINTO automatically tries to improve the initial formulation using various prepro cessing

techniques such as detection of redundant constraints and co ecient reduction The current formu

lation is an extension of the original formulation and contains all the variables and all the global and

lo cal constraints asso ciated with the no de that is currently b eing evaluated The active formulation

is the formulation currently loaded in the LPsolver It may b e smaller that the currentformulation

due to management of inactive constraints

It is very imp ortant that an application programmer realizes that the active formulation do es not

necessarily coincide with his mental picture of the formulation since MINTO mayhave generated

additional constraints temp orarily deactivated constraints or xed one or more variables

Constraints GetProblem

Preprocess

Select

Preprocess

LP

DeleteVars

Do PriceVars n

PriceVars

AddVars y Success

n zlp>zbest

Integral y

PrimalHeuristic n Feasible

n Success PrimalHeuristic

n n zprim>zbest zprim>zbest

Update Update

Fathom Fathom

n zlp>zbest

ModifyBounds

DeleteCons

Do GenerateCons n

GenerateCons n Feasible

y n AddCons Success zprim>zbest

PrimalHeuristic Update

Success y Fathom

Branch

Figure The underlying algorithm appl_mps

appl_preprocess

appl_rank

appl_preprocess

appl_delvariables

appl_terminatelp n

appl_variables

y

n

y

appl_primal n appl_feasible

n appl_primal

n n

appl_fathom appl_fathom

n

appl_bounds

appl_delconstraints

appl_terminatenode n

appl_constraints n appl_feasible

y n

y appl_fathom

appl_divide

Figure The application functions

MINTO distinguishes various constraint classes as dened in Table These constraint classes are

motivated by the constraint generation done by MINTO and the branching scheme adopted by

MINTO To present these constraint classes it is convenient to distinguish the binary variables

We do this by using the symbol y to indicate integer and continuous variables Each class is an

equivalence class with resp ect to complementing binary variables ie if a constraint with term a x

j j

is in a given class then the constraint with a x replaced by a x is also in the class For

j j j j

P P

x jB j is in the class BINSUMUB where wethinkofB as x example

 

j j

j B j B

the set of complemented variables

class constraint

P P

MIXUB a x a y a

j j j j 

j B j I C

P P

MIXEQ a x a y a

j j j j 

j B j I C

P

NOBINUB a y a

j j 

j I C

P

a y a NOBINEQ

j j 

j I C

P

a x a ALLBINUB

j j 

j B

P

ALLBINEQ a x a

j j 

j B

P

a y a x SUMVARUB

 

j j k k

j I C

P

SUMVAREQ a y a x

 

j j k k

j I C

VARUB a y a x

j j k k

VAREQ a y a x

j j k k

VARLB a y a x

j j k k

P

BINSUMVARUB a x a x

j j k k

j B nfk g

P

BINSUMVAREQ a x a x

j j k k

j B nfk g

P

BINSUMVARUB x a x

j k k

j B nfk g

P

BINSUMVAREQ x a x

j k k

j B nfk g

P

BINSUMUB x

j

j B

P

BINSUMEQ x

j

j B

Table Constraint classes

Besides constraint classes MINTO also distinguishes two constrainttyp es global and lo cal

Global constraintarevalid at any no de of the branchandb ound tree whereas lo cal constraints are

only valid in the subtree ro oted at the no de where the constraints are generated

Constraints can b e in one of three states active inactive or deleted Active constraints are part

of the active formulation Inactive constraints have b een deactivated but may b e reactivated at a

later time Deleted constraints have b een removed altogether

Variables

When solving a linear program MINTO allows for column generation In other words after a

linear program has b een optimized MINTO asks for the pricing out of variables not in the current

formulation If anysuchvariables exists and price out favorably they are included in the formulation

and the linear program is reoptimized

Branching

The unevaluated no des of the branchandb ound tree are kept in a list and MINTO always selects

the no de at the head of the list for pro cessing However there is great exibility here since MINTO

provides a mechanism that allows an application program to order the no des in the list in anyway

As a default MINTO keeps the list ordered byLPvalues which results in a b estb ound searchof

the branchandb ound tree

System Functions

MINTOs system functions are used to p erform prepro cessing probing constraint generation and

reduced price variable xing to enhance branching and to pro duce primal feasible solutions They

are employed at every no de of the branchandb ound tree However their use is optional A more

detailed description of some of the system functions emb edded in MINTO can b e found in the pap ers

listed in the references

In prepro cessing MINTO attempts to improve the LPrelaxation byidentifying redundant con

straints detecting infeasibilities tightening b ounds on variables and xing variables using optimality

and feasibility considerations For constraints with only variables it also attempts to improve the

LPrelaxation by co ecient reduction For example a constraint of the form a x a x a x a

      

may b e replaced by a x a x a x a for some that preserves the set of feasible

      

solutions

In probing MINTO searches for logical implications of the form x implies y v and

i j j

stores these in an implication table Furthermore MINTO uses the logical implications b etween

binary variables to build up a clique table ie MINTO tries to extend relations b etween pairs of

binary variables to larger sets of binary variables

After a linear program is solved and a fractional solution is obtained MINTO tries to exclude

these solutions by searching the implication and clique table for violated inequalities and by search

ing for violated lifted knapsackcovers violated lifted GUB covers and violated lifted simple gen

eralized owcovers Lifted knapsackcovers are derived from pure constraints and are of the

form

X X X X

x x x jC j

j j j j j  j

j C j C j C

j B nC

  

P

a a Lifted GUB cover inequalities where C C C with C a minimal set suchthat

j    

j C

have the same form but are derived from a structure consisting of a single knapsack constraintand

a set of nonoverlapping generalized upp er b ound constraints Generalized owcovers are derived

from

X X

y y a

j j 

 

j N j N



y a x j N N

j j j

and are of the form

X X X X



a x y y a x a

j j j j j j 

   

j L

j N nLC  j C j C

P P

 

a a and a with C C N N a minimal set suchthat

 

j  j

j C j C

L N n C

After solving a linear program MINTO searches for nonbasic variables whose values maybe

xed according to the magnitude of their reduced price It also tries to nd feasible solutions using

recursive rounding of the optimal LPsolution

MINTO uses a hybrid branching scheme Under certain conditions it will branch on a clique

constraint If not it cho oses a variable to branch on based on a priority order it creates

Information Functions

For the sequel it is assumed that the reader has a working knowledge of the C programming language

Current formulation

Information ab out the currentformulation can b e obtained through the inquiry functions inq form

inq ob j inq constrand inq var and their asso ciated variables info form info obj info constr

and info var

Each of these inquiry functions up dates its asso ciated variable so that the information stored

in that variable reects the currentformulation The application program can then access the

information by insp ecting the elds of the variable

The rationale b ehind this approachisthatwewanttokeep memory management fully within

MINTO Note that since only nonzero co ecients are stored the memory required to hold the

ob jective function and constraints varies

As it is imp ossible for the application program to keep track of the indices of the active con

straints due to constraint generation and constraint managementdoneby MINTO the only failsafe

metho d for accessing constraint related information is to refer to constraints through names rather

than indices However in some cases for instance when an application program only wants to

insp ect constraints of the original formulation which are not aected by constraint generation and

constraint management using names would b e rather cumb ersome

Toovercome these diculties the following scheme has b een adopted for MINTO All information

access for variables and constraints is done through indices For variables the valid indices are in the

range up to the numberofvariables and for constraints the valid indices are in the range up to

the numb er of constraints However to provide a failsafe access mechanism MINTO has b esides

the default nonames op erating mo de a names op erating mo de in which names are asso ciated with

eachvariable and each constraint This feature is only available in versions and up

form inq

This function retrieves the number of variables and the numb er of constraints of the current formu

lation

A call to inq form initializes the variable info form that has the following structure

typedef struct infoform

int formvcnt number of variables in the formulation

int formccnt number of constraints in the formulation

INFOFORM

The following example shows how inq form can b e used to print the size of the currentformulation

ESIZEC

include stdioh

include mintoh

WriteSize

void

WriteSize

inqform

printf Number of variables dn infoformformvcnt

printf Number of constraints dn infoformformccnt

inq var

This function retrieves the variable name variable class the ob jective function co ecient the num

b er of constraints in whichthevariable app ears with a nonzero co ecient and for each of these

constraints the index of the constraint and the nonzero co ecient the status of the variable the

lower and upp er b ound asso ciated with the variable additional information on the b ounds of the

variable and if the variable typ e is continuousandthevariable app ears in a variable lower or upp er

b ound constraint the index of the asso ciated binary variable and the asso ciated b ound

Variable class is one of CONTINUOUS INTEGER and BINARY Variable status is one of AC

BY BRANCHING TIVE INACTIVE or DELETED Variable information is one of ORIGINAL MODIFIED

MODIFIED BY MINTO and MODIFIED BY APPL

parameters

index An integer containing the index of the variable

colinfo A b o olean indicating whether the column asso ciated with the variable should b e re

trieved or not ie YES or NO

var initializes the variable info var that has the following structure A call to inq

typedef struct infovar

char varname name if any

char varclass class CONTINUOUS INTEGER or BINARY

double varobj objective function coefficient

int varnz number of constraints with nonzero coefficients

int varind indices of constraints with nonzero coefficients

double varcoef actual coefficients

int varstatus ACTIVE INACTIVE or DELETED

double varlb lower bound

double varub upper bound

VLB varvlb associated variable lower bound

VUB varvub associated variable upper bound

int varlbinfo ORIGINAL MODIFIEDBYMINTO

MODIFIEDBYBRANCHING or MODIFIEDBYAPPL

int varubinfo ORIGINAL MODIFIEDBYMINTO

MODIFIEDBYBRANCHING or MODIFIEDBYAPPL

INFOVAR

typedef struct

int vlbvar index of associated variable

double vlbval value of associated bound

VLB

typedef struct

int vubvar index of associated variable

double vubval value of associated bound

VUB

Due to MINTOs philosophy to use as few functions as p ossible from the LPsolver and MINTOs

row oriented internal data structures retrieving the column asso ciated with a variable maybevery

time consuming Furthermore in many cases an application uses inq var only to obtain information

on the b ounds or the typeofavariable In such situations there is no need to retrieve the column

asso ciated with the variable Therefore wehaveintro duced the b o olean colinfo to indicate whether

or not the column asso ciated with the variable should b e retrieved Setting colinfo to NO may result

in an increased p erformance of an application

var can b e used to printthevariables that are xed in the The following example shows how inq

current formulation

EFIXEDC

include stdioh

include mintoh

WriteFixed

void

WriteFixed

int j

for inqform j j infoformformvcnt j

inqvar j NO

if infovarvarlb infovarvarub EPS

printf Variable d is fixed at fn j infovarvarlb

ob j inq

This function retrieves the numberofvariables that app ear in the ob jective function with a nonzero

co ecient and for each of these variables the index of the variable and the nonzero co ecient

The same information can b e obtained by successivecallstoinq varhowever using inq ob j is

much more ecient

A call to inq ob j initializes the variable info obj that has the following structure

typedef struct

int objnz number of variables with nonzero coefficients

int objind indices of variables with nonzero coefficients

double objcoef actual coefficients

INFOOBJ

ob j can b e used to printthevariables with a nonzero ob jective The following example shows how inq

co ecient

EOBJC

include stdioh

include mintoh

WriteObj

void

WriteObj

int j

inqobj

for j j infoobjobjnz j

printf Variable d has objective coefficient fn

infoobjobjindj infoobjobjcoefj

inq constr

This function retrieves the constraint name constraint class the number of variables that app ear

in the constraint with a nonzero co ecient and for each of these variables the index of the variable

and the nonzero co ecient the sense of the constraint the right hand side of the constraint the

status of the constraint the typ e of the constraint and additional information on the constraint

Constraint class is one of MIXUB MIXEQ NOBINARYUB NOBINARYEQ ALLBINARYUB

ALLBINARYEQ SUMVARUB SUMVAREQ VARUB VAREQ VARLB BINSUMVARUB BIN

SUMVAREQ BINSUMVARUB BINSUMVAREQ BINSUMUB or BINSUMEQ Constraint

status is one of ACTIVE INACTIVE or DELETED Constrainttyp e is one of LOCAL or

GLOBAL Constraint information is one of ORIGINAL GENERATED BY BRANCHING GEN

ERATED BY MINTO and GENERATED BY APPL

parameters

index An integer containing the index of the constraint

constr initializes the variable info constr that has the following structure A call to inq

typedef struct infoconstr

char constrname name if any

int constrclass classification

int constrnz number of variables with nonzero coefficients

int constrind indices of variables with nonzero coefficients

double constrcoef actual coefficients

char constrsense sense

double constrrhs right hand side

int constrstatus ACTIVE INACTIVE or DELETED

int constrtype LOCAL or GLOBAL

int constrinfo ORIGINAL GENERATEDBYMINTO

GENERATEDBYBRANCHING or GENERATEDBYAPPL

INFOCONSTR

The following example shows how inq constr can b e used to printthetyp es of the constraints in

the currentformulation

ETYPEC

include stdioh

include mintoh

WriteType

void

WriteType

int i

for inqform i i infoformformccnt i

inqconstr i

printf Constraint d is of type sn

i infoconstrconstrtype GLOBAL GLOBAL LOCAL

inq prob

This function retrieves the name of the problem that is b eing solved ie the name found in the

NAME section of the pr obl em name mps lethatwas read when MINTO was invoked

The following example shows how inq prob can b e used to print the name of the problem b eing

solved

ENAMEC

include stdioh

include mintoh

WriteName

void

WriteName

printf Problem name sn inqprob

A more elab orate example showing how the inquiry functions can b e used to printeverything there

is to know ab out the current formulation can b e found in App endix A

Active formulation

Information ab out the LPsolution to the activeformulation and information ab out the b est primal

solution are available to the application whenever appropriate through the parameters passed to

the application functions

Additional information ab out the activeformulation and the LPsolution can b e obtained through

the inquiry functions lp vcnt lp ccnt lp slack lp pi lp rcandlp base MINTO gets the

required information directly from the LPsolver Therefore the user is referred to the manual of

the LPsolver for a precise denition of the return values For example the manual of the LPsolver

denes the meaning of the values of the dual variables in case the linear program is infeasible

lp vcnt

This function returns the number of variables in the active formulation ie the number of variables

currently loaded in the LPsolver

lp ccnt

This function returns the numb er of constraints in the activeformulation ie the numb er of con

straints currently loaded in the LPsolver

lp slack

This function returns the slack or surplus of the constraint If the index is invalid or the asso ciated

constraint is inactive the return value will b e INF

parameters

index An integer containing the index of the constraint

lp pi

This function returns the dual value of the constraint If the index is invalid or the asso ciated

constraint is inactive the return value will b e INF

parameters

index An integer containing the index of the constraint

lp rc

This function returns the reduced cost of the variable If the index is invalid the return value will

b e INF

parameters

index An integer containing the index of the variable

base lp

This function retrieves the status of eachvariable ie BASIC ATLOWER ATUPPER or NON

BASIC and each constraint ie CBASIC or CNONBASIC

A call to lp base initializes the variable info base that has the following structure

typedef struct infobase

int basevstat array with the status of each variable

int basecstat array with the status of each constraint

INFOBASE

Names mo de

Applications generating constraints either in appl constraints or appl divide mayhave a dicult

time keeping track of the indices of these constraints MINTO may generate system inequalities

MINTO may deactivate or delete global constraints and MINTO may rearrange global and lo cal

constraints

Toprovide an easy and failsafe mechanism for retrieving information ab out certain constraints

MINTO provides a namesmode When MINTO is invoked with namesmo de active each of the

constraints generated by the application has to b e given a unique name Afterwards the index of a

constraint can b e retrieved with one of two utility functions lp cix and minto cix Both functions

require a name as parameter and return an index For example the slack of a constraint with name

cname can b e retrieved by lp slacklp cix cname and information on a constraint with name

cname can b e retrieved by inq cons minto cix cname A similar mechanism is provide for

retrieving information ab out variables

lp vix

This function returns the index of the variable with the sp ecied name in the activeformulation If

the name do es not exist the return value will b e ERROR if the variable is inactive the return value

will b e DEACTIVATED

parameters

vname Acharacter p ointer to the name of the variable

minto vix

This function returns the index of the variable with the sp ecied name in the currentformulation

If the name do es not exist the return value will b e ERROR if the variable is inactive the return

value will b e INACTIVE

parameters

vname Acharacter p ointer to the name of the variable

lp cix

This function returns the index of the constraint with the sp ecied name in the activeformulation

If the name do es not exist the return value will b e ERROR if the constraintisinactive the return

value will b e INACTIVE

parameters

cname Acharacter p ointer to the name of the constraint

minto cix

This function returns the index of the constraint with the sp ecied name in the currentformulation

If the name do es not exist the return value will b e ERROR if the constraintisinactive the return

value will b e INACTIVE

parameters

cname Acharacter p ointer to the name of the constraint

Pro cess statistics

When MINTO nishes it writes out some statistics on the solution pro cess such as the number of

evaluated no des the numb er of generated lifted knapsackcover inequalities and the elapsed cpu

time The pro cess solution statistics functions allow an application to monitor this information

during the execution of the algorithm

evnds stat

This function returns the number of evaluated no des

stat maxnds

This function returns the maximum numb er of no des that has b een in the list of unevaluated no des

stat avnds

This function returns the average numb er of no des that has b een in the list of unevaluated no des

stat depth

This function returns the maximum depth of the search tree

lp cnt stat

This function returns the numb er of linear programs that has b een solved

gap stat

This function returns the integrality gap

stat maxlprows

This function returns the maximum numberofrows that has b een in the active linear program

stat maxlp cols

This function returns the maximum numb er of columns that has b een in the active linear program

stat cliquecnt

This function returns the numb er of clique inequalities that has b een generated

stat implicationcnt

This function returns the numb er of implication inequalities that has b een generated

knap covcnt stat

This function returns the numb er of lifted knapsackcover inequalities that has b een generated

stat gub covcnt

This function returns the numb er of lifted GUB cover inequalities that has b een generated

stat sknap covcnt

This function returns the numb er of surrogate lifted knapsackcover inequalities that has b een

generated

stat owcovcnt

This function returns the numb er of lifted owcover inequalities that has b een generated

stat time

This function returns the elapsed cpu time

Application Functions

A main program sometimes called a driver and a set of application functions either the default

or any other has to b e compiled and linked with the MINTO library in order to pro duce an

executable version of MINTO The application functions give the user the opp ortunity to incorp orate

problem sp ecic knowledge and thereby increase the overall p erformance A default set of application

functions is part of the distribution of MINTO The incorp oration of these default functions turns

MINTO into a general purp ose mixed integer optimizer

Internal ly MINTO always works with a maximization problem If the original formulation de

scrib es a minimization problem MINTO will change the signs of all the ob jective function co e

cients As a consequence one has to b e careful when interpreting values such as the reduced cost of

avariable

MINTO only stores the nonzero co ecients of variables and constraints Therefore a set of

variables can and will always b e sp ecied by three arrays vrst vind vco ef Vind and vco ef

contain the indices and values of nonzero co ecients resp ectively Vrsti indicates the p osition of

the rst nonzero co ecientoftheith variable in the arrays vind and vco ef vrsti indicates

the rst p osition after the last nonzero co ecientoftheith variable in the arrays vind and vco ef

Note that this implies that if a set of k variables is sp ecied vrstk has to b e dened Similarlya

set of constraints can and will always b e sp ecied by three arrays crst cind cco ef Cind and cco ef

contain the indices and values of nonzero co ecients resp ectively Crsti indicates the p osition of

the rst nonzero co ecientofthe ith constraint in the arrays cind and cco ef crsti indicates

the rst p osition after the last nonzero co ecientoftheith constraint in the arrays cind and cco ef

Note that this implies that if a set of k constraints is sp ecied then crstk has to b e dened

minto

This function invokes MINTO and takes as arguments the problem name and a string with runtime

options For a description of the runtime options see Section

parameters

name A string containing the problem name

options A string containing the runtime options

When MINTO nishes it stores the optimal solution in a variable info opt that has the following

structure

typedef struct infoopt

int optstat exit status optimal time or node limit quit

double optvalue value of optimal solution

int optnzcnt number of nonzeros in optimal solution

int optix indices of nonzeros in optimal solution

double optval values of nonzeros in optimal solution

INFOOPT

Similar to the inquiry functions the calling program can access the optimal solution by insp ecting

the elds of the variable

The following example shows how to call MINTO and print the optimal solution

MINTOC

include stdioh

include mintoh

Minto

void

main

int i

Solve the mixed integer program specified in examplemps which is

a maximization problem and provide extensive output

minto example x o

Write out the optimal solution ourselves

printf Optimal value fn infooptoptvalue

for i i infooptoptnzcnt i

printf Valued fn infooptoptixi infooptoptvali

appl mps

This function allows the application to initialize the original formulation itself It has to return either

YES in which case MINTO assumes that it has to initialize the original formulation by reading an

MPS le and it therefore ignores the parameters or NO in which case MINTO assumes that the

application initializes the original formulation itself and that it is available through the parameters

vcnt ccnt nzcnt vob j vlb vub vtyp e csense crhs vrst vind vco ef vstorsz vstore vname

cstorsz cstore and cname

parameters

id An integer containing the identication of the active MINTO copy

vcnt An integer to hold the number of variables

ccnt An integer to hold the numb er of constraints

nzcnt An integer to hold the numb er of nonzeros

vob j A p ointer to hold an array of doubles to hold the ob jective co ecients of the variables

vlb Apointer to hold an array of doubles to hold the lower b ounds on the variables

vub Apointer to hold an array of doubles to hold the upp er b ounds on the variables

vtyp e A p ointer to hold an arrayofcharacters to hold the typ es of the variables ie C B

or I

csense Apointer to hold an arrayofcharacters to hold the senses of the constraints ie L

E or G

crhs Apointer to hold an array of doubles to hold the right hand sides of the constraints

vrst Apointer to hold an arrayofintegers to hold the starting p ositions of the columns

asso ciated with the variables in the arrays vind and vco ef

vind Apointer to hold an arrayofintegers to hold the indices of the nonzero co ecients

vco ef Apointer to hold an array of doubles to hold the nonzero co ecients

vstorsz Apointer to hold an integer to hold the total number of characters including the null

characters in the names of the variables

vstore Apointer to hold an arrayofcharacters to hold the names of the variables

vname A p ointer to hold an arrayofcharacter p ointers to hold the starting p ositions of the

names of the variables in the array vstore

cstorsz An integer to hold the total number of characters including the null characters in the

names of the constraints

cstore Apointer to hold an arrayofcharacters to hold the names of the constraints

cname A p ointer to hold an arrayofcharacter p ointers to hold the starting p ositions of the

names of the constraints in the array cstore

By default MINTO assumes that it has to initialize the original formulation by reading an MPS

le available in the currentworking directoryHowever for some applications it is much more

convenient to generate the original formulation directly within MINTO However MINTO still

requires a problem name to b e sp ecied on the command line This name will serve as b oth problem

name and lename MINTO always op ens a logle f il enamel og to write out information that

may b e useful to determine the cause of a premature exit in case this o ccurs

Note that the application has to allo cate memory for all the arrays needed to hold the original

formulation with the standard C memory allo cation function callo c that the co ecient matrix

has to b e sp ecied columnwise and that even in the case that an application do es not wanttouse

names the arrays asso ciated with variable and constraint names are nonemptyFor every name at

least the null character has to b e given

The following example shows how appl mps can b e used to initialize the original formulation all

variables are binary all ob jective co ecients are all senses are all right hand sides are

the co ecient matrix is an identity matrix and neither variables nor constraints have names

EMPSC

include stdioh

include mintoh

define SIZE

applmps

unsigned

applmps id vcnt ccnt nzcnt vobj vlb vub vtype csense crhs

vfirst vind vcoef

vstorsz vstore vname cstorsz cstore cname

int id identification of active minto

int vcnt number of variables

int ccnt number of constraints

int nzcnt number of nonzeros

double vobj objective coefficients of the variables

double vlb lower bounds on the variables

double vub upper bounds on the variables

char vtype types of the variables ie C B or I

char csense senses of the constraints ie L E or G

double crhs right hand sides of the constraints

int vfirst starting positions of the columns of the variables

int vind indices of the nonzero coefficients

double vcoef nonzero coefficients

int vstorsz total number of characters in the names of the variables

char vstore names of the variables

char vname starting positions of the names of the variables

int cstorsz total number of characters in the names of the constraints

char cstore names of the constraints

char cname starting positions of the names of the constraints

int i j

double vobj

double vlb

double vub

char vtype

char csense

double crhs

int vfirst

int vind

double vcoef

char vstore

char vname

char cstore

char cname

vcnt SIZE

ccnt SIZE

nzcnt SIZE

vobj double calloc vcnt sizeof double

vlb double calloc vcnt sizeof double

vub double calloc vcnt sizeof double

vtype char calloc vcnt sizeof char

csense char calloc ccnt sizeof char

crhs double calloc ccnt sizeof double

vfirst int calloc vcnt sizeof int

vind int calloc nzcnt sizeof int

vcoef double calloc nzcnt sizeof double

for vfirst j j vcnt j

vobjj

vlbj

vubj

vtypej B

vfirstj j

vindj j

vcoefj

for i i ccnt i

csensei L

crhsi

vstorsz vcnt

cstorsz ccnt

vstore char calloc vstorsz sizeof char

cstore char calloc cstorsz sizeof char

vname char calloc vcnt sizeof char

cname char calloc ccnt sizeof char

for j j vcnt j

vstorej

vnamej vstorej

for i i ccnt i

cstorei

cnamei cstorei

vobj vobj

vlb vlb

vub vub

vtype vtype

csense csense

crhs crhs

vfirst vfirst

vind vind

vcoef vcoef

vstore vstore

vname vname

cstore cstore

cname cname

return NO

appl init

This function provides the application with an entry p oint in the program to p erform some initial

actions It has to return either STOPinwhich case MINTO ab orts or CONTINUE in which case

MINTO continues

parameters

id An integer containing the identication of the active MINTO copy

init can b e used to op en a log le The following example shows how appl

EINITC

include stdioh

include mintoh

FILE fplog

applinit

unsigned

applinit id

int id identification of active minto

if fplog fopen EXAMPLELOG w NULL

fprintf stderr Unable to open EXAMPLELOGn

return STOP

fprintf fplog Solving problem s with MINTOn inqprob

return CONTINUE

initlp appl

This function provides the application with an entry p oint in the program to indicate whether column

generation will b e used for the solution of the linear programming relaxations MINTO ignores the

return value

parameters

id An integer containing the identication of the active MINTO copy

colgen An integer to indicate whether column generation will b e used ie TRUE of FALSE

MINTO solves the initial linear program using a primal simplex metho d and all subsequent linear

programs using a dual simplex metho d One reason for using the dual simplex metho d is that

the dual simplex metho d approaches the optimal value of the linear program from ab oveandthus

provides a valid upp er b ound at every iteration not only on the linear programming solution but

also on the mixed integer programming solution Therefore the solution of the linear program can

b e terminated as so on as this upp er b ound drops b elow the currentlower b ound b ecause at that

p oint the no de can b e fathomed by b ounds However if the linear program is solved using column

generation the values no longer provide valid upp er b ounds and the solution of the linear program

cannot b e terminated earlier It is for this reason that MINTO needs to know whether the linear

programs are solved using column generation or not

The following example shows how appl initlp can b e used to indicate that column generation will

b e used to solve the linear programming relaxations

EINITLPC

include stdioh

include mintoh

applinitlp

unsigned

applinitlp id colgen

int id identification of active minto

int colgen indicator

colgen TRUE

return CONTINUE

prepro cessing appl

This function provides the application with an entry in the program to p erform prepro cessing based

on the original formulation It has to return either STOP in which case assumes infeasibility has

b een detected or CONTINUE in which case MINTO continues The function appl prepro cessing

is called once after the original formulation has b een read and at each no de of the search tree b efore

the evaluation of the no de b egins

parameters

id An integer containing the identication of the active MINTO copy

In general MINTO only stores data in the information variables asso ciated with the inquiry functions

and never lo oks at them again ie communicationbetween MINTO and the application program

is onewayonlyHowever in appl prepro cessing a set of mo dication functions can b e used by

the application program to turn this oneway communication into a twowaycommunication A call

to a mo dication function signals that the asso ciated variable has b een changed by the application

and that MINTO should retrieve the data and up date its internal administration

set var

This function signals that the application program has changed the contents of the info var variable

and that MINTO should get the data of the variable and up date its internal administration MINTO

only accepts changes of the b ounds of a variable

parameters

index An integer containing the index of the variable

set ob j

This function signals that the application program has changed the contents of the info ob j variable

and that MINTO should get the data of the variable and up date its internal administration

set constr

This function signals that the application program has changed the contents of the info constr

variable and that MINTO should get the data of the variable and up date its internal administration

MINTO only accepts changes of the co ecients and the status If the status is changed to DELETE

the constraint will b e removed from the original formulation

parameters

index An integer containing the index of the constraint

For internal reasons the prepro cessing at the start of the evaluation of a no de of the search tree is

limited to changing b ounds on variables

The following example shows how appl prepro cessing canbeusedtoidentify and delete redundant

rows from the original formulation

EPREPC

include stdioh

include mintoh

applpreprocessing

unsigned

applpreprocessing id

int id identification of active minto

int i j

double minlhs maxlhs coef

inqform

for i i infoformformccnt i

minlhs maxlhs double

inqconstr i

for j j infoconstrconstrnz j

inqvar infoconstrconstrindj NO

if coef infoconstrconstrcoefj EPS

minlhs coef infovarvarlb

maxlhs coef infovarvarub

else

minlhs coef infovarvarub

maxlhs coef infovarvarlb

if infoconstrconstrsense G

minlhs infoconstrconstrrhs EPS

infoconstrconstrstatus DELETE

setconstr i

if infoconstrconstrsense L

maxlhs infoconstrconstrrhs EPS

infoconstrconstrstatus DELETE

setconstr i

no de appl

This function provides the application with an entry p oint in the program after MINTO has selected

a no de from the set of unevaluated no des of the branchandb ound tree and b efore MINTO starts

pro cessing the no de It has to return either STOPinwhich case MINTO ab orts or CONTINUE

in which case MINTO continues

parameters

id An integer containing the identication of the active MINTO copy

depth A long containing the depth in the branchandb ound tree of the no de that has b een

selected for evaluation

creation Alongcontaining the creation numb er of the no de that has b een selected for evaluation

zprimal A double containing the value of the primal solution

xprimal An array of doubles containing the values of the variables asso ciated with the primal

solution

The following example shows how appl no de can b e used to implement a simple stopping rule

ENODEC

include stdioh

include mintoh

define GAPSIZE

extern FILE fplog

applnode

unsigned

applnode id depth creation zprimal xprimal

int id identification of active minto

int depth node identification depth

int creation node identification creation

double zprimal value of primal solution

double xprimal value of the variables

double gap statgap

if gap GAPSIZE

fprintf fplog Terminated as gap f is smaller than fn gap GAPSIZE

return STOP

else

fprintf fplog Evaluating node ldldn depth creation

return CONTINUE

appl variables

This function allows the application to generate one or more additional variables It has to return

either FAILURE in which case MINTO assumes that no additional variables were found or no

attempt was made to generate any and it therefore ignores the parameters nzcnt vcnt vob j vlb

vub vrst vind and vco ef or SUCCESS in which case MINTO assumes that additional variables

have b een found by the application and that they are available through the parameters nzcnt vcnt

vob j vlb vub vrst vind and vco ef

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

zprimal A double containing the value of the primal solution

xprimal An array of doubles containing the values of the variables asso ciated with the primal

solution

nzcnt An integer to hold the numb er of nonzero co ecients to b e added to the current for

mulation

vcnt An integer to hold the number of variables to b e added to the currentformulation

vclass An array to hold the classication of variables to b e added to the currentformulation

ie BINARY INTEGER CONTINUOUS

vob j An array of doubles to hold the ob jective function co ecients of the variables to b e

added

vlb An array of doubles to hold the lower b ounds on the values of the variables to b e added

vub An array of doubles to hold the upp er b ounds on the values of the variables to b e

added

vrst An arrayofintegers to hold the p ositions of the rst nonzero co ecients of the variables

to b e added

vind An arrayofintegers to hold the row indices of the nonzero co ecients of the variables

to b e added

vco ef An array of doubles to hold the values of the nonzero co ecients of the variables to b e

added

vname An arrayofcharacter p ointers to hold the names of the variables to b e added

sdim An integer to hold the length of the arrays vob j varlb varub and vrst

ldim An integer to hold the length of the arrays vind and vco ef

For reasons having to do with memory management the application has to allo cate the memory

using callo c to hold the name asso ciated with a variable MINTO will free that memory after it has

installed the name in its internal administration

The following example shows how appl variables can b e used to implement a column generation

scheme for the solution of the linear program

EVARSC

include stdioh

include mintoh

applvariables

unsigned

applvariables id zlp xlp zprimal xprimal nzcnt vcnt vclass vobj varlb

varub vfirst vind vcoef vname sdim ldim

int id identification of active minto

double zlp value of the LP solution

double xlp values of the variables

double zprimal value of the primal solution

double xprimal values of the variables

int nzcnt variable for number of nonzero coefficients

int vcnt variable for number of variables

char vclass array for classifications of vars added

double vobj array for objective coefficients of vars added

double varlb array for lower bounds of vars added

double varub array for upper bounds of vars added

int vfirst array for positions of first nonzero coefficients

int vind array for indices of nonzero coefficients

double vcoef array for values of nonzero coefficients

char vname array for names of vars added

int sdim length of small arrays

int ldim length of large arrays

int j

int colnz

int colind

double colcoeff

int colclass

double colobj

double collb

double colub

inqform

colind int calloc infoformformccnt sizeof int

colcoeff double calloc infoformformccnt sizeof double

vcnt

nzcnt

while getcolumn colnz colclass colind colcoeff colobj collb colub

if nzcnt colnz ldim

continue

vfirstvcnt nzcnt

vclassvcnt colclass

vobjvcnt colobj

varlbvcnt collb

varubvcnt colub

for j j colnz j

vindnzcnt colindj

vcoefnzcnt colcoeffj

if vcnt sdim

break

vfirstvcnt nzcnt

free colind

free colcoef

return vcnt SUCCESS FAILURE

unsigned

getcolumn colnz colclass colind colcoeff colobj collb colub

int colnz

int colclass

int colind

double colcoeff

double colobj

double collb

double colub

This function tries to generate a column It returns if it

successful and otherwise

delvariables NOT IMPLEMENTED appl

This function allows the application to delete one or more of the previously generated variables

from the active formulation ie the formulation currently loaded in the LPsolver It has to return

either FAILURE in which case MINTO assumes that no variables have to b e deleted and it therefore

ignores the parameters vcnt and vind or SUCCESS in which case MINTO assumes that variables

have to b e deleted and that these variables are available through the parameters vcnt and vind

parameters

id An integer containing the identication of the active MINTO copy

vcnt An integer to hold the number of variables to b e deleted from the currentformulation

vind An arrayofintegers to hold the indices of the variables to b e deleted from the current

formulation

Note that variables are deleted from the active formulation Therefore indices are considered to b e

relativetotheactive formulation Note also that it is only p ossible to delete previously generated

variables either by MINTO or by the application It is not p ossible to delete variables from the

initial formulation

The following example shows how appl delvariables can b e used to examine all activevariables

and delete all variables whose reduced cost is greater than a certain tolerance MINTO will ignore

all indices referring to variables from the initial formulation

EDELVARSC

include stdioh

include mintoh

define TOLERANCE

appldelvariables

unsigned

appldelvariables id vcnt vind

int id identification of active minto

int vcnt variable for number of variables to be deleted

int vind array for indices of the variables to be deleted

int j

vcnt

for j j lpvcnt j

if lprc j TOLERANCE

vindvcnt j

return SUCCESS

appl terminatelp

This function allows the application to terminate the solution of the current linear program without

having reached an optimal solution ie b efore all variables have b een priced out It has to return

either NO in which case MINTO assumes that the application wants to continue the solution of the

current linear program and it therefore ignores the parameter zub or YES in which case MINTO

assumes that the application wants to terminate the solution of the current linear program and that

an alternativeupperboundisprovided through the parameter zub If zub is set to INF MINTO

assumes that the active problem is infeasible and that the no de can b e fathomed

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

zub A double to hold the alternative upp er b ound

appl primal

This function allows the application to provide MINTO with a lower b ound and p ossibly an asso

ciated primal solution It has to return either FAILURE in which case MINTO assumes that no

lower b ound was found by the application or no attempt was made to nd one and it therefore

ignores the parameters zpnew xpnew and xpstat or SUCCESS in which case MINTO assumes

that a lower b ound has b een found by the application and that it is available through the parameter

zpnew and that an asso ciated primal solution is available through the parameter xpnew if xpstat is

set to TRUE

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

intlp An integer that indicates whether the LP solution is integral ie TRUE or FALSE

zprimal A double containing the value of the current primal solution

xprimal An array of doubles containing the values of the variables asso ciated with the current

primal solution

zpnew A double to hold the value of the new primal solution

xpnew An array of doubles to hold the values of the variables asso ciated with the new primal

solution

xpstat An integer to indicate the existence of a solution vector ie TRUE or FALSE

The following example shows how appl primal can b e used to provide feasible solutions given a

fractional LP solution of a no de packing problem

EPRIMALC

include stdioh

include mintoh

define UNDEFINED

define FREE

define FIXED

The graph is represented as a forward star in the arrays adjnodes and

edges

extern int adjnodes

extern int adjedges

applprimal

unsigned

applprimal id zlp xlp intlp zprimal xprimal zpnew xpnew xpstat

int id identification of active minto

double zlp value of the LP solution

double xlp values of the variables

int intlp integrality status of LP solution

double zprimal value of the primal solution

double xprimal values of the variables

double zpnew variable for new value of lower bound

double xpnew array for new values of the variables

int xpstat variable for status of associated solution

register int j k

int ix

int mark

double maxxlp

if intlp TRUE

return FALSE

xpstat TRUE

zpnew

inqform

inqobj

mark int calloc infoformformvcnt sizeof int

for

ix UNDEFINED maxxlp

for j j infoformformvcnt j

if markj FREE

if xlpj maxxlp

maxxlp xlpj

ix j

if ix UNDEFINED

break

else

markix FIXED

xpnewix

zpnew infoobjobjcoefix

for k adjnodesix k adjnodesix k

markadjedgesk FIXED

xpnewadjedgesk

free mark

return SUCCESS

appl feasible

This function allows the application to verify that a solution to the activeformulation satisfying

the integrality conditions do es indeed constitute a feasible solution It has to return either YES in

which case MINTO assumes that the solution is feasible and therefore terminates pro cessing this

no de or NO in which case MINTO assumes that the solution is not feasible and therefore continues

pro cessing this no de

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

The following example shows how appl feasible can b e used to accommo date partial formulations

In the linear ordering problem one usually deals with the cycle inequalities

ij jk ki

implicitly ie they may b e generated only when they violate an LPsolution The following co de

assumes the set of variables is for i j n i j and veries whether the given solution is

ij

feasible or not

EFEASC

include stdioh

include mintoh

define INDEXIJ

I n J I J J

applfeasible

unsigned

applfeasible id zlp xlp

int id identification of active minto

double zlp value of the LP solution

double xlp values of the variables

int i j k n

double diff

inqform n infoformformvcnt

for i i n i

for j j n j

forkk nk

if i j i k j k

diff xlpINDEXij xlpINDEXjk xlpINDEXki

if diff EPS

return NO

return YES

appl fathom

This function allows the application to provide an optimality tolerance to terminate or prevent the

pro cessing of a no de of the branchandb ound tree even when the upp er b ound value asso ciated

with the no de is greater than the value of the primal solution It has to return either FAILURE

in which case MINTO assumes that further pro cessing of the no de is still required or SUCCESS

in which case MINTO assumes that further pro cessing of the no de is no longer required For an

active no de pro cessing is terminated for an unevaluated no de MINTO deletes it from the list of

no des to b e pro cessed

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

zprimal A double containing the value of the primal solution

The following two examples showhow the function appl fathom can b e used to implement opti

mality tolerances The rst example shows how to incorp orate the fact that ob jective co ecients

are all integer The second example shows how to build a truncated branchandb ound algorithm

that generates a solution that is within a certain p ercentage of optimality

EFATHOMC

include stdioh

include mintoh

applfathom

unsigned

applfathom id zlp zprimal

int id identification of active minto

double zlp value of the LP solution

double zprimal value of the primal solution

if zlp zprimal EPS

return SUCCESS

else

return FAILURE

EFATHOMC

include stdioh

include mintoh

define TOLERANCE

applfathom

unsigned

applfathom id zlp zprimal

int id identification of active minto

double zlp value of the LP solution

double zprimal value of the primal solution

if zlp TOLERANCE zprimal EPS

return SUCCESS

else

return FAILURE

appl b ounds

This function allows the application to mo dify the b ounds of one or more variables It has to return

either FAILURE in which case MINTO assumes that no b ounds havetobechanged and it therefore

ignores the parameters vcnt vind vtyp e and vvalue or SUCCESS in which case MINTO assumes

that there are variables for which the b ounds havetobechanged and that the relevant information

is available through the parameters vcnt vind vtyp e and vvalue

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

zprimal A double containing the value of the primal solution

xprimal An array of doubles containing the values of the variables asso ciated with the primal

solution

vcnt An integer to hold the number of variables for which b ounds have to b e mo died

vind An arrayofintegers to hold the indices of the variables for which b ounds havetobe

mo died

vtyp e An arrayofcharacters to hold the typ es of mo dication to b e p erformed ie lower

b ound L or upp er b ound U

vvalue An array of doubles to hold the new values for the b ounds

b dim An integer containing the length of the arrays vind vtyp e and vvalue

The following example shows how appl bounds can b e used to implement reduced cost xing

EBNDSC

include stdioh

include mintoh

applbounds

unsigned

applbounds id zlp xlp zprimal xprimal vcnt vind vtype vvalue bdim

int id identification of active minto

double zlp value of the LP solution

double xlp values of the variables

double zprimal value of the primal solution

double xprimal values of the variables

int vcnt variable for number of variables

int vind array for indices of variables

char vtype array for type of bounds

double vvalue array for value of bounds

int bdim size of arrays

int j

double lb ub

vcnt

Retrieve basis information

lpbase

Loop through all variables

inqform

for j j infoformformvcnt j

if infobasebasevstatj BASIC

inqvar j NO

if infovarvarclass CONTINUOUS

lb infovarvarlb

ub infovarvarub

if lb ub EPS

continue

if xlpj lb EPS zlp lprc j zprimal EPS

vindvcnt j

vtypevcnt U

vvaluevcnt lb

if vcnt bdim

break

if xlpj ub EPS zlp lprc j zprimal EPS

vindvcnt j

vtypevcnt L

vvaluevcnt ub

if vcnt bdim

break

return vcnt SUCCESS FAILURE

appl constraints

This function allows the application to generate one or more violated constraints It has to return

either FAILURE in which case MINTO assumes that no violated constraints were found or no

attempt was made to generate any and it therefore ignores the parameters nzcnt ccnt crst cind

cco ef and ctyp e or SUCCESS in which case MINTO assumes that additional constraints have b een

found by the application and that they are available through the parameters nzcnt ccnt crst cind

cco ef and ctyp e

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

zprimal A double containing the value of the primal solution

xprimal An array of doubles containing the values of the variables asso ciated with the primal

solution

nzcnt An integer to hold the numb er of nonzero co ecients to b e added to the current for

mulation

ccnt An integer to hold the numb er of constraints to b e added to the current formulation

crst An arrayofintegers to hold the p ositions of the rst nonzero co ecients of the con

straints to b e added

cind An arrayofintegers to hold the indices of the nonzero co ecients of the constraints to

b e added

cco ef An array of doubles to hold the values of the nonzero co ecients of the constraints to

b e added

csense An arrayofcharacters to hold the senses of the constraints to b e added

crhs An array of doubles to hold the right hand sides of the constraints to b e added

ctyp e An arrayofintegers to hold the typ es of the constraints to b e added ie GLOBAL or

LOCAL

cname An arrayofcharacter p ointers to hold the names of the constraints to b e added

sdim An integer containing the length of the arrays crst csense crhs and ctyp e

ldim An integer containing the length of the arrays cind and cco ef

For reasons having to do with memory management the application has to allo cate the memory

using callo c to hold the name asso ciated with a constraint MINTO will free that memory after it

has installed the name in its internal administration

The following example shows how appl constraints can b e used to develop a cutting plane algo

rithm based on minimal covers for knapsack constraints

ECONSC

include stdioh

include mintoh

define INDEXIJ

I n J I J J

applconstraints

unsigned

applconstraints id zlp xlp zprimal xprimal nzcnt ccnt cfirst

cind ccoef csense crhs ctype cname sdim ldim

int id identification of active minto

double zlp value of the LP solution

double xlp values of the variables

double zprimal value of the primal solution

double xprimal values of the variables

int nzcnt variable for number of nonzero coefficients

int ccnt variable for number of constraints

int cfirst array for positions of first nonzero coefficients

int cind array for indices of nonzero coefficients

double ccoef array for values of nonzero coefficients

char csense array for senses

double crhs array for right hand sides

int ctype array for the constraint types LOCAL or GLOBAL

int cname array for the names

int sdim length of small arrays

int ldim length of large arrays

int i j k n

double diff

ccnt

nzcnt

inqform n infoformformvcnt

for i i n i

for j j n j

forkk nk

if i j i k j k

diff xlpINDEXij xlpINDEXjk xlpINDEXki

if diff EPS

cfirstccnt nzcnt

cindnzcnt INDEXij

ccoefnzcnt

cindnzcnt INDEXjk

ccoefnzcnt

cindnzcnt INDEXki

ccoefnzcnt

csenseccnt L

crhsccnt

ctypeccnt GLOBAL

if ccnt sdim nzcnt ldim

goto EXIT

EXIT

cfirstccnt nzcnt

return ccnt SUCCESS FAILURE

delconstraints appl

This function allows the application to delete one or more of the previously generated constraints

from the activeformulation ie the formulation currently loaded in the LPsolver It has to re

turn either FAILURE in which case MINTO assumes that no constraints have to b e deleted and it

therefore ignores the parameters ccnt and cind or SUCCESS in which case MINTO assumes the

constraints have to b e deleted and that these constraints are available through the parameters ccnt

and cind

parameters

id An integer containing the identication of the active MINTO copy

ccnt An integer to hold the numb er of constraints to b e deleted from the activeformulation

cind An arrayofintegers to hold the indices of the constraints to b e deleted from the active

formulation

Note that constraints are deleted from the active formulation Therefore indices are considered to

b e relative to the active formulation Note also that it is only p ossible to delete previously generated

constraints either by MINTO or by the application It is not p ossible to delete constraints from the

initial formulation

The following example shows how appl delconstraints can b e used to examine all active con

straints every tenth iteration and delete all the constraints whose slack is greater than a certain

TOLERANCE MINTO will ignore all indices referring to constraints from the initial formulation

EDELCONSC

include stdioh

include mintoh

define TOLERANCE

static int lpcounter

appldelconstraints

unsigned

appldelconstraints id ccnt cind

int id identification of active minto

int ccnt variable for number of constraints to be deleted

int cind array for indices of the constraints to be deleted

int i

if lpcounter

return FAILURE

else

ccnt

for i i lpccnt i

if lpslack i TOLERANCE lpslack i TOLERANCE

cindccnt i

return ccnt SUCCESS FAILURE

terminateno de appl

This function allows the application to takeover control of tailingo detection and set the threshold

value used by MINTO to detect tailingo It has to return either NO in which case MINTO

assumes that the application do es not want to replace the default value of the threshold by its own

and it therefore ignores the parameter threshold or YES in which case MINTO assumes that the

application wants to replace the default value of the threshold by its own and that this value is

available through the parameter threshold If threshold is set to INF MINTO assumes that the

active problem is infeasible and that the no de can b e fathomed

parameters

id An integer containing the identication of the active MINTO copy

zlp A double containing the value of the LP solution

change A double containing the total change in the value of the LP solution over the last three

iterations

threshold A double to hold the threshold to b e used to detect tailingo

When MINTO pro cesses a no de it monitors the changes in the value of the LP solutions from

iteration to iteration If it detects that the total change in the value of the LP solution in the last

three iterations is less than p ercent ie times the value of the current LP solution it

forces MINTO to branch

The following example shows how appl terminateno de canbeusedtooverride MINTOs default

scheme and continue generating constraints as long as violated constraints are identied

ETERMNDC

include stdioh

include mintoh

applterminatenode

unsigned

applterminatenode id zlp change threshold

int id

double zlp

double change

double threshold

threshold

return YES

appl divide

This function allows the application to provide a partition of the set of solutions by either sp ec

ifying b ounds for one or more variables or generating one or more constraints or b oth It has

to return either FAILURE in which case MINTO assumes that the application wants to use the

default division scheme and it therefore ignores the parameters or SUCCESS in which case MINTO

assumes that the application constructed a partition whichisavailable through the parameters or

INSUFFICIENT signaling that more memory ie larger arrays is required to store the partition

in which case MINTO increases the available memory and calls the function again

parameters

id An integer containing the identication of the active MINTO copy

depth Alongcontaining the depth in the tree of the no de that has b een selected for evaluation

creation Alongcontaining the creation numb er of the no de that has b een selected for evaluation

zlp A double containing the value of the LP solution

xlp An array of doubles containing the values of the variables

zprimal A double containing the value of the primal solution

xprimal An array of doubles containing the values of the variables asso ciated with the primal

solution

ncnt An integer to hold the numb er of no des in the division

vcnt An arrayofintegers to hold the numberofvariables for which a b ound is sp ecied for

eachnode

vind An arrayofintegers to hold the indices of the variables for which a b ound is sp ecied

vtyp e An arrayofcharacters to hold the typ es of b ounds ie lower b ound L or upp er b ound

U

vvalue An array of doubles to hold the values of the b ounds

nzcnt An integer to hold the total numb er of nonzero co ecients in the constraints generated

for each no de

ccnt An arrayofintegers to hold the numb er of constraints generated for eachnode

crst An arrayofintegers to hold the p ositions of the rst nonzero co ecients of the con

straints generated

cind An arrayofintegers to hold the indices of the nonzero co ecients of the constraints

generated

cco ef An array of doubles to hold the values of the nonzero co ecients of the constraints

generated

csense An arrayofcharacters to hold the senses of the constraints generated

crhs An array of doubles to hold the right hand sides of the constraints generated

cname An arrayofcharacter p ointers to hold the names of the constraints to b e added

b dim An integer containing the length of the arrays vind vtyp e and vvalue

sdim An integer containing the length of the arrays ccnt crst csense and crhs

ldim An integer containing the length of the arrays cind and cco ef

The default division scheme partitions the set of solutions into twosetsby sp ecifying b ounds for

the integer variable with fractional part closest to In the rst set of the partition the selected

variable is b ounded from ab oveby the round down of its value in the current LPsolution In the

second set of the partition the selected variable is b ounded from b elowby the round up of its value

in the current LP solution Note that if the integer variable is binary this corresp onds to xing the

variable to zero and one resp ectively

Each no de of the branchandb ound tree also receives a unique identication This identication

consists of twonumb ers depth and creation Depth refers to the level of the no de in the branch

andb ound tree Creation refers to the total numb er of no des that have b een created in the branch

andb ound pro cess The ro ot no de receives identication

The two following examples showhow appl divide canbeusedtoimplement the default branching

scheme In the rst example the variable is xed by sp ecifying new b ounds In the second example

the variable is xed by sp ecifying new constraints

EDIVIDEC

include stdioh

include mathh

include mintoh

appldivide

unsigned

appldivide id depth creation zlp xlp zprimal xprimal

ncnt vcnt vind vtype vvalue

nzcnt ccnt cfirst cind ccoef csense crhs cname

bdim sdim ldim

int id identification of active minto

long depth identification depth

long creation identification creation

double zlp value of the LP solution

double xlp values of the variables

double zprimal value of the primal solution

double xprimal values of the variables

int ncnt variable for number of nodes

int vcnt array for number of variables

int vind array for indices of variables

char vtype array for type of bounds

double vvalue array for value of bounds

int nzcnt variable for number of nonzero coefficients

int ccnt array for number of constraints

int cfirst array for positions of first nonzero coefficients

int cind array for indices of nonzero coefficients

double ccoef array for values of nonzero coefficients

char csense array for senses

double crhs array for right hand sides

char cname array for names

int bdim size of bounds arrays

int sdim size of small arrays

int ldim size of large arrays

register int i

register double frac diff

int index

double mindiff double

for inqform i i infoformformvcnt i

if inqvar i NO infovarvarclass CONTINUOUS

frac xlpi floor xlpi

if frac EPS frac EPS

diff fabs frac

if diff mindiff

mindiff diff

index i

ncnt

vcnt

vcnt

vind index

vtype U

vvalue double

vind index

vtype L

vvalue double

ccnt

ccnt

return SUCCESS

EDIVIDEC

include stdioh

include mathh

include mintoh

appldivide

unsigned

appldivide id depth creation zlp xlp zprimal xprimal

ncnt vcnt vind vtype vvalue

nzcnt ccnt cfirst cind ccoef csense crhs cname

bdim sdim ldim

int id identification of active minto

long depth identification depth

long creation identification creation

double zlp value of the LP solution

double xlp values of the variables

double zprimal value of the primal solution

double xprimal values of the variables

int ncnt variable for number of nodes

int vcnt array for number of variables

int vind array for indices of variables

char vtype array for type of bounds

double vvalue array for value of bounds

int nzcnt variable for number of nonzero coefficients

int ccnt array for number of constraints

int cfirst array for positions of first nonzero coefficients

int cind array for indices of nonzero coefficients

double ccoef array for values of nonzero coefficients

char csense array for senses

double crhs array for right hand sides

double cname array for names

int bdim size of bounds arrays

int sdim size of small arrays

int ldim size of large arrays

register int i

register double frac diff

int index

double mindiff double

for inqform i i infoformformvcnt i

if inqvar i NO infovarvarclass CONTINUOUS

frac xlpi floor xlpi

if frac EPS frac EPS

diff fabs frac

if diff mindiff

mindiff diff

index i

ncnt

vcnt

vcnt

nzcnt

ccnt

ccnt

cfirst

cind index

ccoef double

csense L

crhs double

cfirst

cind index

ccoef double

csense G

crhs double

cfirst

return SUCCESS

appl rank

This function allows the application to sp ecify the order in which the no des of the branchand

b ound tree are evaluated It has to return either FAILURE in which case MINTO assumes that the

application wants to use the default rank function and it therefore ignores the parameter rank or

SUCCESS in which case MINTO assumes that the rank for the currentnodeisavailable through the

parameter rank or REORDER in which case MINTO assumes that the application has switched

to a dierent rank function In this case MINTO reorders the list of unevaluated no des Before

rank reordering each no de receives a new rank by successive calls to appl

parameters

id An integer containing the identication of the active MINTO copy

depth A long containing the depth in the branchandb ound tree of the no de that has b een

selected for evaluation

creation Alongcontaining the creation numb er of the no de that has b een selected for evaluation

zlp A double containing the value of the LP solution

zprimal A double containing the value of the primal solution

rank A double to hold the rank to b e asso ciated with the currentnode

The unevaluated no des of the branchandb ound tree are kept in a list The no des in the list are

in order of decreasing rank values When new no des are generated either by the default division

scheme or the division scheme sp ecied bythe appl divide function each of them receives a rank

value provided either by the default rank function or by the function provided bythe appl rank

function The rank value of the no de is used to insert it at the prop er place in the list of unevaluated

no des When a new no de has to b e selected MINTO will always take the no de at the head of the

list

The default rank function takes the LP value asso ciated with the no de as rank which results in

a b estb ound search of the branchandb ound tree

The following example shows how appl rank can b e used to implement the strategy that starts

with depthrst and switches to b estb ound as so on as a primal feasible solution has b een found

ERANKC

include stdioh

include mintoh

static unsigned switched FALSE

applrank

unsigned

applrank id depth creation zlp zprimal rank

int id identification of active minto

long depth node identification depth

long creation node identification creation

double zlp value of the LP solution

double zprimal value of the primal solution

double rank rank value

if switched TRUE

rank zlp

return SUCCESS

else

if zprimal EPS INF

rank double creation

return SUCCESS

else

rank zlp

switched TRUE

return REORDER

appl exit

This function provides the application with an entry p oint in the program to p erform some nal

actions MINTO ignores the return value

parameters

id An integer containing the identication of the active MINTO copy

zopt A double containing the value of the nal solution

xopt An array of doubles containing the values of the variables asso ciated with the nal

solution

If no solution vector exists the second parameter will b e NULL The following example shows how

exit can b e used to write the optimal solution to a log le and afterwards close the function appl

the log le

EEXITC

include stdioh

include mintoh

extern FILE fplog

applexit

unsigned

applexit id zopt xopt

int id identification of active minto

double zopt value of the final solution

double xopt values of the variables

int j

fprintf fplog OPTIMAL SOLUTION VALUE fn zopt

if xopt

fprintf fplog OPTIMAL SOLUTIONn

for inqform j j infoformformvcnt j

fprintf fplog xd fn j xoptj

fclose fplog

return CONTINUE

appl quit

This function provides the application with an entry p oint in the program to p erform some nal

actions if execution is terminated bya ctrlC signal MINTO ignores the return value

parameters

id An integer containing the identication of the active MINTO copy

zopt A double containing the value of the nal solution

xopt An array of doubles containing the values of the variables asso ciated with the nal

solution

If no solution vector exists the second parameter will b e NULL

Control Functions

MINTO provides more detailed control over the runtime b ehavior of MINTO through a set of

control functions Each of these control functions can b e called any time during the solution pro cess

and activates or deactivates one of the system functions

ctrl clique

This function activates or deactivates generation of clique constraints

parameters

indicator An unsigned integer to hold a status indicator that controls the generation of clique

constraints ie ON or OFF

ctrl implication

This function activates or deactivates generation of implication constraints

parameters

indicator An unsigned integer to hold a status indicator that controls the generation of implica

tion constraints ie ON or OFF

ctrl knap cov

This function activates or deactivates generation of lifted knapsackcovers

parameters

indicator An unsigned integer to hold a status indicator that controls the generation of lifted

knapsackcovers ie ON or OFF

ctrl gub cov

This function activates or deactivates generation of lifted GUB covers

parameters

indicator An unsigned integer to hold a status indicator that controls the generation of lifted

knapsackcovers ie ON or OFF

owcov ctrl

This function activates or deactivates generation of simple and extended generalized owcovers

parameters

indicator An unsigned integer to hold a status indicator that controls the generation of simple

and extended generalized owcovers ie ON or OFF

ctrl output

This function sets the output level

parameters

indicator An unsigned integer to hold the level of output to b e set ie or

MINTO also provides more detailed control over the runtime b ehavioroftheLPsolver through a

set of control functions Each of these control functions can b e called any time during the solution

pro cess and changes the parameters of the LPsolver For a precise denition of the meaning of the

parameters the user is referred to the manual of the LPsolver At the momentonlyavailable for

CPLEX based versions of MINTO

lpmetho d ctrl

This function selects the typ e of simplex algorithm that is used to solve the active formulation

parameters

selector An integer sp ecifying the typ e of simplex algorithm ie PRIMAL DUAL BARRIER

BARRIERCROSS HYBNETWORKPRIMAL or HYBNETWORKDUAL

Note that in the default setting MINTO solves the rst linear program with the primal simplex

metho d and all subsequent linear programs with the dual simplex metho d The barrier and network

metho ds are only available for the CPLEX Version and up The rst barrier metho d BARRIER

do es not p erform a crossover at the end and therefore do es not terminate with a basic solution

The second barrier metho d BARRIERCROSS do es p erform a crossover at the end and therefore

terminates with a basic solution The hybrid network metho ds extract an emb edded network call

the network optimizer to obtain an optimal basis to the network and then optimize the entire lin

ear program using a primal HYBNETWORKPRIMAL or dual HYBNETWORKDUAL simplex

metho d

ctrl lppresolve

This function indicates whether the presolver emb edded in the LP solver should b e activated or

deactivated

parameters CPLEX

selector An integer sp ecifying whether to activate or to deactivate the LP presolver ie PRE

SOLVE or NOPRESOLVE

Note that in the default setting of MINTO the presolver emb edded in the LP solver is not activated

ctrl lppricing

This function selects the pricing algorithm that is used to solve the activeformulation

parameters CPLEX

selector An integer sp ecifying the pricing algorithm ie REDUCED COST NORM

REDUCED COST HYBRID REDUCED COST STEEPEST EDGE or STEEP

EST EDGE SLACK NORMS

parameters CPLEX and up

algorithm An integer sp ecifying the typ e of simplex algorithm ie PRIMAL or DUAL

selector An integer sp ecifying the pricing algorithm ie for the primal simplex algorithm RE

DUCED COST REDUCED COST DEVEX DEVEX STEEPEST EDGE SLACK

DUAL NORMS or FULL and for the dual simplex algorithm AUTO STANDARD

STEEPEST EDGE STEEPEST EDGE SLACK or STEEPEST EDGE NORMS

lppricinglist ctrl

This function sets the size of the pricing list maintained by the LPsolver

parameters CPLEX

size An integer sp ecifying the size of the pricing list

ctrl lpp erturb const

This function sets the constant used the LPsolver when it p erturbs the active linear program

parameters CPLEX

value A double sp ecifying the value of the p erturbation constant

ctrl lpp erturbmetho d

This function selects the p erturbation metho d used by the LPsolver

parameters CPLEX

selector An integer sp ecifying the p erturbation metho d ie BEGINNING or AUTOMATIC

ctrl lprefactorfreq

This function sets the refactorization frequency

parameters CPLEX

freq An integer sp ecifying the frequency of refactorization

Bypass functions

MINTO provides advanced lowlevel control over the owofcontrol through a set of bypass functions

Each of these control functions can b e called any time during the solution pro cess and determines

whether or not certain system activities are carried out or not These functions aect the main ow

of control and should b e used very carefully

bypass lp

This function allows an application to bypass the solution of the active formulation

parameters

indicator An unsigned integer to hold a status indicator that controls the deactivation of the LP

solver ie ON or OFF

In branchandprice algorithms the initial formulation asso ciated with a no de is usually determined

only when the no de is selected for pro cessing as opp osed to when the no de is created The reason

is that manynewvariables mayhave b een created b etween the time the no de was created and the

time it is selected for pro cessing and that some of these variables have to b e deleted xed at zero

Note that bypassing the solution of the active LP do es not mean that there is no currentLP

solution The current LP solution do es exist and is equal to the last LP solution except in the case

a new no de has b een selected In the case a new no de has b een selected the value of the LP solution

is equal to the value of the LP solution asso ciated with the parent no de and the LP solution consists

of zero es for all variables

bypass fathom

This function allows an application to bypass the test to determine if the pro cessing of the current

no de can b e terminated

parameters

indicator An unsigned integer to hold a status indicator that controls the deactivation of the

fathom test ie ON or OFF

If an application program wants to evaluate the eect of some temp orary mo dications to the

active formulation on the LP solution the fathoming tests have to b e deactivated to make sure that

the application has the opp ortunity to undo the temp orary mo dications

bypass integral

This function allows an application to bypass the test to determine if the current LP solution is

integral

parameters

indicator An unsigned integer to hold a status indicator that controls the deactivation of the

integrality test ie ON or OFF

primal is intended to provide the application an opp ortunity to take a fractional The function appl

LP solution and use it to nd an integral solution Consequently when MINTO nds that the current

LP solution is integral it do es not call appl primalHowever there are also situations in which

an application maywanttotakeanintegral LP solution and use it to nd an improved integral

solution Note that if the integralitytestisbypassed the integrality test should b e incorp orated in

appl primal

Miscellaneous Functions

prob wrt

This function writes the active formulation ie the formulation currently loaded in the LPsolver

to a sp ecied le in MPSformat

parameters

fname Acharacter string sp ecifying the name of the le to which the active formulation should

b e written

prob can b e used to write the activeformulation to a le The following example shows how wrt

EWRITEC

include stdioh

include mintoh

WriteActive

void

WriteActive

wrtprob activemps

Calling MINTO recursively

In many branchandcut and branchandprice algorithms the separation and pricing problems are

themselves dicult mixed integer programs MINTO versions and up supp orts the development

of such algorithms since it can b e called recursively

Each time MINTO is called it checks to see if it is called recursively ie from within another

running copy of MINTO If MINTO has not b een called recursively it assigns itself the identication

If on the other hand it has b een called recursively it assigns itself the next available identication

ie the identication of the calling copy of MINTO plus one Consequently MINTOs identication

represents the depth of the recursion

The recursion depth gives users the opp ortunitytodevelop multiple customized versions of

MINTO at the same time The rst parameter passed to every application function is the identica

tion of the currently activecopy of MINTO This allows the implementation of application functions

that p erform dierent actions based up on the recursion depth as the following examples show

EINITC

include stdioh

include mintoh

applinit

unsigned

applinit id

int id

switch id

case

printf Initializing master problemn

break

case

printf Initializing subproblemn

break

default

printf ERROR in applinit id n

exit

return CONTINUE

ECONSC

include stdioh

include mintoh

applconstraints

unsigned

applconstraints id zlp xlp zprimal xprimal

nzcnt ccnt cfirst cind ccoef csense crhs ctype cname sdim ldim

int id identification of active minto

double zlp value of the LP solution

double xlp values of the variables

double zprimal value of the primal solution

double xprimal values of the variables

int nzcnt variable for number of nonzero coefficients

int ccnt variable for number of constraints

int cfirst array for positions of first nonzero coefficients

int cind array for indices of nonzero coefficients

double ccoef array for values of nonzero coefficients

char csense array for senses

double crhs array for right hand sides

int ctype array for the constraint types LOCAL or GLOBAL

char cname array for names

int sdim length of small arrays

int ldim length of large arrays

switch id

case

Invoke MINTO to solve the separation problem This assumes that

other application functions such as applmps have been set up

properly to define the separation problem

minto separation s

Print the solution

printf Optimal value separation problem fn infooptoptvalue

for i i infooptoptnzcnt i

printf Valued fn infooptoptixi infooptoptvali

The remainder of the code should interpret the solution and if

appropriate convert it to a violated inequality that can then be

passed back to MINTO

break

case

break

default

printf ERROR in applconstraints id n

exit

return CONTINUE

Direct access to the activeLP

When MINTO is used in co op eration with the CPLEX linear optimizer direct acces to the activeLP

is provided through p ointers minto env of typ e CPXENVptr and mintolp of typ e CPXLPptr

This feature adds a lot of exibility but should b e handled with extreme care b ecause direct changes

to the CPLEX database are not reected in MINTOs internal administration If at all p ossible the

application programmer is advised to makechanges using the functions provided by MINTO

The following example shows how to obtain the number of variables and constraints in the active

linear program directly from CPLEX

ELPC

include stdioh

include mintoh

include h

applnode

unsigned

applnode id depth creation zprimal xprimal ecnt gap

int id identification of active minto

int depth node identification depth

int creation node identification creation

double zprimal value of primal solution

double xprimal value of the variables

int ecnt number of evaluated nodes

double gap gap between primal and LP solution value

printf Number of variables in active lp dn CPXgetnumcols mintoenv mintolp

printf Number of constraints in active lp dn CPXgetnumrows mintoenv mintolp

return CONTINUE

Environmentvariables

MINTO provides some control over its activities through the use of environmentvariables Most of

the environmentvariables aect memory management and row management activities

MIOPERMS As a default MINTO assumes that the complete path of the MINTO p ermission

le is usretcmintop erms If the MIOPERMS environmentvariable exists MINTO assumes the

complete path of the MINTO p ermission le is given by the MIOPERMS environmentvariable

MIOSDIM MIOLDIM MIOBDIM MINTO tries to keep memory management fully within

MINTO Therefore the arrays passed to an application function to hold information to b e passed

back to MINTO have a xed length either sdim ldim or b dim These lengths can b e changed

by setting the corresp onding environmentvariable

MIOSTORAGE For eciency MINTO maintains all its data structures in internal memory Con

sequently MINTO requires a huge amountofinternal memory when for some problem instance

the branchandb ound tree gets really big Setting the environmentvariable MIOSTORAGE to

will direct MINTO to store part of its data structures externally to free up internal memory This

considerably reduces the maximum amount of memory in use at any time but it also increases the

running time exp eriments have indicated a mo derate increase of ab out p ercent

MIOROWSZ MIOCOLSZ MIONZSZ MIOCHARSZ For eciency CPLEX requires that

the memory necessary to store the active constraint matrix at anymoment during the solution pro

cess is allo cated at the start of the solution pro cess ie memory for the initial constraint matrix

as well as memory for rows and columns that may b e added during the solution pro cess Once

this memory has b een allo cated it cannot b e changed As MINTO supp orts branchandcut and

branchandprice algorithms it allo cates b esides the memory necessary to store the initial con

straint matrix memory for MIOROWSZ and MIOCOLSZ extra rows and columns MIONZSZ extra

nonzero co ecients and MIOCHARSZ extra row and column name characters These default sizes

can b e changed by setting the corresp onding environmentvariables For example if no columns will

b e generated then MIOCOLSZ can b e set to zero Do not set MIOCHARSZ to zero even if no

names are asso ciated with rows and columns b ecause CPLEX always stores the string termination

character n Default values are MIOROWSZ MIOCOLSZ MIONZSZ and

MIOCHARSZ

MIOCUTPOOLSZ MIOCUTDELBND Tocontrol the size of the activeformulation MINTO

monitors the dual variables asso ciated with all the global constraints that have b een generated dur

ing the solution pro cess either by MINTO or by an application note that MINTO only generates

global constraints and if the value of a dual variable has b een equal to zero implying the constraint

is inactive for ten consecutive iterations MINTO will deactivate the corresp onding constraint De

activating a constraint means deleting it from the activeformulation and storing it in the cut p o ol

Every time the activeformulation is solved and a new linear programming solution exists the con

straints in the cut p o ol will b e insp ected to see if any of them are violated by the current solution

If so these constraints will b e reactivated Reactivating a constraint means adding it to the active

formulation and deleting it from the cut p o ol The cut p o ol has a xed size and is maintained on

a rstinrstout basis ie if the p o ol overows the constraints that have b een in the p o ol the

longest will b e deleted As so on as a cut is deleted from the cut p o ol it can never b e reactivated

again The environmentvariable MIOCUTPOOLSZ sets the size of the p o ol default size is

The environmentvariable MIOCUTDELBND sets the the deactivation threshold default threshold

is

MIOCUTFREQ Another issue related to cut generation is the frequency with which an attempt

is made to generate cuts Obviously cut generation takes time and it may b e b enecial not to

p erform cut generation at every no de of the search tree The environmentvariable MIOCUTFREQ

sets the frequency with which an attempt is made to generate cuts default frequency is ie cut

generation at every no de

MIOPRIMALFREQ Determining primal feasible solutions is of crucial imp ortance for the p er

formance of branchandb ound algorithms MINTO uses a diving heuristic to try and nd feasible

solutions Obviously the diving heuristic takes time and it is therefore impractical to invokeitat

every no de of the search tree The environmentvariable MIOPRIMALFREQ sets the frequency

with which the diving heuristic is invoked default frequency is ie the diving heuristic invoked

every no des

DSPACE As a default MINTO creates a dspace of size OSL version only Setting the

environmentvariable DSPACE will direct MINTO to create a dspace of the size sp ecied by the

value of the environmentvariable DSPACE

Programming considerations

The include le mintoh is and should always b e included in all sources of application functions

since it contains constant denitions typ e denitions external variable declarations and function

prototyp es

The variables and arrays containing information ab out the LPsolution asso ciated with the active

formulation and information ab out the b est primal solution which are passed as parameters to the

application functions are the ones maintained by MINTO for its own use They should never b e

mo died they should only b e examined

MINTO allo cates memory dynamically for the arrays that are passed as parameters to an appli

cation function However from an application program p oint of view they are xed length arrays

When appropriate the current lengths of the arrays are also passed as parameters It is the re

sp onsibility of the application program to ensure that memory is not overrun MINTO will ab ort

immediately if it detects a memory violation

Test problems

The distribution of MINTO contains a set of test problems The main purp ose of the test

problems is to verify whether the installation of MINTO has b een successful However MINTOs

p erformance on this set of test problems also demonstrates its p ower as a general purp ose mixed

integer optimizer Table shows the problem characteristics Table shows the LP value the IP

value and the number of evaluated no des and total cpu time when MINTO is run in its default

setting These runs have b een made on an IBM RS mo del using CPLEX as LPsolver

Wehave observed variations in p erformance when running MINTO with OSL as LPsolver and when

under dierent architectures b ecause dierent branchandb ound trees are generated

NAME cons vars nonzeros cont bin int

EGOUT

VPM

FIXNET

KHB

SETAL

LSEU

BM

P

P

P

Table Characteristics of the test problems

NAME LP value IP value no des cpu secs

EGOUT

VPM

FIXNET

KHB

SETAL

LSEU

BM

P

P

P

Table Results for the test problems

Availabili ty and Future Releases

MINTO is available on SUN SPARC stations with either SunOS or Solaris as op erating system

IBM RS workstations HP Ap ollo workstations DEC Alpha workstations Silicon Graphics

workstations and on IBM compatible PCs with an Intel or higher pro cessor It runs on top of

CPLEX and on top of OSL and or on top of XPRESSMP version

MINTO is an evolutionary system and therefore version is not a nal pro duct We see the

development of MINTO as an evolutionary pro cess that should lead to a robust and exible mixed

integer programming solver Its mo dular structure makes it easy to mo dify and expand esp ecially

with regard to the addition of new information and application functions Therefore we encourage

the users of this release to provide us with comments and suggestions for future releases

Developments in future releases may include parallel implementations more ecient cut genera

tion routines additional classes of cuts explicit column generation routines b etter primal heuristics

and dierent strategies for getting upp er b ounds such as Lagrangian relaxation

References

GL Nemhauser MWP Savelsbergh GC Sigismondi MINTO a Mixed INTeger

Optimizer Oper Res Letters

MWP Savelsbergh Prepro cessing and Probing for Mixed Integer Programming Prob

lems ORSA J Comput

Z Gu GL Nemhauser MWP Savelsbergh Cover Inequalities for Linear Pro

grams Computation INFORMS J Comput

Z Gu GL Nemhauser MWP Savelsbergh Cover Inequalities for Linear Pro

grams Complexity INFORMS J Comput to app ear

Z Gu GL Nemhauser MWP Savelsbergh Cover Inequalities for Linear Pro

grams Algorithms in preparation

Z Gu GL Nemhauser MWP Savelsbergh SequenceIndependent Lifting Rep ort

LEC Georgia Institute of Technology

Z Gu GL Nemhauser MWP Savelsbergh Lifted FlowCover Inequalities for Mixed

Integer Programs Math Programming to app ear

J Linderoth MWP Savelsbergh A Computational Study of Search Strategies for

Mixed Integer Programming INFORMS J Comput to app ear

A Atamturk GL Nemhauser MWP Savelsbergh Using Conict Graphs in In

teger Programming European J Oper Restoappear

App endix A Inquiry functions

EUTILC

include mintoh

ifdef PROTOTYPING

void WriteFormulation void

char ConvertCClass int

char ConvertCType int

char ConvertCInfo int

char ConvertVClass int

char ConvertVInfo int

char ConvertStatus int

else

void WriteFormulation

char ConvertCClass

char ConvertCType

char ConvertCInfo

char ConvertVClass

char ConvertVInfo

char ConvertStatus

endif

WriteFormulation

WriteFormulation is an example of the use of the inquiry functions

provided by MINTO to access the formulation in the current node

of the branchandbound tree

void

WriteFormulation

int i j

printf nnCURRENT FORMULATIONn

printf NAME sn inqprob

printf OBJECTIVEn

for inqobj j j infoobjobjnz j

printf f dn infoobjobjcoefj infoobjobjindj

printf CONSTRAINTSn

for inqform i i infoformformccnt i

printf dn i

inqconstr i

if infoconstrconstrname

printf NAME sn infoconstrconstrname

else

printf NAME no namen

for j j infoconstrconstrnz j

printf f dn infoconstrconstrcoefj infoconstrconstrindj

printf SENSE cn infoconstrconstrsense

printf RHS fn infoconstrconstrrhs

printf CLASS sn ConvertCClass infoconstrconstrclass

printf TYPE sn ConvertCType infoconstrconstrtype

printf STATUS sn ConvertStatus infoconstrconstrstatus

printf INFO sn ConvertCInfo infoconstrconstrinfo

printf VARIABLESn

for i i infoformformvcnt i

printf dn i

inqvar i TRUE

if infovarvarname

printf NAME sn infovarvarname

else

printf NAME no namen

for j j infovarvarnz j

printf f dn infovarvarcoefj infovarvarindj

printf OBJ fn infovarvarobj

printf CLASS sn ConvertVClass infovarvarclass

printf STATUS sn ConvertStatus infovarvarstatus

printf LB fn infovarvarlb

printf UB fn infovarvarub

printf INFO LB sn ConvertVInfo infovarvarlbinfo

printf INFO UB sn ConvertVInfo infovarvarubinfo

if infovarvarvlb

printf VLB f dn

infovarvarvlbvlbval

infovarvarvlbvlbvar

else

printf NO VLBn

if infovarvarvub

printf VUB f dn

infovarvarvubvubval

infovarvarvubvubvar

else

printf NO VUBn

printf n

static char bsu BINSUMUB

static char bse BINSUMEQ

static char bsvu BINSUMVARUB

static char bsve BINSUMVAREQ

static char bsvu BINSUMVARUB

static char bsve BINSUMVAREQ

static char svu SUMVARUB

static char sve SUMVAREQ

static char vu VARUB

static char ve VAREQ

static char vl VARLB

static char mixu MIXUB

static char mixe MIXEQ

static char nbu NOBINUB

static char nbe NOBINEQ

static char abu ALLBINUB

static char abe ALLBINEQ

ConvertCClass

Convert the constraint class into a printable string

char

ConvertCClass class

int class

switch class

case BINSUMUB

return bsu

case BINSUMEQ

return bse

case BINSUMVARUB

return bsvu

case BINSUMVAREQ

return bsve

case BINSUMVARUB

return bsvu

case BINSUMVAREQ

return bsve

case SUMVARUB

return svu

case SUMVAREQ

return sve

case VARUB

return vu

case VAREQ

return ve

case VARLB

return vl

case MIXUB

return mixu

case MIXEQ

return mixe

case NOBINUB

return nbu

case NOBINEQ

return nbe

case ALLBINUB

return abu

case ALLBINEQ

return abe

static char local LOCAL

static char global GLOBAL

ConvertCType

Convert the constraint type into a printable string

char

ConvertCType type

int type

switch type

case LOCAL

return local

case GLOBAL

return global

static char original ORIGINAL

static char genminto GENERATEDBYMINTO

static char genbranch GENERATEDBYBRANCHING

static char genappl GENERATEDBYAPPL

ConvertCInfo

Convert the constraint status into a printable string

char

ConvertCInfo info

int info

switch info

case ORIGINAL

return original

case GENERATEDBYMINTO

return genminto

case GENERATEDBYBRANCHING

return genbranch

case GENERATEDBYAPPL

return genappl

static char cont CONTINUOUS

static char bin BINARY

static char integ INTEGER

ConvertVClass

Convert the variable class into a printable string

char

ConvertVClass class

int class

switch class

case CONTINUOUS

return cont

case BINARY

return bin

case INTEGER

return integ

static char modminto MODIFIEDBYMINTO

static char modbranch MODIFIEDBYBRANCHING

static char modappl MODIFIEDBYAPPL

ConvertVInfo

Convert the constraint status into a printable string

char

ConvertVInfo info

int info

switch info

case ORIGINAL

return original

case MODIFIEDBYMINTO

return modminto

case MODIFIEDBYBRANCHING

return modbranch

case MODIFIEDBYAPPL

return modappl

static char act ACTIVE

static char inact INACTIVE

static char del DELETED

ConvertStatus

Convert the constraint status into a printable string

char

ConvertStatus status

int status

switch status

case ACTIVE

return act

case INACTIVE

return inact

case DELETED

return del