40 lines
781 B
Plaintext
40 lines
781 B
Plaintext
|
# GLPK model file created by SUN for RO teaching
|
||
|
|
||
|
|
||
|
############################### Model ###############################
|
||
|
|
||
|
|
||
|
############################### Sets ###############################
|
||
|
|
||
|
set CIMENTS;
|
||
|
|
||
|
set MACHINES;
|
||
|
|
||
|
################### Variables ###################
|
||
|
|
||
|
var Q{i in CIMENTS}, >=0;
|
||
|
# or binary ?;
|
||
|
|
||
|
################### Constants: Data to load #########################
|
||
|
|
||
|
param benefparciment{i in CIMENTS};
|
||
|
|
||
|
param capacite{i in MACHINES};
|
||
|
|
||
|
param dureefab{i in MACHINES, j in CIMENTS};
|
||
|
|
||
|
################### Constraints ###################
|
||
|
|
||
|
|
||
|
s.t. RespectCapaciteDeChaqueMachine{j in MACHINES}:
|
||
|
sum{i in CIMENTS} dureefab[j,i] * Q[i] = capacite[j];
|
||
|
|
||
|
|
||
|
###### Objective ######
|
||
|
|
||
|
maximize BeneficeTotal:
|
||
|
sum{i in CIMENTS} Q[i]* benefparciment[i];
|
||
|
|
||
|
|
||
|
end;
|