I am working on a splittable multicommodity flow problem, where each commodity can be split into $k$ orders. However, I don't know the value of $k$ in advance. Here is my code.
{string} nodes=...;
tuple Arc {
string fromnode;
string tonode; }
{Arc} arcs=...;
tuple Commodity{
key int no;
string origin;
string dest;
int due_time;
int departure_time;
}
{Commodity} commodities =...;
{Commodity} orders =...; // there is something wrong
Actually, the tuple"orders" should be a subset of "commodities". I mean "orders" share the same characteristics with "commodities", while I don't know the volume of each commodity and how many orders consist of one commodity. All of them should be calculated by MCF.
So how should I express "orders"? I also want to find a suitable index of orders, like:
dvar demand[c in commodities][k in orders]
dvar arrival_time[c in commodities][k in orders];