[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] [Fwd: MathProg model processing error: field CPT missing
From: |
Michael Bramley |
Subject: |
Re: [Help-glpk] [Fwd: MathProg model processing error: field CPT missing in input table] |
Date: |
Tue, 28 Aug 2012 11:00:43 -0400 |
Maybe you have mistyped CST when you meant CPT?
Just a thought...
Michael Bramley
tel: +1 513 632 0549
www.dunnhumby.com
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Andrew Makhorin
Sent: Tuesday, August 28, 2012 3:20 AM
To: address@hidden
Subject: [Help-glpk] [Fwd: MathProg model processing error: field CPT missing
in input table]
-------- Forwarded Message --------
From: Robert Schroeder <address@hidden>
To: address@hidden
Subject: MathProg model processing error: field CPT missing in input
table
Date: Tue, 28 Aug 2012 02:06:59 -0500
Hi,
I'm having trouble reading data from an input table. Funny thing is I
get the same basic error no matter if I use a CSV file or an Access
table (via ODBC). I'm very new to GLPK and the modelling language, so
perhaps I'm missing a key point, but I'm able to fill other Sets and
Parameters using the same approach.
Here's my model (InputError.mod):
set MC dimen 2;
set CITY;
set MFG;
param Mcost {CITY, MFG};
table mcost IN "CSV" "tblMFGFreight1.csv":
MC <- [ CITY, MFG ], Mcost ~ CST;
display Mcost;
#table mcost IN "ODBC"
# 'DRIVER={Microsoft Access Driver (*.mdb)};dbq=glpk.mdb'
# 'tblMFGFreight' :
# MC <- [ CITY , MFG ], Mcost ~ CPT;
end;
Here's the resultI get trying to read from a CSV file:
>C:\Software\gusek\glpsol.exe --cover --clique --gomory --mir -m
"InputError.mod"
GLPSOL: GLPK LP/MIP Solver, v4.47
Parameter(s) specified in the command line:
--cover --clique --gomory --mir -m InputError.mod
Reading model section from InputError.mod...
14 lines were read
Reading mcost...
InputError.mod:6: field CST missing in input table
MathProg model processing error
>Exit code: 1 Time: 0.222
And here's what I get when I try to read from an Access database:
>C:\Software\gusek\glpsol.exe --cover --clique --gomory --mir -m
"InputError.mod"
GLPSOL: GLPK LP/MIP Solver, v4.47
Parameter(s) specified in the command line:
--cover --clique --gomory --mir -m InputError.mod
Reading model section from InputError.mod...
15 lines were read
Reading mcost...
Connected to ACCESS 04.00.0000 - .\glpk
SELECT CITY, MFG, CPT FROM tblMFGFreight
InputError.mod:10: field CPT missing in input table
MathProg model processing error
>Exit code: 1 Time: 0.225
So I get the same error. Like I said, all my other inputs are working
fine, it just craps out on this data table. It can't seem to find the
CPT field. Not sure if it will make it, but I've attached the csv file
I'm trying to read.
I'm running on Windows 7, 32 bit.
Thanks,
Rob
The contents of this message and any attachments to it are confidential and may
be legally privileged.
If you have received this message in error you should delete it from your
system immediately and advise the sender.
dunnhumby may monitor and record all emails. The views expressed in this email
are those of the sender and not those of dunnhumby.