I'm trying to define a structure to capture something like below:
set NODES := A B C;
set LINKS := (A,B) (B,C);
set PATHS := ((A,B))
((A,B), (B,C))
((B,C));
Nodes are a set. Links are a set of node pairs.
I am having trouble defining Paths as a set of sequences of links. I have not seen any solutions in the AMPL graph examples that make explicit use of paths, and I am wondering if there is a simple way to construct them?
Here are the definitions in my .mod file:
set NODES;
set LINKS within (NODES cross NODES);
set PATHS # ??? ;
Please help.