[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] String literal too long
From: |
xypron |
Subject: |
Re: [Help-glpk] String literal too long |
Date: |
Sun, 22 Mar 2009 12:26:09 -0700 (PDT) |
Hello Yaron,
Yaron Kretchmer-2 wrote:
>
> Hi All
> I'm getting a "String literal too long" error from glpsol when giving a
> (admittedly very long, but still valid) file path
> *table tab_results{f in F:x[f]>0} OUT "CSV"
> "YesImaverylongpathbutthatsOKfortheoperatingsystemsowhyisntitokforglpk.csv"
> :
> *
> **
> Is that because i'm violating some built-in max length setting? If so,
> what
> is it , can I change it , and if so, where ?
>
The maximum length of a symbol is defined in include/gmpl.h to be 100
characters.
#define MAX_LENGTH 100
/* maximal length of any symbolic value (this includes symbolic names,
numeric and string literals, and all symbolic values that may appear
during the evaluation phase) */
The following model following your example solved without a problem because
the
string length of the file name is "only" 73 characters.
set F := {1..3};
param x{f in F} := 3;
solve;
table tab_results{f in F:x[f]>0} OUT "CSV"
"YesImaverylongpathbutthatsOKfortheoperatingsystemsowhyisntitokforglpk.csv"
:
f;
Best regards
Xypron
--
View this message in context:
http://www.nabble.com/String-literal-too-long-tp22643593p22649552.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.