Follow us on Twitter and LinkedIn to get the latest updates from the dev team!
This class provides access to the environment variables and provides facilities to specify where to load the underlying AMPL interpreter.
Get the platform dependent name of the path environment variable. To append a directory to current list of system paths, follow the snippet below:
path
Environment e = new Environment(); String paths = e.get(Environment.PATH); e.put(Environment.PATH, paths + java.io.File.pathSeparatorChar + "/mynewpath");
Note that changing the paths in this way has effect only until the underlying AMPL process is started (in the AMPL constructor).
AMPL
Default constructor, just copies the values of the current system environment variables. Expects the AMPL binary in a directory included in the system paths list or in the default position (which is APIJARLOCATION/ampl)
Permits the user to specify a custom location for the AMPL executable.
binDir – Directory to search the AMPL executable in
Permits the user to specify a custom location and name for the AMPL executable.
binName – Name of the AMPL executable if other than “ampl”
Returns the directory containing the overriding AMPL executable directory.
Returns the name of the AMPL executable.
Returns the path to the current working directory.
Sets the directory in which the AMPL executable is located. Does not perform any check regarding whether the AMPL executable in there is working or not.
exePath – Path to the AMPL executable (without file name)
Sets the name of the AMPL executable. Does not perform any check regarding whether the AMPL executable in there is working or not.
exeName – Name of the AMPL executable
previous
DataFrame
next
ErrorHandler