Running AMPL via JAVA API on MAC OS X

27 views
Skip to first unread message

mat...@armorway.com

unread,
Jul 13, 2016, 2:59:47 PM7/13/16
to AMPL Modeling Language
Hello,

I recently installed AMPL for MAC OS X with the full 30 day trial license. AMPL seems to be installed correctly as I can launch AMPL from the command line and solve the default "diet.mod / diet.dat" problem. However when I use AMPL via the Java API to run FirstExample.java an error window pops up with:

"ampl quit unexpectedly.
Click to Reopen to open the application. Click Report to see more detailed information and send a report to Apple."

What is strange is that AMPL does actually seem to be solving the problem as it prints the output below to the console. I tried a bunch of the Java example files and seem to encounter the same error window whenever ampl.solve() gets called? Has any experienced similar issues when running AMPL Java on MAC OS X?

MINOS 5.51: optimal solution found.
13 iterations, objective 118.0594032
ObjectiveInstance is: 118.059403
Increased costs of beef and ham.
MINOS 5.51: optimal solution found.
0 iterations, objective 144.4157204
New objective value: 144.415720
Updated all costs
MINOS 5.51: optimal solution found.
1 iterations, objective 164.54375
New objective value: 164.543750
i1    |  val               
BEEF  |  10.0              
CHK   |  2.0               
FISH  |  2.0               
HAM   |  7.016447368421034 
MCH   |  10.0              
MTL   |  10.0              
SPG   |  6.655701754385968 
TUR   |  2.0               

index0  |  100*Buy[j]/(Buy[j].ub) 
BEEF    |  100.0                  
CHK     |  20.0                   
FISH    |  20.0                   
HAM     |  70.16447368421034      
MCH     |  100.0                  
MTL     |  100.0                  
SPG     |  66.55701754385967      
TUR     |  20.0   

Thanks in advance,
Matthew

Victor Zverovich

unread,
Jul 14, 2016, 2:42:30 PM7/14/16
to am...@googlegroups.com
What version of AMPL and OS X do you use?

Victor

--
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.
Reply all
Reply to author
Forward
0 new messages