--
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 https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Thanks Filipe
I still had a problem with these strings however I noticed I had looked at the 64 bit ODBC data sources. The 32 bit driver version is 5.2 - when I use this instead of 5.3 the connection is successful and the data is retrieved successfully from MySQL.
However an "ampl.exe has stopped working" message appears when AMPL attempts to solve. I have inserted the "log_file" option in the run file but nothing is written to the log file.
The versions of AMPL and CPLEX I am using are:
Thanks Filipe
I still had a problem with these strings however I noticed I had looked at the 64 bit ODBC data sources. The 32 bit driver version is 5.2 - when I use this instead of 5.3 the connection is successful and the data is retrieved successfully from MySQL.
However an "ampl.exe has stopped working" message appears when AMPL attempts to solve. I have inserted the "log_file" option in the run file but nothing is written to the log file.
The versions of AMPL and CPLEX I am using are:
AMPL Version 20171122 (MS VC++ 10.0, 32-bit) and CPLEX 12.6.0.0
The .mod files contains:
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;
param amt {NUTR,FOOD} >= 0;
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 <= sum {j in FOOD} amt[i,j] * Buy[j] <= n_max;
Hi Filipe
Apologies for the delay in responding but I was not available yesterday,
After changing to the .dat file there is no problem. I then changed back to the MySQL import and it is working! I do not know what is now different but clearly this is good news for me. If I experience the problem again I will let you know, but many thanks for looking into the "problem".
Best regards, Graham
On Wed, Mar 21, 2018 at 2:52 PM UTC, <am...@googlegroups.com> wrote:
Hi Filipe
A supplementary question if I may - given that AMPL can import data from a table in a MySQL database, can AMPL also import data from a View?
Thanks and best regards, Graham
On Mon, Mar 19, 2018 at 10:39 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Hi Graham,
If you load the data from a .dat file instead of loading from the database, does this error still occur? Are there any error messages printed to the console?
Best regards,
Filipe
--
Filipe Brandão
am...@googlegroups.com