help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Re: [Help-glpk] reading Excel table into GLPK]


From: glpk xypron
Subject: Re: [Fwd: Re: [Help-glpk] reading Excel table into GLPK]
Date: Fri, 10 Dec 2010 23:10:28 +0100

Hello Christina,

> I am using Windows XP.
> unable to open libiodbc.so
looks like you are using a version of GLPK that was compiled with
Cytrix or MinGW (e.g. from gnuwin32.sourceforge.net/packages/glpk.htm).

Consider downloading GLPK for Windows from 
http://sourceforge.net/projects/winglpk/

Best regards

Xypron

> -------- Forwarded Message --------
> From: Christina Cignarale <address@hidden>
> Subject: Re: [Help-glpk] reading Excel table into GLPK
> Date: Fri, 10 Dec 2010 00:27:28 -0500
> 
> Hi Noli,
> 
> I am using Windows XP.  The Sodoku example did not work for me. The
> error I got when I ran that was 
> Reading ti ...
> unable to open libiodbc.so
> can't open the module
> 
> I'm using version 4.34 of GLPK. And the other parameters should be
> contained on the other sheets in that workbook.Thank you so much for
> your help. I am used to solving in AMPL and I do not have that much
> computer knowledge so it makes it hard sometimes to understand the
> instructions for GLPK.
> 
> Also, how would I post the complete log? The only way I know to copy a
> command prompt is to use print screen. Is there an easier way?
> 
> -Christina
> 
> On Fri, Dec 10, 2010 at 12:07 AM, Noli Sicad <address@hidden> wrote:
>         I think the error is pointing on "ODBC"
>         
>         Context: {NUTR, FOOD} >= 0; table f IN '...'...'...' NUTR <-
>         
>         
>         in
>         
>         param amt {NUTR,FOOD} >= 0;
>         
>         table f IN 'ODBC'
>         
>         
>         Have you run the Soduku excel example and got the right result?
>          Are
>         you using Windows XP or 7?
>         
>         BTW, where are the other parameters amt[i,j] and cost[1] tables
>         in the model?
>         
>         Please post the complete log start with "GLPSOL: GLPK LP/MIP
>         Solver,
>         v4.44" to the error
>         
>         Example:
>         
>         GLPSOL: GLPK LP/MIP Solver, v4.44
>         Parameter(s) specified in the command line:
>          --cover --clique --gomory --mir -m
>         EstateModel_sqlite3_1_Otago2_25.mod
>         Reading model section from
>         EstateModel_sqlite3_1_Otago2_25.mod...
>         EstateModel_sqlite3_1_Otago2_25.mod:803: warning: unexpected end
>         of
>         file; missing end statement inserted
>         803 lines were read
>         Reading tab...
>         Connected to SQLite 3.6.22 - Otago_p.sqlite
>         SELECT * FROM tblSpecies
>         Display statement at line 203
>         SPECIES:
>           '???'
>           FIR
>           OTH
>           RAD
>         ...
>         
>         Noli
>         
>         
>         On 12/10/10, Christina Cignarale <address@hidden>
>         wrote:
>         > The error I am receiving is:
>         > diettable.mod 16:argument expression has invalid type
>         >
>         > Context: {NUTR, FOOD} >= 0; table f IN '...'...'...' NUTR <-
>         >
>         > I also attached the excel file I am trying to read from.
>         >
>         > On Thu, Dec 9, 2010 at 10:03 PM, Christina Cignarale <
>         > address@hidden> wrote:
>         >
>         >> Hi,
>         >>
>         >> Thank everyone for your input. I put the table statement into
>         the model
>         >> file but, I am still getting an error. I was unsure how to
>         define part of
>         >> the statement for my problem. I referenced the soduku example
>         that is
>         >> posted. This is the model I am using
>         >>
>         >> set NUTR;
>         >> set FOOD;
>         >>
>         >> param cost {FOOD} > 0;
>         >> param f_min {FOOD} >= 0;
>         >> param f_max {j in FOOD} >= f_min[j];
>         >>
>         >> param n_min {NUTR} >= 0;
>         >> param n_max {i in NUTR} >= n_min[i];
>         >>
>         >> param amt {NUTR,FOOD} >= 0;
>         >>
>         >> table f IN 'ODBC'
>         >> 'Driver={Microsoft Excel Driver (*.xls)};dbq=newdiet.xls'
>         >> 'SELECT * FROM [Nutr$]'
>         >> NUTR <- [NUTR],n_min,n_max;
>         >>
>         >> var Buy {j in FOOD} >= f_min[j], <= f_max[j];
>         >>
>         >> minimize Total_Cost:  sum {j in FOOD} cost[j] * Buy[j];
>         >>
>         >> subject to Diet {i in NUTR}:
>         >>    n_min[i] <= sum {j in FOOD} amt[i,j] * Buy[j] <= n_max[i];
>         >>
>         >>
>         >> The highlited line is where I am getting the error. I know I
>         do not have a
>         >> WHERE statement but I was unsure how to include that.
>         >>
>         >>
>         >> Thank you for your help,
>         >> Christina
>         >>
>         >> On Mon, Dec 6, 2010 at 5:18 PM, Noli Sicad <address@hidden>
>         wrote:
>         >>
>         >>> Browse glpk-help archive [[1] about Excel and GLPK. It has
>         10 pages
>         >>> about Excel and MathProg.
>         >>>
>         >>> [1]
>         >>>
>        
> http://www.mail-archive.com/search?q=Excel&address@hidden&o=relevance&start=0
>         >>>
>         >>> Noli
>         >>>
>         >>>
>         >>>
>         >>> On 12/7/10, glpk xypron <address@hidden> wrote:
>         >>> > Hello Christina,
>         >>> >
>         >>> > please, have a look at
>         >>> > http://sourceforge.net/projects/winglpk/
>         >>> >
>         >>> > The distribution includes example files
>         >>> > glpk-4.44/examples/sql/sudoku_excel.mod and
>         >>> > glpk-4.44/examples/sql/sudoku_xls
>         >>> >
>         >>> > Please, read
>         >>> > http://en.wikibooks.org/wiki/GLPK/ODBC#Microsoft_Excel
>         >>> >
>         >>> > Best regards
>         >>> >
>         >>> > Xypron
>         >>>
>         >>
>         >>
>         >>
>         >> --
>         >> Christina Cignarale
>         >>
>         >
>         >
>         >
>         > --
>         > Christina Cignarale
>         >
>         
> 
> 
> 
> -- 
> Christina Cignarale
> 
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk

-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]