Bob Fourer
4...@ampl.com
Bob Fourer
4...@ampl.com
> -----Original Message-----
> From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of
> Fatemeh R.
> Sent: Monday, February 27, 2012 1:45 PM
> To: AMPL Modeling Language
> Subject: [AMPL 5521] Re: error reading table with table handler odbc
>
> "xIs" was a typo when I pasted the line. I tried xlsx format to. the
> error is
> Error executing "read_table" command:
>
> Error reading table Foods with table handler odbc:
> ODBC is not available.
>
> is it enough to have ampltabl.dll or I should have some thing else to
> enable ODBC handler?
>
> Thanks,
> Fatemeh
>
> >
Hi,
I'm trying to work with a simple AMPL file that needs to load data from Excel and later write the output to Excel. I'm having a hard time with that and getting the following error:
Error at _cmdno 4 executing "read_table" command
(file ED.ampl, line 27, offset 685):
Error reading table General with table handler tableproxy:
Error with proxy table handler: could not load "ampltabl.dll".
ED.ampl file contains the following at the start of the script:
-------------------------------------------------------------------------------
model ED.mod;
option solver "C:\Program Files\CPLEX_Studio123\cplex\bin\x64_win64\cplexamp";
# Define the tables where the data is located
table General IN 'tableproxy' 'odbc' 'ED.xlsx': [], Tend, LsPen;
table Generators IN 'tableproxy' 'odbc' 'ED.xlsx': [GEN], Kmax, MC;
table Load IN 'tableproxy' 'odbc' 'ED.xlsx': [T], L, V;
# Import the data from the tables
read table General;
read table Generators;
read table Load;
solve;
--------------------------------------------------------------
Based on earlier posts, I've checked a few things with my system:
- I am running 64-bit AMPL on Windows Server 2008
- I am using 32-bit version of Excel
- I downloaded a 64-bit version of ampltabl.dll from here and renamed the file from ampltabl.dll, then put it in the same folder as ampl.exe
- I downloaded tableproxy32.exe and tableproxy64.exe from here and also put those in the same folder as ampl.exe.
Any suggestions? One thing I have not tried is reinstalling Office 2010 as a 64-bit version. If that would solve the problem, then I am open to doing it, but I was hoping for an easier fix.
Thanks!
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
To connect to 32-bit Excel or Access from 64-bit AMPL, put the following 3 files into your AMPL folder:
ampltabl.dll
ampltabl_64.dll
tableproxy32.exe
To get ampltabl.dll you will need to copy it out of the 32-bit AMPL distribution. The other two files are from the 64-bit AMPL distribution. (But you don't want tableproxy64.exe from the 32-bit distribution.)
Then substitute 'tableproxy' 'odbc' for 'ODBC' in your table statements, for example
table General IN 'tableproxy' 'odbc' 'ED.xlsx': ...
(which I believe you have already done). This has been tested to work properly, without any need for manual "load" statements or other adjustments.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of a..@lbl.gov
Sent: Thursday, February 28, 2013 11:06 PM
To: am...@googlegroups.com
Subject: Re: [AMPL 6698] Re: error reading table with table handler odbc
Thanks for the quick response:
I see that I'm a bit confused about how AMPL handles these different dll's and the tableproxy, so thanks for your patience.
I downloaded the 32-bit ampltabl.dll file and returned the 64-bit to its original naming (ampltabl_64.dll). Now when I run the script I get the following error:
Error at _cmdno 5 executing "read_table" command
(file ED.ampl, line 25, offset 640):
Error reading table General:
no acceptable table handler found.
When I type:
ampl: display _HANDLERS;
I get the following response:
set _HANDLERS := tab bit;
If I type:
ampl: load 'C:\Program Files\AMPL\ampltabl.dll';
Then I get:
Error executing "load" command:
Cannot load library C:\Program Files\AMPL\ampltabl.dll.
Presumably this is because I am running 64-bit AMPL and this is a 32-bit dll.
So if I then type:
ampl: load 'C:\Program Files\AMPL\ampltabl_64.dll';
ampl: display _HANDLERS;
I get:
set _HANDLERS := tab bit odbc tableproxy;
Progress!
So I added that line " load 'C:\Program Files\AMPL\ampltabl_64.dll';" to my script and run it again and now get the following:
Error at _cmdno 5 executing "read_table" command
(file ED.ampl, line 26, offset 686):
Error reading table General with table handler tableproxy:
Error with proxy table handler: could not load "ampltabl.dll".
That doesn't work either (and is infact the same error as I had seen earlier when I renamed the 'ampltabl_64.dll' file to 'ampltabl.dll'; but this time the 32-bit version is now named ampltabl.dll and the 64-bit version is ampltabl_64.dll) .
Two questions then:
(1) Why does ampltabl.dll fail to load automatically or even after I manually try to load it?
(2) Why does AMPL look for ampltabl.dll after I loaded ampltabl_64.ampl?
Again I think this has to do with the mismatch between 32-bit and 64-bit, so I should just try to get everything to work in 64bit.
Just out of curiosity, if I then remove the 'tableproxy' in the table creation commands in the script and run it again, I get:
Error at _cmdno 5 executing "read_table" command
(file ED.ampl, line 26, offset 649):
Error reading table General with table handler odbc:
ODBC is not available.
This probably indicates that AMPL is working with the ampltabl_64.dll fine, but that it is unable to communicate with the 32-bit ODBC drivers currently on the machine.
The next step I tried was to install the 64-bit ODBC drivers that you provided the link to. When I started that install, however, Windows saw that I already had 32-bit office installed and said I needed to remove that before installing the 64-bit ODBC driver.
So I am back to simply reinstalling all of my Office software in the 64-bit version. Based on these results, do you see anything else I could try before doing the re-installation? Thanks.
-A
It appears that the "ampltabl.dll" that comes with the 64-bit AMPL distribution is not the right one. We're in the process of deleting or fixing it, but meanwhile if you download "ampltabl.dll" from the 32-bit AMPL distribution and put that in your folder with the other AMPL files instead, you should not get this error message.
Also note that, for greatest reliability, it's best to use the .xlsx form of Excel files with this arrangement.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of p.alc...@gmail.com
Sent: Tuesday, May 28, 2013 5:10 PM
To: am...@googlegroups.com
Cc: 4...@ampl.com
Subject: Re: [AMPL 7067] Re: error reading table with table handler odbc
Dear Bob:
Hi,
I´m just starting with AMPL, and trying to learn how to read data from Excel.
I'm having the same trouble as the guys above, trying to connect to 32-bit Excel from 64-bit AMPL. Same as them, I got the error message:
Error reading table Student with table handler odbc:
ODBC is not available.
I downloaded the tableproxy32.exe file and made sure that the 3 files you mention above are in the folder. I also substituted 'tableproxy' 'odbc' for 'ODBC' in my table statements.
Then, the error message changed:
Error reading table Student with table handler tableproxy:
Error with proxy table handler: could not load "ampltabl.dll".
But I already made sure that file is in the folder. What should I do next? Do I need to load something manually?
Many thanks for your help,
Pilar.
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/wUgDrqZ_PmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
In the first line, ampl.tab identifies this as an AMPL relational table text file, and is followed by the numbers of key and non-key columns, respectively.
set S dimen 2;param A{S};param B{S};table test: S <- [t1, t2], A, B;read table test;display A, B;
: A B :=1 3001 0.120812 0.1208121 3002 0.130329 0.130329...;
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/wUgDrqZ_PmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
ampl: print _handler_desc['tab'];Builtin file.tab (ASCII table) handler: at most one string(the file name, ending in ".tab") expected before ":[...]";table_name.tab is assumed if there are no strings.
table CA20140822tab IN "test.tab": S <- [uimplan, vimplan], SAMimplan;
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/wUgDrqZ_PmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
You have a floating license with current maintenance for ampl, cplex*, gurobi*, knitro, minos, and xpress*.
*Expiring 20150731.
You also have an expired trial floating license for ampl and knitro.
Victor;Try to copy file ampltabl.dll into /usr/local/bin/amplbut somehow it causes another problem with error message for my "FLOATING LICENCE"-bash: /usr/local/bin/ampl: Permission deniedAny thought?
On Mon, Oct 27, 2014 at 4:06 PM, victor.z...@gmail.com <victor.z...@gmail.com> wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/wUgDrqZ_PmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
Looks like the file diet.tab you are trying to read is in incorrect format (possibly a missing newline at the end of file or an incomplete file).HTH,Victor
On Tue, Sep 9, 2014 at 7:38 PM, <yih...@gmail.com> wrote:
Try to read in the table using "tab" format. It did not get through with the following error message.Error executing "read_table" command:Error reading table diet with table handler tab:Error reading file diet.tab:early end of file on partial line 10.
On Monday, June 3, 2013 7:49:12 AM UTC-7, AMPL Optimization wrote:The 64-bit AMPL distribution has been updated to fix the problem with
ampltabl.dll. To use 32-bit Office with 64-bit AMPL, you can now follow the
directions in the Microsoft Windows section at www.ampl.com/NEW/TABLES.
Bob Fourer
am...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
ampl: include GL2010MILP_firms.run;
CPLEX 12.6.2.0: integer unbounded ray.
336 MIP simplex iterations
0 branch-and-bound nodes
I thought there is a finite number of combination of integer variables and unbounded ray is not likely according to previous posted message. Any comments will be helpful.
Thanks.
ampl: include GL2010MPEC_firms.run;
Presolve eliminates 23 constraints and 8 variables.
Substitution eliminates 8 variables.
"option presolve 1;" used.
Adjusted problem:
36 variables:
9 nonlinear variables
27 linear variables
31 constraints, all linear; 97 nonzeros
11 equality constraints
20 inequality constraints
20 complementarity conditions among the constraints:
20 linear, 0 nonlinear.
1 nonlinear objective; 9 nonzeros.
KNITRO 8.1.1: 6 linear definitional constraints eliminated (14 fills)
2 nonlinear definitional constraints eliminated
2 unused
Nonsquare complementarity system:
31 complementarities including 11 equations
36 variables
error running knitro:
termination code 11
Knitro 10.0.0: 6 linear definitional constraints eliminated (14 fills)
2 nonlinear definitional constraints eliminated
2 unused
Nonsquare complementarity system:
31 complementarities including 11 equations
36 variables
error running knitro:
termination code 11
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.