help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] symbolic parameter in set


From: Park, Joseph
Subject: [Help-glpk] symbolic parameter in set
Date: Wed, 15 Feb 2006 14:44:55 -0500

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 */
 
set Nodes, default {1..n};
/* set of nodes */
 
set Arcs, within Nodes cross Nodes;
/* set of arcs */
 
param capacity {(i,j) in Arcs}, > 0;
/* 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
       ....;

 
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
 
 
Thank you...
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]