org.optimizationservices.oscommon.representationparser
Class OSaLWriter

java.lang.Object
  extended by org.optimizationservices.oscommon.representationparser.OSgLWriter
      extended by org.optimizationservices.oscommon.representationparser.OSaLWriter

public class OSaLWriter
extends OSgLWriter

The OSaLWriter class is used to construct an instance that follows the OSaL format.

Since:
OS 1.0
Version:
1.0, 03/14/2004
Author:
Robert Fourer, Jun Ma, Kipp Martin

Field Summary
 
Fields inherited from class org.optimizationservices.oscommon.representationparser.OSgLWriter
m_document
 
Constructor Summary
OSaLWriter()
          constructor.
 
Method Summary
 boolean addOtherAnalysis(java.lang.String name, java.lang.String value, java.lang.String description)
          Add an other analysis element.
static void main(java.lang.String[] argv)
          main for test purposes.
 boolean setAnalysisMessage(java.lang.String message)
          Set analysis message.
 boolean setAnalysisStatus(AnalysisStatus status)
          Set analysis status
 boolean setAnalysisTime(java.util.GregorianCalendar time)
          Set analysis time.
 boolean setConstraintAnalysis(ConstraintAnalysis constraintAnalysis)
          Set analysis of the constraints.
 boolean setConstraintNumber(int constraintNumber)
          Set the constraint number.
 boolean setInstanceAnalysis(InstanceAnalysis instanceAnalysis)
          Set analysis of the entire instance.
 boolean setInstanceName(java.lang.String instanceName)
          Set instance name.
 boolean setJobID(java.lang.String jobID)
          Set jobID.
 boolean setLinearConstraintCoefficientAnalysis(LinearConstraintCoefficientAnalysis linearConstraintCoefficientAnalysis)
          Set analysis of the linear constraint coefficients.
 boolean setNonlinearExpressionAnalysis(NonlinearExpressionAnalysis nonlinearExpressionAnalysis)
          Set analysis of the entire nonlinear expressions.
 boolean setObjectiveAnalysis(ObjectiveAnalysis objectiveAnalysis)
          Set analysis of the objectives.
 boolean setObjectiveNumber(int objectiveNumber)
          Set the objective number.
 boolean setOSAnalysis(OSAnalysis osAnalysis)
          set the OSAnalysis, a standard os analysis interface.
 boolean setOtherAnalyses(java.lang.String[] names, java.lang.String[] values, java.lang.String[] descriptions)
          set other analyses, with their names (required), descriptions (optional) and values (optional).
 boolean setQuadraticCoefficientAnalysis(QuadraticCoefficientAnalysis quadraticCoefficientAnalysis)
          Set analysis of the entire quadratic coefficients.
 boolean setServiceName(java.lang.String serviceName)
          Set service name.
 boolean setServiceURI(java.lang.String serviceURI)
          Set service URI.
 boolean setVariableAnalysis(VariableAnalysis variableAnalysis)
          Set analysis of the variables.
 boolean setVariableNumber(int variableNumber)
          Set the variable number.
 
Methods inherited from class org.optimizationservices.oscommon.representationparser.OSgLWriter
getDocument, setDocument, writeToFile, writeToSring, writeToStandardOutput
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSaLWriter

public OSaLWriter()
constructor.

Method Detail

setOSAnalysis

public boolean setOSAnalysis(OSAnalysis osAnalysis)
                      throws java.lang.Exception
set the OSAnalysis, a standard os analysis interface.

Parameters:
osAnalysis - holds the standard os analysis interface.
Returns:
whether the OSAnalysis is set successfully.
Throws:
java.lang.Exception

setAnalysisStatus

public boolean setAnalysisStatus(AnalysisStatus status)
Set analysis status

Parameters:
status - holds the analysis status.
Returns:
whether the analysis status is set successfully.

setServiceURI

public boolean setServiceURI(java.lang.String serviceURI)
Set service URI.

Parameters:
serviceURI - holds the service URI.
Returns:
whether the service URI is set successfully.

setServiceName

public boolean setServiceName(java.lang.String serviceName)
Set service name.

Parameters:
serviceName - holds the service name.
Returns:
whether the service name is set successfully.

setInstanceName

public boolean setInstanceName(java.lang.String instanceName)
Set instance name.

