Download XPRESS-MP USER GUIDE

Transcript
DISKDATA
COPEN = copen.dat
But Coco can now consider closing one or both of the factories for one or more
quarters. If a factory is closed for a quarter then a fixed cost of only $20,000 is incurred
that quarter. If the factory is closed it cannot produce in that quarter.
We define some variables open(NFact,NT), which are 1 if factory f is open in period t,
else 0. These are binary (0/1) variables and are declared as such in the BOUNDS
section.
VARIABLES
open(NFact,NT)
.....
BOUNDS
open(f=1:NFact,t=1:NT) .BV.
! The open variables
! are binaries
The .BV. indicates that the open variables are binary variables. Incidentally, we can
declare integer variables in a similar way:
x(i=1:I) .UI. 6
! The x variables
! are general integers
This will declare the x variables as being integers taking one of the values 0,1,...,6.
However, this is not required in Coco’s model.
Allowing for the fact that we incur a cost of $20000 whether the factory is open or not
we get an increased cost of (COPEN(f)-20000) if open(f,t) is 1. As long as we
remember that we incur an additional fixed cost of $20000 per factory per quarter (i.e.,
20000*NFact*NT), we can model the increased fixed cost as an extra term in the
objective function:
-SUM(f=1:NFact,t=1:NT)(COPEN(f)-20000)*open(f,t)
and we have to modify the maximum production limit constraints to:
MXM(f=1:NFact,t=1:NT):
SUM(p=1:NProd)manuf(p,f,t) < MAXPROD(f)*open(f,t)
&
If open(f,t) is zero (i.e., the factory is closed) then all the manuf variables for that f and t
must be zero since each one is non-negative and their sum is 0. If open(f,t) is 1 (i.e., the
factory is open), then the total production is limited by MAXPROD(f), as before.
a
Running XPRESS-MP takes the now familiar form:
mp-model coco1
INPUT
but running mp-opt is slightly different as we now have a Mixed Integer
Programming (MIP) problem: