Originally posted by: SystemAdmin
Hello together,
I don´t understand why I get the error for my constraint: " Name ``Name of constraint´´ already defined".
The modell looks like:
//Sets used as indexes
int lastClient=...;
range C= 1..lastClient;
//Parameters:
int L[C] =...; //lot size
int P[C] = ...; //price per lot
int T[C]=...; //transportation cost
int B=...; //maximal capacity
//Decision Variable
dvar float+ X[C];
//Expression
dexpr float income = sum (c in C) X[c]*(P[c]-T[c]*L[c]);
//Objective Function
maximize income;
constraint ctCapacity;
subject to {
ctCapacity: sum(c in C) X[c]*L[c]<= B; --> here I get the error like I explained above.
}
I hope you can help me, thank you.
regards,
Markus
#DecisionOptimization#MathematicalProgramming-General