Parameters:
instanceName - holds the instance name.
Returns:
whether the instance name is set successfully.

setJobID

public boolean setJobID(java.lang.String jobID)
Set jobID.

Parameters:
jobID - holds the jobID.
Returns:
whether the jobID is set successfully.

setAnalysisTime

public boolean setAnalysisTime(java.util.GregorianCalendar time)
Set analysis time.

Parameters:
time - holds the analysis time.
Returns:
whether the analysis time is set successfully.

setAnalysisMessage

public boolean setAnalysisMessage(java.lang.String message)
Set analysis message.

Parameters:
message - holds the analysis message.
Returns:
whether the analysis message is set successfully.

setVariableNumber

public boolean setVariableNumber(int variableNumber)
Set the variable number.

Parameters:
variableNumber - holds the number of variables
Returns:
whether the variable number is set successfully or not.

setObjectiveNumber

public boolean setObjectiveNumber(int objectiveNumber)
Set the objective number.

Parameters:
objectiveNumber - holds the number of objectives
Returns:
whether the objective number is set successfully or not.

setConstraintNumber

public boolean setConstraintNumber(int constraintNumber)
Set the constraint number.

Parameters:
constraintNumber - holds the number of constraints
Returns:
whether the constraint number is set successfully or not.

setInstanceAnalysis

public boolean setInstanceAnalysis(InstanceAnalysis instanceAnalysis)
Set analysis of the entire instance. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
instanceAnalysis - holds the analysis of the entire instance.
Returns:
whether the instanceAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setVariableAnalysis

public boolean setVariableAnalysis(VariableAnalysis variableAnalysis)
Set analysis of the variables. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
variableAnalysis - holds the analysis of the variables.
Returns:
whether the variableAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setObjectiveAnalysis

public boolean setObjectiveAnalysis(ObjectiveAnalysis objectiveAnalysis)
Set analysis of the objectives. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
objectiveAnalysis - holds the analysis of the objectives.
Returns:
whether the objectiveAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setConstraintAnalysis

public boolean setConstraintAnalysis(ConstraintAnalysis constraintAnalysis)
Set analysis of the constraints. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
constraintAnalysis - holds the analysis of the constraints.
Returns:
whether the constraintAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setLinearConstraintCoefficientAnalysis

public boolean setLinearConstraintCoefficientAnalysis(LinearConstraintCoefficientAnalysis linearConstraintCoefficientAnalysis)
Set analysis of the linear constraint coefficients. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
linearConstraintCoefficients - holds the analysis of the linear constraint coefficients.
Returns:
whether the linearConstraintCoefficientAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setQuadraticCoefficientAnalysis

public boolean setQuadraticCoefficientAnalysis(QuadraticCoefficientAnalysis quadraticCoefficientAnalysis)
Set analysis of the entire quadratic coefficients. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
quadraticCoefficientAnalysis - holds the analysis of the entire quadratic coefficients.
Returns:
whether the quadraticCoefficientAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setNonlinearExpressionAnalysis

public boolean setNonlinearExpressionAnalysis(NonlinearExpressionAnalysis nonlinearExpressionAnalysis)
Set analysis of the entire nonlinear expressions. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
nonlinearExpressionAnalysis - holds the analysis of the entire nonlinear expressions.
Returns:
whether the nonlinearExpressionAnalysis is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

setOtherAnalyses

public boolean setOtherAnalyses(java.lang.String[] names,
                                java.lang.String[] values,
                                java.lang.String[] descriptions)
set other analyses, with their names (required), descriptions (optional) and values (optional). Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
names - holds the names of the other analyses; it is required.
descriptions - holds the descriptions of the other analyses; null if none.
values - holds the values of the other analyses; null if none.
Returns:
whether the other anlysis information is set successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

addOtherAnalysis

public boolean addOtherAnalysis(java.lang.String name,
                                java.lang.String value,
                                java.lang.String description)
Add an other analysis element. Before this method is called, the setVariable(int), setObjective(int), setConstraint(int) methods have to be called first.

Parameters:
name - holds the name of the other analysis element. It is required.
value - holds the value of the other analysis element, empty String "" if none.
description - holds the description of the other analysis element, empty String "" if none.
Returns:
whether the other analysis element is added successfully.
See Also:
setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int)

main

public static void main(java.lang.String[] argv)
main for test purposes.

Parameters:
argv - command line arguments.