Hi,
let me help you with the syntax
range q=1..1;
range f=2..2;
tuple Arc {
string fromnode;
string tonode;
}//arcs between any two nodes
tuple Order{
{string} st_node;
{string} ed_node;
{string} m_nodes;
float volume;
float due_time;
}
Order orders[q]=[<{"A"},{"B"},{"C"},1,2>];// multi-commodity
{Arc} arc_orders[q]=[{<"A","B">}];// possible arcs of every order
tuple Service {
Arc a;
float dept_time;
float cost;
float traveling_time;
float distance; float transport_capacity;
float frequency;};
Service services[f] = [<<"A","B">,1,2,3,4,5,6>];
{string} se={"A","B"};
dvar int x[q][se][se];
dvar int y[f];
subject to
{
forall(s in f)// services tuple
forall(k in q)//orders tuple
forall(<i,j> in arc_orders[k])
sum(k in q)orders[k].volume*x[k][i][j] <= services[s].transport_capacity *y[s];
}
works fine
So do not hesitate to post your .mod and .dat so that other users can help you
regards
#DecisionOptimization#OPLusingCPLEXOptimizer