ilp mpl - unibo.it · 2004. 1. 22. · Microsoft PowerPoint - ilp_mpl.ppt Author: alodi Created...
Transcript of ilp mpl - unibo.it · 2004. 1. 22. · Microsoft PowerPoint - ilp_mpl.ppt Author: alodi Created...
MPL-LE.1
n
m
bi i
cj j
aij i j
MPL-LE.2
j=1,n cj xj
j=1,n aij xj bi i m
xj j = n
MPL-LE.3
nmcj =
bi = aij =
MPL-LE.4
/* file CPLEX, formato LP */
MPL-LE.5
for ( j = 1; j <= n; j++ ) fprintf(fout, “+%d x%d “,a[i,j],j);fprintf(fout, “ >= %d \n”,b[i] );
}fprintf(fout,”END\n”);fclose(fout);
}
MPL-LE.6
MPL-LE.7
MPL-LE.8
MPL-LE.9
MPL-LE.10
MPL-LE.11
MPL-LE.12
DATAMODEL
MPL
SOLVER
MPL-LE.13
MPL-LE.14
MPL-LE.15
MPL-LE.16
MPL-LE.17
MPL-LE.18
MPL-LE.19
nutrients:= ;
foods:=
foods:=
->
MPL-LE.20
MPL-LE.21
MPL-LE.22
MPL-LE.23
MPL-LE.24
MPL-LE.25
MPL-LE.26
MinP:=
Required[nutrients] :=
Required1Required2 Required3 Required4 Required5Required6 Required7 Required8.
MPL-LE.27
A[foods,nutrients]:=DATAFILE(”input.dat");
A [foods,nutrients]=
EXCELRANGE(”input.xls",”foods");
MPL-LE.28
MPL-LE.29
MPL-LE.30
X[foods]
MultiVar[foods,nutrients] -> Y
MPL-LE.31
INTEGER.
BINARY.
INTEGER VARIABLES
MultiVar[foods,nutrients];
MPL-LE.32
MPL-LE.33
MIN MAX;
x1 x2
foods:cost*x
Cost foods,nutrients Y
MPL-LE.34
plain constraintsX 1 + X2 + X3
vector constraintsnutrients
foods:A*x required nutrients
MPL-LE.35
vector constraints
nutrients
foods nutrients
foods bread
MPL-LE.36
xj x(j+1) x(j+k) a
jh j j+k x a
j+k j kx x x x x x a
kkkk x j+kk a
MPL-LE.37
x1 MinP;
y_bound: < Y(1,1) < ;
MPL-LE.38
MPL-LE.39