[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] Syntax bug: table data IN
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] Syntax bug: table data IN |
Date: |
Wed, 11 Jul 2018 01:23:03 +0300 |
On Tue, 2018-07-10 at 16:15 +0100, Miguel wrote:
> Good morning,
>
> I have been using GLPK with great satisfaction and success. Congratulations
> on the good job!
>
> I found a bug in GNU MathProg and read in one of the documents that this is
> the email to report it to. Page 42 of the GNU MathProg reference mentions
>
> "set is the name of an optional simple set called control set. It can be
> omitted along with the delimiter <-;"
>
> It turns out that this set and the delimiter are mandatory, otherwise I get
> the error:
> delimiter <- missing where expected
>
> I posted on StackOverflow and no one answered, so I assume few people came
> across this issue:
> https://stackoverflow.com/questions/51231741/how-to-read-in-table-that-depends-on-two-sets-previously-defined/51268717#51268717
>
> I found a workaround, so fixing this bug is not urgent.
>
> Regards,
>
> Miguel Morin
>
>
>
>
Thank you for your bug report.
However I see no bug. The following example works for me:
---test.mod---
set V;
param d{V, V};
table data IN "CSV" "test.csv": [FROM, TO], d~DISTANCE;
display d;
data;
set V := Seattle San-Diego New-York Chicago Topeka;
end;
---test.csv---
FROM,TO,DISTANCE,COST
Seattle,New-York,2.5,0.12
Seattle,Chicago,1.7,0.08
Seattle,Topeka,1.8,0.09
San-Diego,New-York,2.5,0.15
San-Diego,Chicago,1.8,0.10
San-Diego,Topeka,1.4,0.07
Andrew Makhorin
- Re: [Bug-glpk] Syntax bug: table data IN,
Andrew Makhorin <=