In
version 4.8 there is a nice example: maxflow.mod
regarding this example, how does one declare and assign a
symbolic (string) parameter within the Arcs
set?
i.e.,
I would like to assign a 'name' parameter to Arcs:
param
n, integer, >= 2;
/* number of nodes */
/* number of nodes */
set
Nodes, default {1..n};
/* set of nodes */
/* set of nodes */
set
Arcs, within Nodes cross Nodes;
/* set of arcs */
/* set of arcs */
param
capacity {(i,j) in Arcs}, > 0;
/* capacity[i,j] is capacity of arc (i,j) */
/* capacity[i,j] is capacity of arc (i,j) */
param
name, symbolic, {(i,j) in Arcs};
.....
data;
param
: Arcs : name capacity :=
1 2 arc1 14
1 4 arc2 23
1 2 arc1 14
1 4 arc2 23
....;
with
the line 23 as: param name, symbolic, {(i,j) in
Arcs};
I get:
Reading model section from
maxflow.mod...
maxflow.mod:23: syntax error in parameter statement
Context: ...city { ( i , j ) in Arcs } , > 0 ; param name , symbolic , {
Model processing error
maxflow.mod:23: syntax error in parameter statement
Context: ...city { ( i , j ) in Arcs } , > 0 ; param name , symbolic , {
Model processing error
Thank
you...
_______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
