AMPLProcess¶
-
class
AMPLProcess¶ An AMPL process.
Fields¶
env¶
-
Environment
env¶
interpreter¶
-
volatile AMPLOutputInterpreter
interpreter¶
pInput¶
-
protected OutputStream
pInput¶
pOutput¶
-
protected InputStream
pOutput¶
pb¶
-
protected ProcessBuilder
pb¶
Constructors¶
AMPLProcess¶
-
protected
AMPLProcess(Environment env, Engine engine)¶
Methods¶
create¶
-
public static AMPLProcess
create(Environment env, Engine engine)¶ Starts an AMPL process (class factory, generates process which is platform dependent)
createProcessBuilder¶
-
protected ProcessBuilder
createProcessBuilder()¶
getAMPLVersion¶
-
int
getAMPLVersion()¶ Returns the ampl version as an integer, getting it from the underlying AMPL interpreter
Parameters: - amplPath – Path to ampl executable
- env – Environment
Throws: - ReadException –
- IOException –
Returns: AMPL version. If OptiRisk AMPL, the returned integer is negative. So (version <0) returns true if it is an OptiRisk AMPL (it embeds AMPLSIG in windows versions) and abs(version) returns the actual version number
interpretAndReturn¶
-
void
interpretAndReturn(String s, OutputHandler output)¶
interpretAndReturn¶
-
AMPLOutputs
interpretAndReturn(String s)¶
interpretAsync¶
-
void
interpretAsync(String s, Runnable over, OutputHandler output)¶