[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] using multi-dimensional data files
From: |
Laura Firth |
Subject: |
[Help-glpk] using multi-dimensional data files |
Date: |
Mon, 8 Sep 2003 16:31:08 +0800 |
I have been using glpk (the GLPSOL solver) using the GNU MathProg modelling
language and am trying to use a data file with more than two dimensions. I
have tried using the following code:
set A;
set G;
set R;
set H;
set B;
param d{a in A, g in G, r in R, b in B} >=0;
*** rest of capacity problem
end;
*** new file for data:
data;
set A := 1 2 3 4;
set G := 1 2;
set R := 1330 1310;
set H := 102 255 99999;
set B := acc_emerg icu ccu;
param d[a,g,r,b] := data( a in A, g in G, r in R, b in B:
4 2 1330 ccu 7
3 2 1330 icu 10
2 1 1330 acc_emerg 15
);
*** other parameters
end;
and I get the error message:
analysis/capacity_data.txt:10: d requires numeric data
Context: ...acc_emerg icu ccu ; param d [ a , g , r , b ] := data
Model processing error
Do you know where I am going wrong, or another way I can do this? This is
just an extract from the data and the real file is quite long, so I don't
want to have to do too much re-arranging if possible.
Thanks for your help,
Laura
- [Help-glpk] using multi-dimensional data files,
Laura Firth <=