[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] second issue
From: |
Brady Hunsaker |
Subject: |
[Bug-glpk] second issue |
Date: |
Sun, 12 Jan 2003 17:23:16 -0500 |
User-agent: |
Mutt/1.3.22i |
The second issue comes from a bug report submitted to the Debian
package of GLPK. The bug report itself is at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175205
A user complains that while the following assignment works:
TCasualA[i,j] := table(i in Tattiche, j in Tattiche:
carica attacca circonda agguato ferma ritira:
carica, Cp2, ., Cp1, ., ., Cp3,
attacca, Cp2, Cp1, ., ., Cm1, Cp2/2,
circonda, ., Cp1, ., ., Cp2, Cm1/2,
agguato, Cp2, Cp1, Cm1, ., Cm1, Cm1/2,
ferma, Cp2, ., ., ., ., .,
ritira, ., 0/2, 0/2, Cm1/2, ., . );
The following alternative does not:
TCasualA[i,j] := table(i in Tattiche, j in Tattiche:
carica attacca circonda agguato ferma ritira:
carica Cp2 . Cp1 . . Cp3
attacca Cp2 Cp1 . . Cm1 Cp2/2
circonda . Cp1 . . Cp2 Cm1/2
agguato Cp2 Cp1 Cm1 . Cm1 Cm1/2
ferma Cp2 . . . . .
ritira . 0/2 0/2 Cm1/2 . . );
Cp1, Cp2, and Cm1 are parameters.
The problem is that GLPK interprets the first `.' as indicating a
suffix for Cp2. But parameters can't have suffixes, so GLPK exits on
error.
One solution is to make the documentation more clear by stating that
commas may be omitted only if following numerical constants or
periods. Then the second version above is clearly invalid input.
Another alternative is to change the way that designators are parsed
in glplan5.c. Instead of checking for a `.' always, it could only be
checked if the token is a variable. Then both versions above should
work.
Let me know how you'd like to deal with this so I can help Falk close
the bug report.
Thanks,
Brady
- [Bug-glpk] second issue,
Brady Hunsaker <=