Originally posted by: CDN3_Daniel_Cramer
Dear Community,
I am working on my Master-Thesis and I got a problem to implement a model of the capacitated lot sizing problem. The backgroung: I try to optimize the purchasing behaviour of a company.
My problem is that I got the following message: "Operator not available for int => int"
The problemmarker says, it has something to do with the expression in the first constraint after the double dots ("b => 1")
The identifiers are all in German - sorry for that...
Code of the .mod:
float h = ...;
int p = ...;
int s = ...;
int n = ...;
int M = ...; tuple Material
{ string Nummer;
int Anforderungsmenge;
};
{Material
} Bedarf = ...;
{string
} Nummer =
{a | <a,b> in Bedarf
};
{
int
} Anforderungsmenge =
{b | <a,b> in Bedarf
};
int Bedarfgesamt[Nummer][Anforderungsmenge]; dvar int+ Bestand[Nummer][Anforderungsmenge]; dvar int+ Bestellmenge[Nummer][Anforderungsmenge]; dvar
boolean Bestellung[Nummer][Anforderungsmenge]; minimize sum(a in Nummer, b in Anforderungsmenge) (s * Bestellung[a][b] + h * Bestand[a][b] + p * Bestellmenge[a][b]); subject to
{ forall(a in Nummer, b in Anforderungsmenge : b => 1) Bestellmenge[a][b] == Bedarfgesamt[a][b] - Bestand[a][b-1] + Bestand[a][b]; forall(a in Nummer, b in Anforderungsmenge) Bestellmenge[a][b] - M*Bestellung[a][b] <= 0; forall (a in Nummer) Bestand[a][0] == Bedarfgesamt[a][0];
};
Code of the .dat:
n = 23; M = 6000; s = 100; h = 0.2; p = 10; Bedarf =
{ <
"123",0>, <
",20>, <",40>, <
",0>, <",20>, <
",0>, <",20>, <
",20>, <",120>, <
",0>, <",20>, <
",20>,<",1120>, <
",2>, <",20>, <
",230>, <",20>, <
",20>, <",20>, <
",20>, <",20>, <
",20>,<",0>, <
",20>, <",40>, <
",0>, <",20>, <
",0>, <",20>, <
",20>, <",120>, <
",0>, <",2320>,<
",20>, <",1120>, <
",2>, <",20>, <
",230>, <",20>, <
",320>, <",520>, <
",420>, <",20>, <
",120>};
};
The model express for the company, in which period an order should be done and also the demand of the product (there are 2 products (123 and 456)).
I also attached the mathematical model (the variables in the model do not match with those in the OPL-model, but the structure of the variables are nearly the same).
Maybe someone has a tip for me? Or should I explaine more? (Sry for my bad English)
Thanks for your help!
Greetings from Germany
#DecisionOptimization#OPLusingCPLEXOptimizer