I have added xBASE table support to the GNU MathProg language. To make it working please replace file src/glpmpl05.c in glpk 4.26 by a new version (see the attachment) and then rebuild the package as usual.
To read/write .dbf files in MathProg models the first argument passed
to the table driver should be specified as "xBASE" and the second
argument should contain corresponding file name. For the output table
there should be the third argument specifying the table format in the
form "FF...F", where F is either C(n), which specifies a character
field of length n, or N(n[,p]), which specifies a numeric field of
length n and precision p (by default p is 0). Below here is a simple
example which illustrates creating and reading a .dbf file.
------------------------------------------------------------------------
table tab1{i in 1..10} OUT "xBASE" "foo.dbf" "N(5)N(10,4)C(1)C(10)":
2*i+1 ~ B, Uniform(-20,+20) ~ A, "?" ~ FOO, "[ " & i & " ]" ~ C;
set S, dimen 4;
table tab2 IN "xBASE" "foo.dbf" : S <- [ B, C, RECNO, A ];
display S;
end;
------------------------------------------------------------------------
Andrew Makhorin
glpmpl05.c.gz
Description: GNU Zip compressed data
_______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
