ampl / rAMPL

R API for AMPL
http://rAMPL.ampl.com
BSD 3-Clause "New" or "Revised" License
15 stars 8 forks source link

A typo in 'rAMPL/docs/source/getting-started.rst' #1

Closed qykong closed 5 years ago

qykong commented 6 years ago

Thanks for the nice AMPL R API :D The following line of code to add AMPL binary location to 'PATH' used ';' as the separator whereas the default separator for PATH on Unix is ':'. This raises “AMPL could not be started” error when creating AMPL class later on.

 Sys.setenv(PATH = paste(Sys.getenv("PATH"), "full path to the AMPL installation directory", sep = ";"))
fdabrandao commented 5 years ago

Thank you very much for reporting this issue. It has been addressed in the latest release. In order to provide the full path to the AMPL installation directory you can now do as follows (platform independent):

ampl <- new(AMPL, new(Environment, "full path to the AMPL installation directory"))

BTW, the same is now also possible to do in a similar way on all our other APIs for other languages as well.