[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Loading matrix param from Excel table in GLPK
From: |
Rodolfo Grosso |
Subject: |
[Help-glpk] Loading matrix param from Excel table in GLPK |
Date: |
Fri, 10 Mar 2017 17:00:20 -0300 |
Hi,
I want to pass matrix values contained in excel file or csv to a
matrix parameter, for example, Excel table:
AGU CEN
ITU 5 6
PMO 7 8
So that I can read through the parameter traffic:
traffic[ITU,AGU]=5
traffic[PMO,AGU]=7
...
In the real case there are many values.
For this, I made the following code, but it did not work:
set C1;
set C2;
param traffic_st{C1,C2} >=0;
table data IN "CSV" "traffic_st1.csv":
[i ~ C1], {j in C2} <traffic_st[i,j] ~ (j)>;
and I define C2 in .dat file like:
set C2:=AGU CEN;
Thank you in advance for your help
Best regards.
Rodolfo
- [Help-glpk] Loading matrix param from Excel table in GLPK,
Rodolfo Grosso <=