Hello,
Please help me with the following issue.
I have the following tuples:
int NumNodes = 5; // Number of nodes
range Nodes = 1..NumNodes;
int Tmax = 5; // Number of periods
range T = 1..Tmax;
tuple TimeNode { //Defining a node replicated in time
key int node;
key int time;
}
{TimeNode} tnodes = { <n,t> | n in Nodes, t in T };
tuple Arcs{ /
key TimeNode FromNode; //node i
key TimeNode ToNode; // node j
}
{Arcs} arcs ={<<1,1>,<5,2>>,<<1,2>,<5,3>>,<<1,3>,<5,4>>,<<1,4>,<5,5>>.......};
My question is, how do I change tuple elements' position in a tuple, so that in output it gives:
<<5,2>,<1,1>>,<<5,3>,<1,2>>,<<5,4>,<1,3>>,<<5,5>,<1,4>> basically, so that the tuples within the tuple {Arcs} change their posiiton.
Thank you in advance for any support.
BR, Irina
------------------------------
Irina Tremaskina
------------------------------
#DecisionOptimization