- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OptimizationSolution Class Reference

The OptimizationSolution Class. More...

`#include <OSResult.h>`

Collaboration diagram for OptimizationSolution:

[legend]
List of all members.

## Public Member Functions
| OptimizationSolution ()
| Default constructor.
| ~OptimizationSolution ()
| Class destructor.
bool | IsEqual (OptimizationSolution *that)
| A function to check for the equality of two objects.
bool | setRandom (double density, bool conformant)
| A function to make a random instance of this class.
| OptimizationSolution ()
| Default constructor.
| ~OptimizationSolution ()
| Class destructor.
## Public Attributes
int | targetObjectiveIdx
| the index of the objective function for which we are reporting solution information
bool | weightedObjectives
| a marker to track whether the objectives are weighted
OptimizationSolutionStatus * | status
| status is a pointer to an OptimizationSolutionStatus object associated with this optimization solution
std::string | message
| a message associated with this solution
VariableSolution * | variables
| variables holds the solution information for the variables
ObjectiveSolution * | objectives
| objectives holds the solution information for the objectives
ConstraintSolution * | constraints
| constraints holds the solution information for the constraints
OtherSolutionResults * | otherSolutionResults
| otherSolutionResults is a pointer to an OtherSolutionResults object that is associated with this optimization solution
int | numberOfOtherResults
| the number of other results associated with this solution
OptimizationSolutionStatus * | status
| status is a pointer to an OptimizationSolutionStatus object associated with this optimization solution
VariableSolution * | variables
| variables holds the solution information for the variables
ObjectiveSolution * | objectives
| objectives holds the solution information for the objectives
ConstraintSolution * | constraints
| constraints holds the solution information for the constraints
std::vector< OtherOptimizationResult * > | other
| other is a pointer to an array of OtherOptimizationResult objects associated with this optimization solution

## Detailed Description

The OptimizationSolution Class.

Author:
  Horand Gassmann, Jun Ma, Kipp Martin

Version:
  1.0, 03/14/2004

Since:
  OS 1.0

Remarks:
  A class for reporting the various components of an optimization solution.

Definition at line 1946 of file OSResult.h.

## Constructor & Destructor Documentation

OptimizationSolution::OptimizationSolution | ( |  | ) |

Default constructor.

Definition at line 902 of file OSResult.cpp.

OptimizationSolution::~OptimizationSolution | ( |  | ) |

Class destructor.

Definition at line 919 of file OSResult.cpp.

References status.

OptimizationSolution::OptimizationSolution | ( |  | ) |

Default constructor.

OptimizationSolution::~OptimizationSolution | ( |  | ) |

Class destructor.

## Member Function Documentation

bool OptimizationSolution::IsEqual | ( | OptimizationSolution * | that | ) |

A function to check for the equality of two objects.

Definition at line 5955 of file OSResult.cpp.

bool OptimizationSolution::setRandom | ( | double | density,
|  | bool | conformant |
| ) |  |  |

A function to make a random instance of this class.

Parameters:

  | density,: | corresponds to the probability that a particular child element is created
  | conformant,: | if true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" atrbutes and <XXX> children)

Definition at line 7664 of file OSResult.cpp.

References OSRand(), and targetObjectiveIdx.

Referenced by OptimizationResult::setRandom().

## Member Data Documentation

int OptimizationSolution::targetObjectiveIdx

the index of the objective function for which we are reporting solution information

Definition at line 1952 of file OSResult.h.

Referenced by setRandom(), and OSResult::setSolutionObjectiveIndex().

bool OptimizationSolution::weightedObjectives

a marker to track whether the objectives are weighted

Definition at line 1955 of file OSResult.h.

OptimizationSolutionStatus* OptimizationSolution::status

status is a pointer to an OptimizationSolutionStatus object associated with this optimization solution

Definition at line 1960 of file OSResult.h.

Referenced by ~OptimizationSolution().

std::string OptimizationSolution::message

a message associated with this solution

Definition at line 1963 of file OSResult.h.

VariableSolution* OptimizationSolution::variables

variables holds the solution information for the variables

Definition at line 1968 of file OSResult.h.

Referenced by OSResult::getBasisStatusEl(), OSResult::getBasisStatusNumberOfEl(), OSResult::getNumberOfOtherVariableResults(), OSResult::getOtherVariableResultEnumerationDescription(), OSResult::getOtherVariableResultEnumerationEl(), OSResult::getOtherVariableResultEnumerationNumberOfEl(), OSResult::getOtherVariableResultEnumerationValue(), main(), OSResult::setBasisStatus(), OSResult::setOtherOptionEnumeration(), OSResult::setPrimalVariableValues(), tempPrintArrays(), and OSrL2Gams::writeSolution().

ObjectiveSolution* OptimizationSolution::objectives

objectives holds the solution information for the objectives

Definition at line 1973 of file OSResult.h.

Referenced by OSResult::getBasisStatusEl(), OSResult::getBasisStatusNumberOfEl(), OSResult::getOtherObjectiveResultEnumerationDescription(), OSResult::getOtherObjectiveResultEnumerationEl(), OSResult::getOtherObjectiveResultEnumerationNumberOfEl(), OSResult::getOtherObjectiveResultEnumerationValue(), main(), OSResult::setBasisStatus(), OSResult::setObjectiveValues(), OSResult::setOtherOptionEnumeration(), and tempPrintArrays().

ConstraintSolution* OptimizationSolution::constraints

constraints holds the solution information for the constraints

Definition at line 1978 of file OSResult.h.

Referenced by OSResult::getBasisStatusEl(), OSResult::getBasisStatusNumberOfEl(), OSResult::getOtherConstraintResultEnumerationDescription(), OSResult::getOtherConstraintResultEnumerationEl(), OSResult::getOtherConstraintResultEnumerationNumberOfEl(), OSResult::getOtherConstraintResultEnumerationValue(), OSResult::setBasisStatus(), OSResult::setConstraintValues(), OSResult::setDualVariableValues(), OSResult::setOtherOptionEnumeration(), tempPrintArrays(), and OSrL2Gams::writeSolution().

OtherSolutionResults* OptimizationSolution::otherSolutionResults

otherSolutionResults is a pointer to an OtherSolutionResults object that is associated with this optimization solution

Definition at line 1983 of file OSResult.h.

int OptimizationSolution::numberOfOtherResults

the number of other results associated with this solution

Definition at line 1193 of file OSResult.h.

OptimizationSolutionStatus* OptimizationSolution::status

status is a pointer to an OptimizationSolutionStatus object associated with this optimization solution

Definition at line 1198 of file OSResult.h.

VariableSolution* OptimizationSolution::variables

variables holds the solution information for the variables

Definition at line 1206 of file OSResult.h.

ObjectiveSolution* OptimizationSolution::objectives

objectives holds the solution information for the objectives

Definition at line 1211 of file OSResult.h.

ConstraintSolution* OptimizationSolution::constraints

constraints holds the solution information for the constraints

Definition at line 1216 of file OSResult.h.

std::vector<OtherOptimizationResult*> OptimizationSolution::other

other is a pointer to an array of OtherOptimizationResult objects associated with this optimization solution

Definition at line 1221 of file OSResult.h.

The documentation for this class was generated from the following files:

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSResult.h
- /home/coin/SVN-release/OS-2.3.5/OS/v2.0/OSResult.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSResult.cpp
- /home/coin/SVN-release/OS-2.3.5/OS/v2.0/OSResult.cpp