Good evening everyone,
I am currently trying to implement a mixed-integer programming model with column generation containing a master problem and a pricing problem.
These are my files which seem to be correct and have no errors ocurring when loaded seperately.
Master.dat (200 Bytes)
Master.mod (642 Bytes)
MasterPricing.run (1.4 KB)
Pricing.dat (386 Bytes)
Pricing.mod (2.2 KB)
The run-data is:
# Master problem
model Master.mod;
data Master.dat;
option solver cplex;
# Pricing problem
model Pricing.mod;
data Pricing.dat;
# Initialisierung und Lösen des Master-Problems
solve Master;
display y;
# Holen der Dualvariablen pi[k] aus dem Master-Problem
let {k in BATCHES} pi[k] := Dual[Batchzuteilung[k]];
# Iterative Lösung des Pricing-Problems und Update des Master-Problems
param max_iter integer > 0 default 10; # maximale Anzahl der Iterationen
param tol default 0.01; # Toleranz für die Lösung
param iter integer default 0;
repeat {
# Lösen des Pricing-Problems
solve Pricing;
display x, t, C, z;
# Update des Master-Problems basierend auf der Lösung des Pricing-Problems
let {k in BATCHES, w in SCHEDULES} a[k, w] := if z[k] == 1 then 1 else 0;
let {w in SCHEDULES} c[w] := reduzierte_Gesamtkosten;
# Lösen des Master-Problems erneut
solve Master;
display y;
# Holen der Dualvariablen pi[k] aus dem Master-Problem
let {k in BATCHES} pi[k] := Dual[Batchzuteilung[k]];
# Abbruchbedingung basierend auf Toleranz und Iterationen
let iter := iter + 1;
if iter >= max_iter then {
print "Maximale Anzahl der Iterationen erreicht.";
break;
}
if abs(reduzierte_Gesamtkosten) < tol then {
print "Lösung innerhalb der Toleranz erreicht.";
break;
}
}
# Anzeigen der endgültigen Lösung
display y, z, x, t, C;
However, when trying to load the run-file the following error occurs:
MasterPricing.run, line 11 (offset 185):
Master is not defined
context: solve >>> Master; <<<
Could you give me some pointers on why that is? Could the master and pricing files be wrong after all?
Many thanks in advance!