[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] CSV buffer limits
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] CSV buffer limits |
Date: |
Thu, 18 Oct 2012 04:55:19 +0200 |
Hello Reginald,
in glpk-4.47/src/glpmpl06.c you find the following limitations:
#define CSV_FIELD_MAX 50
/* maximal number of fields in record */
#define CSV_FDLEN_MAX 100
/* maximal field length */
The following works:
# test1.mod writes csv
set I := {1..300};
set J := {1..20};
set K := {1..100};
param x{I,J,K} := Uniform01();
table to {i in I, j in J, k in K} OUT "CSV" "test.csv" :
i, j, k, x[i,j,k];
end;
" test2.mod reads csv
set I, dimen 3;
param x{I};
table ti IN "CSV" "test.csv" :
I <- [i,j,k], x;
printf "Number of values: %d\n", card(I);
printf "Average value: %f\n", (sum{(i,j,k) in I} x[i,j,k]) / card(I);
end;
Best regards
Xypron
-------- Original-Nachricht --------
> Datum: Wed, 17 Oct 2012 10:03:28 -0700 (PDT)
> Betreff: [Help-glpk] CSV buffer limits
> Are there limits on the dimensions of .csv input and output in gmpl? I
> don't see any mention of limits in the wiki or in the 4.45 gmpl.pdf file in
> the csv section, but I did notice a 100 character line length limit
> mentioned in the SQL section. I'm working w/ 3D arrays on the order of
> 300x20x100,
> so it would be easy to collide w/ buffer limits pretty much any way I
> organize the data.
>
> Thanks,
> Reg
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk