www.ampl.com/MEETINGS/TALKS/2011_08_Zurich_TC22.pdf
It shows two different ways of finding multiple solutions to a MIP involving
zero-one variables -- not for the shortest-path model, but readily
adaptable. For a small problem you ought to be able to use one of these
approaches to find all solutions.
Bob Fourer
4...@ampl.com
> -----Original Message-----
> From: am...@googlegroups.com [mailto:am...@googlegroups.com]
> On Behalf Of Anna
> Sent: Thursday, February 09, 2012 10:32 AM
> To: AMPL Modeling Language
> Subject: [AMPL 5443] Selecting the path out of the set of paths
>
> Hello,
>
> my problem is following:
>
> set V; # set of nodes;
> set arc within {i in V, j in V: i<>j}; # set of arcs between
nodes;
> set P; # set of paths;
> set E{s in S} within arc; # sequence of arcs in each paths;
> set N{s in S} within V; # set of nodes, which belong to the path s;
>
>
> set D; # set of demands for transit from i to j;
>
> param orig{D} within V; # origin of a demand;
> param dest{D} within V; # destination of a demand;
> set Link{d in D} := {orig[d]} cross {dest[d]};
>
> can I search for all paths that satisfy demand d with origin and
> destination (orig[d], dest[d])?? or if the path goes through i=orig[d]
> and j=dest[d]?? And then select these paths and create a set of
> possible paths for each demand d?
>
> ...
Perhaps you want to solve the first problem with the first objective, fix
the Use variables at their optimal values, and then solve the second problem
with the second objective. Then you need to give some AMPL commands to
define two separate problems and do two separate solves, such as these:
problem ShortestPath: Use, Total_Cost_Path, Start, Trans, End;
problem PathFlow: f, Total_Cost_Flow, DemandSatisfaction;
solve ShortestPath;
solve PathFlow;
In general you will need a little script of this sort to define any scheme
that involves more than one optimization.
Bob Fourer
4...@ampl.com
> -----Original Message-----
> From: am...@googlegroups.com [mailto:am...@googlegroups.com]
> On Behalf Of Anna
> Sent: Monday, February 13, 2012 11:35 AM
> To: AMPL Modeling Language