Obergrenzen aktiviert

Nur die Werte, wo ampl gesagt hat "cannot hold" auskommentiert => Da brauchen wir mehr Daten
This commit is contained in:
Wurzelkoch 2019-11-29 15:58:38 +01:00
parent 6a54718df3
commit 62a0dbd3b4
3 changed files with 20 additions and 21 deletions

View file

@ -20,7 +20,7 @@ var total_pill_penalty = sum {z in ZUTATEN} max(menge[z]-pill_penalty[z,1],0)*pi
#Wenn die zutatenweise Obergrenze in pill_penalty[z,1] überschritten ist, werden Strafkosten für die Überschussmenge berechnet.
minimize gesamtpreis: kaufpreis + total_weight_penalty + total_pill_penalty;
subject to ugrenze {s in STOFFE}: rezeptwert[s] >= minwert[s];
#subject to ogrenze {s in STOFFE}: rezeptwert[s] <= maxwert[s];
subject to ugrenze {s in STOFFE}: rezeptwert[s] >= minwert[s]; #undefined renders 0 => no problem here
subject to ogrenze {s in STOFFE}: rezeptwert[s] <= maxwert[s]; #undefined should render Infinity here.
subject to omega_ratio_constraint: omega_ratio <= 6;

View file

@ -9,9 +9,9 @@ Fiber 30
Cholesterol 0
VitaminA 3333
VitaminB6 1.5
VitaminB12 3
#VitaminB12 3 #cannot hold
VitaminC 100
VitaminD 800
#VitaminD 800 #cannot hold
VitaminE 20.86
VitaminK 120
Thiamin 1.2
@ -19,22 +19,21 @@ Riboflavin 1.4
Niacin 16
Folate 400
PantothenicAcid 6
#Biotin 50
#Choline 1220
#Choline 1220 #not in swiss data
Calcium 1
Chloride 2.3
#Chromium 65
#Copper 1.25
Iodine 200
#Chromium 65 #not in swiss data
#Copper 1.25 #not in swiss data
#Iodine 200
Iron 14
Magnesium 420
#Manganese 3.5
#Molybdenum 75
#Manganese 3.5 #not in swiss data
#Molybdenum 75 #not in swiss data
Phosphorus 0.7
Potassium 3.5
Selenium 55
#Selenium 55 #cannot hold
Sodium 1.5
#Sulfur 2
#Sulfur 2 #not in swiss data
Zinc 11;
param maxwert:=
@ -42,21 +41,21 @@ VitaminA 10000
VitaminB6 100
VitaminC 2000
VitaminD 4000
VitaminE 1000
#VitaminE 1000 #cannot hold
Omega-3 20
Niacin 35
Folate 1000
#Folate 1000 #cannot hold
Choline 3500
Calcium 2.5
Chloride 3.6
#Copper 10
#Copper 10 #not in swiss data
Iodine 1100
Iron 45
#Manganese 11
#Molybdenum 2000
#Manganese 11 #not in swiss data
#Molybdenum 2000 #not in swiss data
Phosphorus 4
Selenium 400
Sodium 2.3
Zinc 40;
Sodium 2.3;
#Zinc 40;#cannot hold

View file

@ -1,4 +1,4 @@
Trinkwasser 0.01
Trinkwasser 10000
WeizenmehlT550 0.95
SojaDrinkNature 0.99
ZuckermaisKonserve 1.19