[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] How to express a parameter matrix as a data block in MathPro
From: |
Yuri |
Subject: |
[Help-glpk] How to express a parameter matrix as a data block in MathProg? |
Date: |
Mon, 1 Apr 2019 23:50:11 -0700 |
User-agent: |
Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 |
I need to have a large tabulated parameter matrix, like this:
param m=7;
param F{1..m, 1..m, 1..m}; # tabulated function
I would like to define these numeric values in a data block (data; ...;
end;) in a separate file.
MathProg documentation http://gusek.sourceforge.net/gmpl.pdf doesn't
explain how to do this. It talks mostly about how to define sets, and
seems to focus on 2-dimensional data.
How to define values of F[i1,i2,i3]?
My simple attempt:
data;
F[0,0,0] = 0.0083987;
F[0,0,1] = 0.01222470;
F[0,0,2] = 0.05272440;
...
end;
failed:
my.data:2: syntax error in data section
Thank you,
Yuri
- [Help-glpk] How to express a parameter matrix as a data block in MathProg?,
Yuri <=