#include <OSResult.h>
Collaboration diagram for OSResult:
Public Member Functions | |
OSResult () | |
Default constructor. | |
~OSResult () | |
Class destructor. | |
GeneralStatus * | getGeneralStatus () |
Get the general status. | |
std::string | getGeneralStatusType () |
Get the general status type, which can be: success, error, warning. | |
std::string | getGeneralStatusDescription () |
Get the general status description. | |
std::string | getServiceName () |
Get service name. | |
std::string | getServiceURI () |
Get service uri. | |
std::string | getInstanceName () |
Get instance name. | |
std::string | getJobID () |
Get the job id. | |
std::string | getGeneralMessage () |
Get the general message. | |
int | getTimeNumber () |
Get the number of time measurements. | |
double | getTimeValue () |
Get the time measurement. | |
std::vector< IndexValuePair * > | getOptimalPrimalVariableValues (int solIdx) |
Get one solution of optimal primal variable values. | |
double | getOptimalObjValue (int objIdx, int solIdx) |
Get one solution of optimal objective values. | |
std::vector< IndexValuePair * > | getOptimalDualVariableValues (int solIdx) |
Get one solution of optimal dual variable values. | |
OptimizationSolutionStatus * | getSolutionStatus (int solIdx) |
Get the [i]th optimization solution status, where i equals the given solution index. | |
std::string | getSolutionStatusType (int solIdx) |
Get the [i]th optimization solution status type, where i equals the given solution index. | |
std::string | getSolutionStatusDescription (int solIdx) |
Get the [i]th optimization solution status description, where i equals the given solution index. | |
std::string | getSolutionMessage (int solIdx) |
Get the [i]th optimization solution message, where i equals the given solution index. | |
int | getVariableNumber () |
Get variable number. | |
int | getObjectiveNumber () |
Get objective number. | |
int | getConstraintNumber () |
Get constraint number. | |
int | getSolutionNumber () |
get the number of solutions. | |
int | getNumberOfOtherVariableResults (int solIdx) |
Get numberOfOtherVariableResult. | |
int | getAnOtherVariableResultNumberOfVar (int solIdx, int iOther) |
Get getAnOtherVariableResultNumberOfVar. | |
bool | setGeneralStatus (GeneralStatus *status) |
Set the general status. | |
bool | setGeneralStatusType (std::string type) |
Set the general status type, which can be: success, error, warning. | |
bool | setGeneralStatusDescription (std::string description) |
Set the general status description. | |
bool | setGeneralMessage (std::string message) |
Set the general message. | |
bool | setServiceName (std::string serviceName) |
Set service name. | |
bool | setServiceURI (std::string serviceURI) |
Set service uri. | |
bool | setInstanceName (std::string instanceName) |
Set instance name. | |
bool | setJobID (std::string jobID) |
Set job id. | |
bool | setTime (double time) |
Set time. | |
bool | addTimingInformation (std::string type, std::string category, std::string unit, std::string description, double value) |
Add timing information. | |
bool | setTimeNumber (int timeNumber) |
Set the number of time measurements. | |
bool | setVariableNumber (int variableNumber) |
Set the variable number. | |
bool | setObjectiveNumber (int objectiveNumber) |
Set the objective number. | |
bool | setConstraintNumber (int constraintNumber) |
Set the constraint number. | |
bool | setSolutionNumber (int number) |
set the number of solutions. | |
bool | setSolutionStatus (int solIdx, std::string type, std::string description) |
Set the [i]th optimization solution status, where i equals the given solution index. | |
bool | setSolutionTargetObjectiveIdx (int solIdx, int objectiveIdx) |
Set the [i]th optimization solution's objective index, where i equals the given solution index. | |
bool | setSolutionMessage (int solIdx, std::string msg) |
Set the [i]th optimization solution's message, where i equals the given solution index. | |
bool | setNumberOfPrimalVariableValues (int solIdx, int n) |
Set the [i]th optimization solution's number of primal variable values, where i equals the given solution index. | |
bool | setPrimalVariableValuesSparse (int solIdx, std::vector< IndexValuePair * > x) |
Set the [i]th optimization solution's primal variable values, where i equals the given solution index. | |
bool | setPrimalVariableValuesDense (int solIdx, double *x) |
Set the [i]th optimization solution's primal variable values, where i equals the given solution index. | |
bool | setNumberOfOtherVariableResults (int solIdx, int numberOfOtherVariableResults) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index. | |
bool | setAnOtherVariableResultSparse (int solIdx, int otherIdx, std::string name, std::string value, std::string description, int *idx, std::string *s, int n) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index. | |
bool | setAnOtherVariableResultDense (int solIdx, int otherIdx, std::string name, std::string value, std::string description, std::string *s) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index. | |
bool | setNumberOfObjectiveValues (int solIdx, int n) |
Set the [i]th optimization solution's number of objective values, where i equals the given solution index. | |
bool | setObjectiveValuesSparse (int solIdx, std::vector< IndexValuePair * > x) |
Set the [i]th optimization solution's objective values, where i equals the given solution index. | |
bool | setObjectiveValuesDense (int solIdx, double *objectiveValues) |
Set the [i]th optimization solution's objective values, where i equals the given solution index. | |
bool | setNumberOfDualVariableValues (int solIdx, int n) |
Set the [i]th optimization solution's number of dual variable values, where i equals the given solution index. | |
bool | setDualVariableValuesSparse (int solIdx, std::vector< IndexValuePair * > x) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index. | |
bool | setDualVariableValuesDense (int solIdx, double *y) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index. | |
bool | setConstraintValuesDense (int solIdx, double *constraintValues) |
Set the [i]th optimization solution's constraint values, where i equals the given solution index. | |
OSResult () | |
Default constructor. | |
~OSResult () | |
Class destructor. | |
GeneralStatus * | getGeneralStatus () |
Get the general status. | |
std::string | getGeneralStatusType () |
Get the general status type, which can be: success, error, warning. | |
std::string | getGeneralStatusDescription () |
Get the general status description. | |
std::string | getServiceName () |
Get service name. | |
std::string | getServiceURI () |
Get service uri. | |
std::string | getInstanceName () |
Get instance name. | |
std::string | getJobID () |
Get the job id. | |
std::string | getGeneralMessage () |
Get the general message. | |
int | getTimeNumber () |
Get the number of time measurements. | |
double | getTimeValue () |
Get the time measurement. | |
double * | getOptimalPrimalVariableValues (int objIdx) |
Get one solution of optimal primal variable values. | |
double * | getOptimalDualVariableValues (int objIdx) |
Get one solution of optimal dual variable values. | |
OptimizationSolutionStatus * | getSolutionStatus (int solIdx) |
Get the [i]th optimization solution status, where i equals the given solution index. | |
std::string | getSolutionStatusType (int solIdx) |
Get the [i]th optimization solution status type, where i equals the given solution index. | |
std::string | getSolutionStatusDescription (int solIdx) |
Get the [i]th optimization solution status description, where i equals the given solution index. | |
std::string | getSolutionMessage (int solIdx) |
Get the [i]th optimization solution message, where i equals the given solution index. | |
int | getVariableNumber () |
Get variable number. | |
int | getObjectiveNumber () |
Get objective number. | |
int | getConstraintNumber () |
Get constraint number. | |
int | getSolutionNumber () |
get the number of solutions. | |
int | getNumberOfOtherVariableResults (int solIdx) |
Get numberOfOtherVariableResult. | |
bool | setGeneralStatus (GeneralStatus *status) |
Set the general status. | |
bool | setGeneralStatusType (std::string type) |
Set the general status type, which can be: success, error, warning. | |
bool | setGeneralStatusDescription (std::string description) |
Set the general status description. | |
bool | setGeneralMessage (std::string message) |
Set the general message. | |
bool | setServiceName (std::string serviceName) |
Set service name. | |
bool | setServiceURI (std::string serviceURI) |
Set service uri. | |
bool | setInstanceName (std::string instanceName) |
Set instance name. | |
bool | setJobID (std::string jobID) |
Set job id. | |
bool | setTime (double time) |
Set time. | |
bool | addTimingInformation (std::string type, std::string category, std::string unit, std::string description, double value) |
Add timing information. | |
bool | setTimeNumber (int timeNumber) |
Set the number of time measurements. | |
bool | setVariableNumber (int variableNumber) |
Set the variable number. | |
bool | setObjectiveNumber (int objectiveNumber) |
Set the objective number. | |
bool | setConstraintNumber (int constraintNumber) |
Set the constraint number. | |
bool | setSolutionNumber (int number) |
set the number of solutions. | |
bool | setSolutionStatus (int solIdx, std::string type, std::string description) |
Set the [i]th optimization solution status, where i equals the given solution index. | |
bool | setSolutionObjectiveIndex (int solIdx, int objectiveIdx) |
Set the [i]th optimization solution's objective index, where i equals the given solution index. | |
bool | setNumberOfPrimalVariableValues (int solIdx, int n) |
Set the [i]th optimization solution's number of primal variable values, where i equals the given solution index. | |
bool | setPrimalVariableValues (int solIdx, double *x, int n) |
Set the [i]th optimization solution's primal variable values, where i equals the given solution index. | |
bool | setNumberOfOtherVariableResults (int solIdx, int numberOfOtherVariableResults) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index. | |
bool | setAnOtherVariableResult (int solIdx, int otherIdx, std::string name, std::string description, int *indexes, std::string *s, int n) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index. | |
bool | setObjectiveValues (int solIdx, double *objectiveValues, int n) |
Set the [i]th optimization solution's objective values, where i equals the given solution index. | |
bool | setDualVariableValues (int solIdx, double *lbValues, double *ubValues, int n) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index. | |
bool | setDualVariableValues (int solIdx, double *y, int n) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index. | |
bool | setConstraintValues (int solIdx, double *constraintValues, int n) |
Set the [i]th optimization solution's constraint values, where i equals the given solution index. | |
Public Attributes | |
GeneralResult * | general |
general holds the first child of the OSResult specified by the OSrL Schema. | |
SystemResult * | system |
system holds the second child of the OSResult specified by the OSrL Schema. | |
ServiceResult * | service |
service holds the third child of the OSResult specified by the OSrL Schema. | |
JobResult * | job |
job holds the fourth child of the OSResult specified by the OSrL Schema. | |
OptimizationResult * | optimization |
optimization holds the fifth child of the OSResult specified by the OSrL Schema. | |
int | m_iVariableNumber |
m_iVariableNumber holds the variable number. | |
int | m_iObjectiveNumber |
m_iObjectiveNumber holds the objective number. | |
int | m_iConstraintNumber |
m_iConstraintNumber holds the constraint number. | |
int | m_iNumberOfOtherVariableResults |
m_iNumberOfOtherVariableResults holds the number of OtherVariableResult objects. | |
double * | m_mdPrimalValues |
m_mdPrimalValues a vector of primal variables. | |
double * | m_mdDualValues |
m_mdDualValues a vector of dual variables. | |
std::vector< IndexValuePair * > | primalVals |
std::vector< IndexValuePair * > | dualVals |
GeneralResult * | general |
general holds the first child of the OSResult specified by the OSrL Schema. | |
SystemResult * | system |
system holds the second child of the OSResult specified by the OSrL Schema. | |
ServiceResult * | service |
service holds the third child of the OSResult specified by the OSrL Schema. | |
JobResult * | job |
job holds the fourth child of the OSResult specified by the OSrL Schema. | |
OptimizationResult * | optimization |
optimization holds the fifth child of the OSResult specified by the OSrL Schema. | |
double * | m_mdPrimalValues |
m_mdPrimalValues a vector of primal variables. | |
double * | m_mdDualValues |
m_mdDualValues a vector of primal variables. |
Definition at line 1351 of file OSResult.h.
OSResult::OSResult | ( | ) |
Default constructor.
Definition at line 33 of file OSResult.cpp.
References general, job, optimization, service, and system.
OSResult::~OSResult | ( | ) |
Class destructor.
Definition at line 52 of file OSResult.cpp.
References dualVals, general, job, k, m_mdDualValues, m_mdPrimalValues, optimization, primalVals, service, and system.
OSResult::OSResult | ( | ) |
Default constructor.
OSResult::~OSResult | ( | ) |
Class destructor.
GeneralStatus * OSResult::getGeneralStatus | ( | ) |
Get the general status.
Definition at line 720 of file OSResult.cpp.
References general, and GeneralResult::generalStatus.
string OSResult::getGeneralStatusType | ( | ) |
Get the general status type, which can be: success, error, warning.
Definition at line 725 of file OSResult.cpp.
References general, GeneralResult::generalStatus, and GeneralStatus::type.
string OSResult::getGeneralStatusDescription | ( | ) |
Get the general status description.
Definition at line 730 of file OSResult.cpp.
References GeneralStatus::description, general, and GeneralResult::generalStatus.
string OSResult::getServiceName | ( | ) |
Get service name.
Definition at line 735 of file OSResult.cpp.
References general, and GeneralResult::serviceName.
string OSResult::getServiceURI | ( | ) |
Get service uri.
Definition at line 739 of file OSResult.cpp.
References general, and GeneralResult::serviceURI.
string OSResult::getInstanceName | ( | ) |
Get instance name.
Definition at line 743 of file OSResult.cpp.
References general, and GeneralResult::instanceName.
string OSResult::getJobID | ( | ) |
Get the job id.
Definition at line 747 of file OSResult.cpp.
References general, and GeneralResult::jobID.
string OSResult::getGeneralMessage | ( | ) |
Get the general message.
Definition at line 752 of file OSResult.cpp.
References general, and GeneralResult::message.
int OSResult::getTimeNumber | ( | ) |
Get the number of time measurements.
Definition at line 765 of file OSResult.cpp.
References job, TimingInformation::numberOfTimes, and JobResult::timingInformation.
double OSResult::getTimeValue | ( | ) |
Get the time measurement.
In the first instance, assume that there is only a single measure, which is the total elapsed time in seconds
Definition at line 757 of file OSResult.cpp.
References job, TimingInformation::numberOfTimes, TimingInformation::time, JobResult::timingInformation, and Time::value.
double * OSResult::getOptimalPrimalVariableValues | ( | int | solIdx | ) |
Get one solution of optimal primal variable values.
solIdx | holds the solution index the optimal solution corresponds to. |
Definition at line 849 of file OSResult.cpp.
References getSolutionNumber(), IndexValuePair::idx, m_mdPrimalValues, optimization, primalVals, OptimizationResult::solution, OptimizationSolution::status, OptimizationSolutionStatus::type, IndexValuePair::value, VariableSolution::values, VariableValues::var, and OptimizationSolution::variables.
Referenced by getOSResult(), and main().
double OSResult::getOptimalObjValue | ( | int | objIdx, | |
int | solIdx | |||
) |
Get one solution of optimal objective values.
objIdx | holds the objective index the optimal value corresponds to. | |
solIdx | holds the solution index the optimal value corresponds to. |
Definition at line 915 of file OSResult.cpp.
References ErrorClass::errormsg, and getSolutionNumber().
Referenced by getOSResult(), and main().
double * OSResult::getOptimalDualVariableValues | ( | int | solIdx | ) |
Get one solution of optimal dual variable values.
solIdx | holds the solution index the optimal solution corresponds to. |
Definition at line 888 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, dualVals, ConstraintSolution::dualValues, getSolutionNumber(), IndexValuePair::idx, m_mdDualValues, optimization, OptimizationResult::solution, OptimizationSolution::status, OptimizationSolutionStatus::type, and IndexValuePair::value.
Referenced by main().
OptimizationSolutionStatus * OSResult::getSolutionStatus | ( | int | solIdx | ) |
Get the [i]th optimization solution status, where i equals the given solution index.
The solution status includes the status type, optional descriptions and possibly substatuses.
solIdx | holds the solution index to get the solution status. |
Definition at line 815 of file OSResult.cpp.
References OptimizationResult::numberOfSolutions, optimization, OptimizationResult::solution, and OptimizationSolution::status.
string OSResult::getSolutionStatusType | ( | int | solIdx | ) |
Get the [i]th optimization solution status type, where i equals the given solution index.
The solution status type can be: unbounded, globallyOptimal, locallyOptimal, optimal, bestSoFar, feasible, infeasible, stoppedByLimit, unsure, error, other
solIdx | holds the solution index to get the solution status type. |
Definition at line 823 of file OSResult.cpp.
References OptimizationResult::numberOfSolutions, optimization, OptimizationResult::solution, OptimizationSolution::status, and OptimizationSolutionStatus::type.
Referenced by getOSResult(), and main().
string OSResult::getSolutionStatusDescription | ( | int | solIdx | ) |
Get the [i]th optimization solution status description, where i equals the given solution index.
solIdx | holds the solution index to get the solution status description. |
Definition at line 832 of file OSResult.cpp.
References OptimizationSolutionStatus::description, OptimizationResult::numberOfSolutions, optimization, OptimizationResult::solution, and OptimizationSolution::status.
Referenced by getOSResult().
string OSResult::getSolutionMessage | ( | int | solIdx | ) |
Get the [i]th optimization solution message, where i equals the given solution index.
solIdx | holds the solution index to get the solution message. |
Definition at line 841 of file OSResult.cpp.
References OptimizationSolution::message, OptimizationResult::numberOfSolutions, optimization, and OptimizationResult::solution.
int OSResult::getVariableNumber | ( | ) |
Get variable number.
Definition at line 772 of file OSResult.cpp.
References m_iVariableNumber, OptimizationResult::numberOfVariables, and optimization.
Referenced by main(), setNumberOfPrimalVariableValues(), and setPrimalVariableValuesDense().
int OSResult::getObjectiveNumber | ( | ) |
Get objective number.
Definition at line 782 of file OSResult.cpp.
References m_iObjectiveNumber, OptimizationResult::numberOfObjectives, and optimization.
Referenced by setNumberOfObjectiveValues(), and setObjectiveValuesDense().
int OSResult::getConstraintNumber | ( | ) |
Get constraint number.
Definition at line 791 of file OSResult.cpp.
References m_iConstraintNumber, OptimizationResult::numberOfConstraints, and optimization.
Referenced by main(), setConstraintValuesDense(), setDualVariableValuesDense(), and setNumberOfDualVariableValues().
int OSResult::getSolutionNumber | ( | ) |
get the number of solutions.
Definition at line 799 of file OSResult.cpp.
References OptimizationResult::numberOfSolutions, optimization, and OptimizationResult::solution.
Referenced by getAnOtherVariableResultNumberOfVar(), getOptimalDualVariableValues(), getOptimalObjValue(), getOptimalPrimalVariableValues(), setConstraintValues(), setConstraintValuesDense(), setDualVariableValues(), setDualVariableValuesDense(), setDualVariableValuesSparse(), setNumberOfDualVariableValues(), setNumberOfObjectiveValues(), setNumberOfOtherVariableResults(), setNumberOfPrimalVariableValues(), setObjectiveValues(), setObjectiveValuesDense(), setObjectiveValuesSparse(), setPrimalVariableValues(), setPrimalVariableValuesDense(), setPrimalVariableValuesSparse(), setSolutionMessage(), setSolutionObjectiveIndex(), and setSolutionTargetObjectiveIdx().
int OSResult::getNumberOfOtherVariableResults | ( | int | solIdx | ) |
Get numberOfOtherVariableResult.
Definition at line 806 of file OSResult.cpp.
References m_iNumberOfOtherVariableResults, VariableSolution::numberOfOtherVariableResults, optimization, VariableSolution::other, OptimizationResult::solution, and OptimizationSolution::variables.
int OSResult::getAnOtherVariableResultNumberOfVar | ( | int | solIdx, | |
int | iOther | |||
) |
Get getAnOtherVariableResultNumberOfVar.
Definition at line 877 of file OSResult.cpp.
References getSolutionNumber(), VariableSolution::numberOfOtherVariableResults, OtherVariableResult::numberOfVar, optimization, VariableSolution::other, OptimizationResult::solution, and OptimizationSolution::variables.
bool OSResult::setGeneralStatus | ( | GeneralStatus * | status | ) |
Set the general status.
status | holds the general status. |
Definition at line 942 of file OSResult.cpp.
References general, and GeneralResult::generalStatus.
bool OSResult::setGeneralStatusType | ( | std::string | type | ) |
Set the general status type, which can be: success, error, warning.
type | holds the general status type |
Referenced by LindoSolver::buildSolverInstance(), KnitroSolver::buildSolverInstance(), IpoptSolver::buildSolverInstance(), CouenneSolver::buildSolverInstance(), CoinSolver::buildSolverInstance(), BonminSolver::buildSolverInstance(), IpoptProblem::finalize_solution(), LindoSolver::generateLindoModel(), CoinSolver::getCoinSolverType(), getJobID(), kill(), knock(), main(), LindoSolver::optimize(), LindoSolver::processConstraints(), LindoSolver::processNonlinearExpressions(), LindoSolver::processQuadraticTerms(), LindoSolver::processVariables(), retrieve(), send(), CoinSolver::setCoinPackedMatrix(), LindoSolver::setSolverOptions(), IpoptSolver::setSolverOptions(), CouenneSolver::setSolverOptions(), BonminSolver::setSolverOptions(), LindoSolver::solve(), KnitroSolver::solve(), IpoptSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), CoinSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setGeneralStatusDescription | ( | std::string | description | ) |
Set the general status description.
description | holds the general status description. |
bool OSResult::setGeneralMessage | ( | std::string | message | ) |
Set the general message.
message | holds the general message. |
Referenced by LindoSolver::buildSolverInstance(), KnitroSolver::buildSolverInstance(), IpoptSolver::buildSolverInstance(), CouenneSolver::buildSolverInstance(), CoinSolver::buildSolverInstance(), BonminSolver::buildSolverInstance(), IpoptProblem::finalize_solution(), LindoSolver::generateLindoModel(), CoinSolver::getCoinSolverType(), getJobID(), kill(), knock(), main(), LindoSolver::optimize(), LindoSolver::processConstraints(), LindoSolver::processNonlinearExpressions(), LindoSolver::processQuadraticTerms(), LindoSolver::processVariables(), retrieve(), send(), CoinSolver::setCoinPackedMatrix(), LindoSolver::setSolverOptions(), IpoptSolver::setSolverOptions(), CouenneSolver::setSolverOptions(), BonminSolver::setSolverOptions(), LindoSolver::solve(), KnitroSolver::solve(), IpoptSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setServiceName | ( | std::string | serviceName | ) |
Set service name.
serviceName | holds the name of the service. |
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setServiceURI | ( | std::string | serviceURI | ) |
Set service uri.
serviceURI | holds the uri of the service. |
bool OSResult::setInstanceName | ( | std::string | instanceName | ) |
Set instance name.
instanceName | holds the name of the instance. |
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setJobID | ( | std::string | jobID | ) |
Set job id.
jobID | holds the job id. |
bool OSResult::setTime | ( | double | time | ) |
Set time.
time | holds the time. |
Definition at line 1010 of file OSResult.cpp.
References addTimingInformation().
Referenced by LindoSolver::solve(), and CoinSolver::writeResult().
bool OSResult::addTimingInformation | ( | std::string | type, | |
std::string | category, | |||
std::string | unit, | |||
std::string | description, | |||
double | value | |||
) |
Add timing information.
type | holds the timer type (cpuTime/elapsedTime/other). | |
category | holds the timer category (total/input/preprocessing, etc.) | |
unit | holds the timer unit (tick/milliscond/second/minute/etc.) | |
description | holds further information about the timer. | |
value | holds the time measurement. |
Definition at line 953 of file OSResult.cpp.
References Time::category, Time::description, job, nt, TimingInformation::numberOfTimes, TimingInformation::time, JobResult::timingInformation, Time::type, Time::unit, and Time::value.
Referenced by setTime().
bool OSResult::setTimeNumber | ( | int | timeNumber | ) |
Set the number of time measurements.
timeNumber | holds the number of measurements |
Definition at line 1015 of file OSResult.cpp.
References job, TimingInformation::numberOfTimes, and JobResult::timingInformation.
bool OSResult::setVariableNumber | ( | int | variableNumber | ) |
Set the variable number.
variableNumber | holds the number of variables |
Definition at line 1028 of file OSResult.cpp.
References OptimizationResult::numberOfVariables, and optimization.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setObjectiveNumber | ( | int | objectiveNumber | ) |
Set the objective number.
objectiveNumber | holds the number of objectives |
Definition at line 1037 of file OSResult.cpp.
References OptimizationResult::numberOfObjectives, and optimization.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setConstraintNumber | ( | int | constraintNumber | ) |
Set the constraint number.
constraintNumber | holds the number of constraints |
Definition at line 1046 of file OSResult.cpp.
References OptimizationResult::numberOfConstraints, and optimization.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setSolutionNumber | ( | int | number | ) |
set the number of solutions.
This method must be called before setting other optimization solution related results. Before this method is called, the setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int) methods have to be called first.
number | holds the number of solutions to set. |
Definition at line 1055 of file OSResult.cpp.
References OptimizationResult::numberOfSolutions, optimization, and OptimizationResult::solution.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), CoinSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setSolutionStatus | ( | int | solIdx, | |
std::string | type, | |||
std::string | description | |||
) |
Set the [i]th optimization solution status, where i equals the given solution index.
The solution status includes the status type, optional descriptions and possibly substatuses. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the solution status. | |
status | holds the optimization solution status to set. |
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::solve(), BonminSolver::solve(), CouenneSolver::writeResult(), CoinSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setSolutionTargetObjectiveIdx | ( | int | solIdx, | |
int | objectiveIdx | |||
) |
Set the [i]th optimization solution's objective index, where i equals the given solution index.
The first objective's index should be -1, the second -2, and so on. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective index. | |
objectiveIdx | holds the objective index to set. All the objective indexes are negative starting from -1 downward. |
Definition at line 1088 of file OSResult.cpp.
References getSolutionNumber(), optimization, OptimizationResult::solution, and OptimizationSolution::targetObjectiveIdx.
bool OSResult::setSolutionMessage | ( | int | solIdx, | |
std::string | msg | |||
) |
Set the [i]th optimization solution's message, where i equals the given solution index.
The first objective's index should be -1, the second -2, and so on. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective index. | |
msg | holds the solution message to set. |
Definition at line 1104 of file OSResult.cpp.
References getSolutionNumber(), OptimizationSolution::message, optimization, and OptimizationResult::solution.
bool OSResult::setNumberOfPrimalVariableValues | ( | int | solIdx, | |
int | n | |||
) |
Set the [i]th optimization solution's number of primal variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the primal variable values. | |
n | holds the number of elements in the array x |
Definition at line 1120 of file OSResult.cpp.
References getSolutionNumber(), getVariableNumber(), VariableValues::numberOfVar, optimization, OptimizationResult::solution, VariableSolution::values, and OptimizationSolution::variables.
bool OSResult::setPrimalVariableValuesSparse | ( | int | solIdx, | |
std::vector< IndexValuePair * > | x | |||
) |
Set the [i]th optimization solution's primal variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the primal variable values. | |
x | holds a vector of type IndexValuePair; the idx component holds the index of the variable; the value component holds its value. The vector could be null if all variables are 0. |
Definition at line 1143 of file OSResult.cpp.
References getSolutionNumber(), VariableValues::numberOfVar, optimization, OptimizationResult::solution, VariableSolution::values, VariableValues::var, and OptimizationSolution::variables.
bool OSResult::setPrimalVariableValuesDense | ( | int | solIdx, | |
double * | x | |||
) |
Set the [i]th optimization solution's primal variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the primal variable values. | |
x | holds the a double dense array of variable values to set; it could be null if all variables are 0. |
Definition at line 1172 of file OSResult.cpp.
References getSolutionNumber(), getVariableNumber(), VariableValues::numberOfVar, optimization, OptimizationResult::solution, VariableSolution::values, VariableValues::var, and OptimizationSolution::variables.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::writeResult(), CoinSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setNumberOfOtherVariableResults | ( | int | solIdx, | |
int | numberOfOtherVariableResults | |||
) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first. This method then allocates the memory for the new OtherVariableResult objects
solIdx | is the solution index | |
numberOfOtherVariableResult | holds the number of OtherVariableResult objects Each other variable result contains the name (required), an optional description (std::string) and an optional value (std::string). Each other variable result can also optionally contain an array OtherVarResult for each variable. The OtherVarResult contains a variable idx (required) and an optional std::string value. |
org.optimizationservices.oscommon.datastructure.osresult.OtherVarResult
Definition at line 1202 of file OSResult.cpp.
References getSolutionNumber(), VariableSolution::numberOfOtherVariableResults, optimization, VariableSolution::other, OptimizationResult::solution, and OptimizationSolution::variables.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), and CoinSolver::writeResult().
bool OSResult::setAnOtherVariableResultSparse | ( | int | solIdx, | |
int | otherIdx, | |||
std::string | name, | |||
std::string | value, | |||
std::string | description, | |||
int * | idx, | |||
std::string * | s, | |||
int | n | |||
) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index | |
otherIdx | holds the index of the new OtherVariableResult object | |
name | holds the name of the other element | |
value | holds the value of the other element | |
idx | holds a pointer to the indexes of the var element | |
s | holds a pointer to the array of values of the var element | |
n | holds the number of elements of the array |
org.optimizationservices.oscommon.datastructure.osresult.OtherVarResult
Referenced by IpoptProblem::finalize_solution(), and CoinSolver::writeResult().
bool OSResult::setAnOtherVariableResultDense | ( | int | solIdx, | |
int | otherIdx, | |||
std::string | name, | |||
std::string | value, | |||
std::string | description, | |||
std::string * | s | |||
) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index | |
otherIdx | holds the index of the new OtherVariableResult object | |
name | holds the name of the other element | |
value | holds the value of the other element | |
s | holds a pointer to the array of values of the var element |
org.optimizationservices.oscommon.datastructure.osresult.OtherVarResult
Referenced by main(), and LindoSolver::optimize().
bool OSResult::setNumberOfObjectiveValues | ( | int | solIdx, | |
int | n | |||
) |
Set the [i]th optimization solution's number of objective values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective values. | |
n | holds the number of elements in the array x |
Definition at line 1279 of file OSResult.cpp.
References getObjectiveNumber(), getSolutionNumber(), ObjectiveValues::numberOfObj, OptimizationSolution::objectives, optimization, OptimizationResult::solution, and ObjectiveSolution::values.
bool OSResult::setObjectiveValuesSparse | ( | int | solIdx, | |
std::vector< IndexValuePair * > | x | |||
) |
Set the [i]th optimization solution's objective values, where i equals the given solution index.
Usually one of the objective is what the solution was solved for (or based on). Its index should be indicated in the solution's objectiveIdx attribute. Based on this objective's solution, the rest of the objective values are (optionally) calculated. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective values. | |
x | holds a vector of type IndexValuePair; the idx component holds the index of the objective; the value component holds its value. The vector could be null if all ojectives are 0. Possibly only the objective that the solution is based on has the value, and the rest of the objective values all get a Double.NaN value, meaning that they are not calculated. |
Definition at line 1304 of file OSResult.cpp.
References getSolutionNumber(), ObjectiveValues::numberOfObj, ObjectiveValues::obj, OptimizationSolution::objectives, optimization, OptimizationResult::solution, and ObjectiveSolution::values.
bool OSResult::setObjectiveValuesDense | ( | int | solIdx, | |
double * | objectiveValues | |||
) |
Set the [i]th optimization solution's objective values, where i equals the given solution index.
Usually one of the objective is what the solution was solved for (or based on). Its index should be indicated in the solution's objectiveIdx attribute. Based on this objective's solution, the rest of the objective values are (optionally) calculated. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective values. | |
objectiveValues | holds the double sparse array of objective values to set. Possibly only the objective that the solution is based on has the value, and the rest of the objective values all get a Double.NaN value, meaning that they are not calculated. |
Definition at line 1335 of file OSResult.cpp.
References getObjectiveNumber(), getSolutionNumber(), ObjectiveValues::numberOfObj, ObjectiveValues::obj, OptimizationSolution::objectives, optimization, OptimizationResult::solution, and ObjectiveSolution::values.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), CouenneSolver::writeResult(), CoinSolver::writeResult(), and BonminSolver::writeResult().
bool OSResult::setNumberOfDualVariableValues | ( | int | solIdx, | |
int | n | |||
) |
Set the [i]th optimization solution's number of dual variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the dual variable values. | |
n | holds the number of elements in the array x |
Definition at line 1366 of file OSResult.cpp.
References OptimizationSolution::constraints, ConstraintSolution::dualValues, getConstraintNumber(), getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
bool OSResult::setDualVariableValuesSparse | ( | int | solIdx, | |
std::vector< IndexValuePair * > | x | |||
) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the dual variable values. | |
x | holds a vector of type IndexValuePair; the idx component holds the index of the constraint; the value component holds its value. The vector could be null if all dual variables are 0. |
Definition at line 1391 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, ConstraintSolution::dualValues, getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
bool OSResult::setDualVariableValuesDense | ( | int | solIdx, | |
double * | y | |||
) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the dual variable values. | |
y | holds a double dense array of variable dual values; it could be NULL if all values are 0. |
Definition at line 1424 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, ConstraintSolution::dualValues, getConstraintNumber(), getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
Referenced by IpoptProblem::finalize_solution(), main(), LindoSolver::optimize(), KnitroSolver::solve(), and CoinSolver::writeResult().
bool OSResult::setConstraintValuesDense | ( | int | solIdx, | |
double * | constraintValues | |||
) |
Set the [i]th optimization solution's constraint values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the constraint values. | |
constraintValues | holds the a double dense array of constraint values to set; it could be null if all constraint values are 0. |
Definition at line 1457 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, ConstraintSolution::dualValues, getConstraintNumber(), getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
GeneralStatus* OSResult::getGeneralStatus | ( | ) |
Get the general status.
std::string OSResult::getGeneralStatusType | ( | ) |
Get the general status type, which can be: success, error, warning.
std::string OSResult::getGeneralStatusDescription | ( | ) |
Get the general status description.
std::string OSResult::getServiceName | ( | ) |
Get service name.
std::string OSResult::getServiceURI | ( | ) |
Get service uri.
std::string OSResult::getInstanceName | ( | ) |
Get instance name.
std::string OSResult::getJobID | ( | ) |
Get the job id.
std::string OSResult::getGeneralMessage | ( | ) |
Get the general message.
int OSResult::getTimeNumber | ( | ) |
Get the number of time measurements.
double OSResult::getTimeValue | ( | ) |
Get the time measurement.
In the first instance, assume that there is only a single measure, which is the total elapsed time in seconds
double* OSResult::getOptimalPrimalVariableValues | ( | int | objIdx | ) |
Get one solution of optimal primal variable values.
objIdx | holds the objective index the optimal value corresponds to. |
double* OSResult::getOptimalDualVariableValues | ( | int | objIdx | ) |
Get one solution of optimal dual variable values.
objIdx | holds the objective index the optimal value corresponds to. |
OptimizationSolutionStatus* OSResult::getSolutionStatus | ( | int | solIdx | ) |
Get the [i]th optimization solution status, where i equals the given solution index.
The solution status includes the status type, optional descriptions and possibly substatuses.
solIdx | holds the solution index to get the solution status. |
std::string OSResult::getSolutionStatusType | ( | int | solIdx | ) |
Get the [i]th optimization solution status type, where i equals the given solution index.
The solution status type can be: unbounded, globallyOptimal, locallyOptimal, optimal, bestSoFar, feasible, infeasible, stoppedByLimit, unsure, error, other
solIdx | holds the solution index to get the solution status type. |
std::string OSResult::getSolutionStatusDescription | ( | int | solIdx | ) |
Get the [i]th optimization solution status description, where i equals the given solution index.
solIdx | holds the solution index to get the solution status description. |
std::string OSResult::getSolutionMessage | ( | int | solIdx | ) |
Get the [i]th optimization solution message, where i equals the given solution index.
solIdx | holds the solution index to get the solution message. |
int OSResult::getVariableNumber | ( | ) |
Get variable number.
int OSResult::getObjectiveNumber | ( | ) |
Get objective number.
int OSResult::getConstraintNumber | ( | ) |
Get constraint number.
int OSResult::getSolutionNumber | ( | ) |
get the number of solutions.
int OSResult::getNumberOfOtherVariableResults | ( | int | solIdx | ) |
Get numberOfOtherVariableResult.
bool OSResult::setGeneralStatus | ( | GeneralStatus * | status | ) |
Set the general status.
status | holds the general status. |
bool OSResult::setGeneralStatusType | ( | std::string | type | ) |
Set the general status type, which can be: success, error, warning.
type | holds the general status type |
bool OSResult::setGeneralStatusDescription | ( | std::string | description | ) |
Set the general status description.
description | holds the general status description. |
bool OSResult::setGeneralMessage | ( | std::string | message | ) |
Set the general message.
message | holds the general message. |
bool OSResult::setServiceName | ( | std::string | serviceName | ) |
Set service name.
serviceName | holds the name of the service. |
bool OSResult::setServiceURI | ( | std::string | serviceURI | ) |
Set service uri.
serviceURI | holds the uri of the service. |
bool OSResult::setInstanceName | ( | std::string | instanceName | ) |
Set instance name.
instanceName | holds the name of the instance. |
bool OSResult::setJobID | ( | std::string | jobID | ) |
Set job id.
jobID | holds the job id. |
bool OSResult::setTime | ( | double | time | ) |
Set time.
time | holds the time. |
bool OSResult::addTimingInformation | ( | std::string | type, | |
std::string | category, | |||
std::string | unit, | |||
std::string | description, | |||
double | value | |||
) |
Add timing information.
type | holds the timer type (cpuTime/elapsedTime/other). | |
category | holds the timer category (total/input/preprocessing, etc.) | |
unit | holds the timer unit (tick/milliscond/second/minute/etc.) | |
description | holds further information about the timer. | |
value | holds the time measurement. |
bool OSResult::setTimeNumber | ( | int | timeNumber | ) |
Set the number of time measurements.
timeNumber | holds the number of measurements |
bool OSResult::setVariableNumber | ( | int | variableNumber | ) |
Set the variable number.
variableNumber | holds the number of variables |
bool OSResult::setObjectiveNumber | ( | int | objectiveNumber | ) |
Set the objective number.
objectiveNumber | holds the number of objectives |
bool OSResult::setConstraintNumber | ( | int | constraintNumber | ) |
Set the constraint number.
constraintNumber | holds the number of constraints |
bool OSResult::setSolutionNumber | ( | int | number | ) |
set the number of solutions.
This method must be called before setting other optimization solution related results. Before this method is called, the setVariableNumber(int), setObjectiveNumber(int), setConstraintNumber(int) methods have to be called first.
number | holds the number of solutions to set. |
bool OSResult::setSolutionStatus | ( | int | solIdx, | |
std::string | type, | |||
std::string | description | |||
) |
Set the [i]th optimization solution status, where i equals the given solution index.
The solution status includes the status type, optional descriptions and possibly substatuses. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the solution status. | |
status | holds the optimization solution status to set. |
bool OSResult::setSolutionObjectiveIndex | ( | int | solIdx, | |
int | objectiveIdx | |||
) |
Set the [i]th optimization solution's objective index, where i equals the given solution index.
The first objective's index should be -1, the second -2, and so on. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective index. | |
objectiveIdx | holds the objective index to set. All the objective indexes are negative starting from -1 downward. |
Definition at line 990 of file OSResult.cpp.
References getSolutionNumber(), optimization, OptimizationResult::solution, and OptimizationSolution::targetObjectiveIdx.
bool OSResult::setNumberOfPrimalVariableValues | ( | int | solIdx, | |
int | n | |||
) |
Set the [i]th optimization solution's number of primal variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the primal variable values. | |
n | holds the number of elements in the array x |
bool OSResult::setPrimalVariableValues | ( | int | solIdx, | |
double * | x, | |||
int | n | |||
) |
Set the [i]th optimization solution's primal variable values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the primal variable values. | |
x | holds the a double dense array of variable values to set; it could be null if all variables are 0. | |
n | holds the number of elements in the array x |
Definition at line 1028 of file OSResult.cpp.
References getSolutionNumber(), VariableValues::numberOfVar, optimization, OptimizationResult::solution, VariableSolution::values, VariableValues::var, and OptimizationSolution::variables.
Referenced by main().
bool OSResult::setNumberOfOtherVariableResults | ( | int | solIdx, | |
int | numberOfOtherVariableResults | |||
) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first. This method then allocates the memory for the new OtherVariableResult objects
solIdx | is the solution index | |
numberOfOtherVariableResult | holds the number of OtherVariableResult objects Each other variable result contains the name (required), an optional description (std::string) and an optional value (std::string). Each other variable result can also optionally contain an array OtherVarResult for each variable. The OtherVarResult contains a variable idx (required) and an optional std::string value. |
org.optimizationservices.oscommon.datastructure.osresult.OtherVarResult
bool OSResult::setAnOtherVariableResult | ( | int | solIdx, | |
int | otherIdx, | |||
std::string | name, | |||
std::string | description, | |||
int * | indexes, | |||
std::string * | s, | |||
int | n | |||
) |
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index | |
otherIdx | holds the index of the new OtherVariableResult object | |
name | holds the name of the other element | |
s | holds a pointer to the array of values of the var element | |
n | holds the number of elements of the array |
org.optimizationservices.oscommon.datastructure.osresult.OtherVarResult
Referenced by main().
bool OSResult::setObjectiveValues | ( | int | solIdx, | |
double * | objectiveValues, | |||
int | n | |||
) |
Set the [i]th optimization solution's objective values, where i equals the given solution index.
Usually one of the objective is what the solution was solved for (or based on). Its index should be indicated in the solution's objectiveIdx attribute. Based on this objective's solution, the rest of the objective values are (optionally) calculated. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the objective values. | |
objectiveValues | holds the a double dense array of objective values to set. Possibly only the objective that the solution is based on has the value, and the rest of the objective values all get a Double.NaN value, meaning that they are not calculated. | |
n | holds the dimension of the objectiveValues array |
Definition at line 1130 of file OSResult.cpp.
References getSolutionNumber(), ObjectiveValues::numberOfObj, ObjectiveValues::obj, OptimizationSolution::objectives, optimization, OptimizationResult::solution, and ObjectiveSolution::values.
Referenced by main().
bool OSResult::setDualVariableValues | ( | int | solIdx, | |
double * | lbValues, | |||
double * | ubValues, | |||
int | n | |||
) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index.
The method allows setting dual values at both the constraints' lower and upper bounds. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the dual variable values. | |
lbValues | holds the a double dense array of variable dual values to set at the lower bounds; it could be null if all values are 0. | |
ubValues | holds the a double dense array of variable dual values to set at the upper bounds; it could be null if all values are 0. | |
n | holds the number of values in the lbValues and ubValues arrays |
Definition at line 1184 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, ConstraintSolution::dualValues, getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
Referenced by main().
bool OSResult::setDualVariableValues | ( | int | solIdx, | |
double * | y, | |||
int | n | |||
) |
Set the [i]th optimization solution's dual variable values, where i equals the given solution index.
The method allows setting dual values at both the constraints' lower and upper bounds. Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the dual variable values. | |
y | holds a double dense array of variable dual values; it could be NULL if all values are 0. | |
n | holds the number of elements of the array y. |
Definition at line 1261 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, ConstraintSolution::dualValues, getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
bool OSResult::setConstraintValues | ( | int | solIdx, | |
double * | constraintValues, | |||
int | n | |||
) |
Set the [i]th optimization solution's constraint values, where i equals the given solution index.
Before this method is called, the setSolutionNumber(int) method has to be called first.
solIdx | holds the solution index to set the constraint values. | |
constraintValues | holds the a double dense array of constraint values to set; it could be null if all constraint values are 0. | |
n | holds the dimension of the array constraintValues. |
Definition at line 1293 of file OSResult.cpp.
References DualVariableValues::con, OptimizationSolution::constraints, ConstraintSolution::dualValues, getSolutionNumber(), DualVariableValues::numberOfCon, optimization, and OptimizationResult::solution.
general holds the first child of the OSResult specified by the OSrL Schema.
Definition at line 1358 of file OSResult.h.
Referenced by getGeneralMessage(), getGeneralStatus(), getGeneralStatusDescription(), getGeneralStatusType(), getInstanceName(), getJobID(), getServiceName(), getServiceURI(), OSResult(), setGeneralStatus(), OSrLWriter::writeOSrL(), and ~OSResult().
system holds the second child of the OSResult specified by the OSrL Schema.
Definition at line 1363 of file OSResult.h.
Referenced by OSResult(), OSrLWriter::writeOSrL(), and ~OSResult().
service holds the third child of the OSResult specified by the OSrL Schema.
Definition at line 1368 of file OSResult.h.
Referenced by OSResult(), OSrLWriter::writeOSrL(), and ~OSResult().
job holds the fourth child of the OSResult specified by the OSrL Schema.
Definition at line 1373 of file OSResult.h.
Referenced by addTimingInformation(), getTimeNumber(), getTimeValue(), OSResult(), setTimeNumber(), OSrLWriter::writeOSrL(), and ~OSResult().
optimization holds the fifth child of the OSResult specified by the OSrL Schema.
Definition at line 1378 of file OSResult.h.
Referenced by getAnOtherVariableResultNumberOfVar(), getConstraintNumber(), getNumberOfOtherVariableResults(), getObjectiveNumber(), getOptimalDualVariableValues(), getOptimalPrimalVariableValues(), getSolutionMessage(), getSolutionNumber(), getSolutionStatus(), getSolutionStatusDescription(), getSolutionStatusType(), getVariableNumber(), main(), OSResult(), setConstraintNumber(), setConstraintValues(), setConstraintValuesDense(), setDualVariableValues(), setDualVariableValuesDense(), setDualVariableValuesSparse(), setNumberOfDualVariableValues(), setNumberOfObjectiveValues(), setNumberOfOtherVariableResults(), setNumberOfPrimalVariableValues(), setObjectiveNumber(), setObjectiveValues(), setObjectiveValuesDense(), setObjectiveValuesSparse(), setPrimalVariableValues(), setPrimalVariableValuesDense(), setPrimalVariableValuesSparse(), setSolutionMessage(), setSolutionNumber(), setSolutionObjectiveIndex(), setSolutionTargetObjectiveIdx(), setVariableNumber(), OSrLWriter::writeOSrL(), and ~OSResult().
m_iVariableNumber holds the variable number.
Definition at line 1396 of file OSResult.h.
Referenced by getVariableNumber().
m_iObjectiveNumber holds the objective number.
Definition at line 1401 of file OSResult.h.
Referenced by getObjectiveNumber().
m_iConstraintNumber holds the constraint number.
Definition at line 1406 of file OSResult.h.
Referenced by getConstraintNumber().
m_iNumberOfOtherVariableResults holds the number of OtherVariableResult objects.
Definition at line 1411 of file OSResult.h.
Referenced by getNumberOfOtherVariableResults().
double* OSResult::m_mdPrimalValues |
m_mdPrimalValues a vector of primal variables.
Definition at line 1416 of file OSResult.h.
Referenced by getOptimalPrimalVariableValues(), and ~OSResult().
double* OSResult::m_mdDualValues |
m_mdDualValues a vector of dual variables.
Definition at line 1421 of file OSResult.h.
Referenced by getOptimalDualVariableValues(), and ~OSResult().
std::vector<IndexValuePair*> OSResult::primalVals |
Definition at line 1424 of file OSResult.h.
Referenced by getOptimalPrimalVariableValues(), and ~OSResult().
std::vector<IndexValuePair*> OSResult::dualVals |
Definition at line 1426 of file OSResult.h.
Referenced by getOptimalDualVariableValues(), and ~OSResult().
general holds the first child of the OSResult specified by the OSrL Schema.
Definition at line 1310 of file OSResult.h.
system holds the second child of the OSResult specified by the OSrL Schema.
Definition at line 1315 of file OSResult.h.
service holds the third child of the OSResult specified by the OSrL Schema.
Definition at line 1320 of file OSResult.h.
job holds the fourth child of the OSResult specified by the OSrL Schema.
Definition at line 1325 of file OSResult.h.
optimization holds the fifth child of the OSResult specified by the OSrL Schema.
Definition at line 1330 of file OSResult.h.
double* OSResult::m_mdPrimalValues |
double* OSResult::m_mdDualValues |