> > I have a large linear programming problem to solve where the constraint
> matrix A in Ax<=b is sparse.
> > I defined:
> >
> > param A{i in 1..n, j in 1..m} default 0.0;
> >
> > So now in the data I would like to just define the non-zero values.
> >
> > How can I do that? How do I address each element?
> >
> > I tried
> >
> > data;
> > param A[2,3]:=5;
> > param A[6,1]:=2;
> >
> > Etc.
> >
> > But it does not work.
> >
> > Any ideas?
data;
param A := [2,3] 5 [6,1] 2;
There exist several formats to specify data for 2d arrays. For more
details please see the mathprog language reference (doc/gmpl.pdf) and
examples included in the glpk distribution (egypt.mod, train.mod, etc.).
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk