AMPLOutputs

class AMPLOutputs extends ArrayList<AMPLOutput>

Represents a set of AMPL textual outputs (represented by a list of code AMPLOutput endcode )

Constructors

AMPLOutputs

AMPLOutputs(int i)

Constructor

Parameters:
  • i – Initial capacity

Methods

containsError

public boolean containsError()

Check whether the sequence contains an error of any kind

Returns:True if an error is present

containsErrorIgnorePresolve

boolean containsErrorIgnorePresolve()

Check whether the sequence contains an error of any kind BUT ‘error_presolve’

Returns:True if an error is present (but ‘error_presolve’)

containsErrorIgnorePresolveAndInvalidSubscripts

boolean containsErrorIgnorePresolveAndInvalidSubscripts()

Check whether the sequence contains an error of any kind BUT ‘error_presolve’

Returns:True if an error is present (but ‘error_presolve’)

containsString

public boolean containsString(String what)

containsWarning

public boolean containsWarning()

Check whether the sequence contains an error of any kind

Returns:True if an error is present

firstDisplayResultIndex

public int firstDisplayResultIndex()

Get the index of the first display message

Returns:Index of the display message, -1 if not existent

firstOfKind

public AMPLOutput firstOfKind(AMPLOutput.Kind kind)

Get the index of the first display message

Returns:Index of the display message, -1 if not existent

getErrors

public AMPLOutputs getErrors()

Get the errors in the sequence

Returns:Errors sequence, empty AMPLOutputs if none

getMessages

public String getMessages()

Get all messages in this output

Returns:Messages in the outputs here embedded

getMessages

public AMPLOutputs getMessages(String type)

Get messages of the specified type

Parameters:
  • type – Type of messages
Returns:

Filtered structure

toString

public String toString()

String representation (string concatenation of all the messages)