Originally posted by: SystemAdmin
[elastik said:]
Hello Everyone,
i'm trying to implement the CVRPTW using ILOG CP optimizer.
Please take a look at the following extract from my code:
using CP;
...
{int} v= asSet(1..Cus + 2*Veh);
...
//Distance Matrix
float dist[i in v][j in v]=...;
/*Decision Variables*/
...
dvar int s[1..Cus + 2*Veh] in 1..Cus + 2*Veh;
...
//Objective Function
minimize(sum(i in v)dist[i,s[i]]);
subject to{
The programm runs very well with the variable "dist" defined as an integer.
But in order to run the programm with more realistic values, i am obliged
to define "dist" as a float variable. This leads to the following error messages:
CP cannot extract expression: dist[i][s[(i)]]
CP cannot extract expression: minimize sum(i in v)dist[(i)][(s[(i)])]
I would be very grateful if someone could help me out. Thanks.
Best Regards
elastik
#DecisionOptimization#OPLusingCPOptimizer