Begin
This commit is contained in:
48
gyakorlatok/froccs_kieg_2.mod
Normal file
48
gyakorlatok/froccs_kieg_2.mod
Normal file
@ -0,0 +1,48 @@
|
||||
set Froccs;
|
||||
set Ingredients;
|
||||
var Sale {Froccs} >= 0, integer;
|
||||
|
||||
param HowMany {Froccs, Ingredients};
|
||||
param Price {Froccs};
|
||||
param Use {Ingredients};
|
||||
|
||||
s.t. UseIngredietns{i in Ingredients}:sum{f in Froccs}HowMany[f,i]*Sale[f] <= Use[i];
|
||||
maximize TotalIncome: sum{f in Froccs} Sale[f]*Price[f];
|
||||
|
||||
data;
|
||||
set Froccs:= kf, nf, hl, hm, vh, krf, sf, pf, hu, lf;
|
||||
set Ingredients:= Wine, Soda;
|
||||
|
||||
param HowMany:
|
||||
Wine Soda:=
|
||||
kf 1 1
|
||||
nf 2 1
|
||||
hl 1 2
|
||||
hm 3 2
|
||||
vh 2 3
|
||||
krf 9 1
|
||||
sf 1 9
|
||||
pf 6 3
|
||||
hu 4 1
|
||||
lf 1 4
|
||||
;
|
||||
|
||||
param Price:=
|
||||
kf 200
|
||||
nf 330
|
||||
hl 210
|
||||
hm 470
|
||||
vh 400
|
||||
krf 1500
|
||||
sf 300
|
||||
pf 900
|
||||
hu 600
|
||||
lf 250
|
||||
;
|
||||
|
||||
param Use:=
|
||||
Wine 1000
|
||||
Soda 1500
|
||||
;
|
||||
|
||||
end;
|
Reference in New Issue
Block a user