IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Num::AnalysisResults Class Reference

Single objective optimization analysis results. Used to transfer parameters input (e.g. vector of parameters, request flags) to the analysis function and to store analysis output results (e.g. objective and constraint functions, their gradients, error codes, and flags indicating what has actually been calculated). REMARKS: Property CopyReferences specifies whether only references are copied when individial object fields are assigned & set (when the property is true), or values are actually copied (when false - deep copy). Each setter method also has the variant that always copies only the reference (function name appended by "Reference"). This makes possible to avoid duplication of allocated data and also to avoid having different data with the same references. AGREEMENTS: Optimization problem is defined as minimize f(x), subject to: c_i(x)<=0, i=0...NI-1 c_j(x)=0, j=NI...NI+NE-1. Here x is vector of parameters, f(x) is the objective function, and c_i(x) and c_j(c) are constraint functions. NI is number of inequality constraints and NE is number of equality constraints. If there are equality constraints then they are listed after inequality constraints. More...

Inheritance diagram for IG::Num::AnalysisResults:
Collaboration diagram for IG::Num::AnalysisResults:

List of all members.

Public Member Functions

 AnalysisResults ()
 1 parameter, no constraints, 1 objective function. No gradients required
 AnalysisResults (bool reqGradients)
 1 parameter, no constraints, 1 objective function.
 AnalysisResults (int numParameters)
 Specified number of parameters, 1 objective, no constraints. No gradients required.
 AnalysisResults (int numParameters, bool reqGradients)
 Specified number of parameters, 1 objective, no constraints. No gradients required.
 AnalysisResults (int numParameters, int numConstraints)
 Specified number of parameters and constraints, 1 objective. No gradients required.
 AnalysisResults (int numParameters, int numConstraints, bool reqGradients)
 Specified number of parameters and constraints, 1 objective. No gradients required.
virtual bool IsEqualityConstraint (int which)
 Returns true if the specified constraint is an equality constraint, and false otherwise.
virtual IVector GetParameters ()
 Returns vector of optimization parameters.
virtual void SetParameters (IVector value)
 Sets the vector of optimization parameters. If CopyReferences=true (false by default) then only the reference is copied.
virtual void SetParametersReference (IVector reference)
 Sets the vector of optimization parameters. Only the reference is copied.
virtual double GetParameter (int index)
 Returns specific optimization parameter. Throws exception if not defined or index out of bounds.
virtual void SetParameter (int index, double value)
 Sets the specified optimization parameter.
virtual double GetObjective ()
 Returns the value of the objective function./summary>
virtual void SetObjective (double value)
 Sets the value of the objective function.
virtual IVector GetObjectiveGradient ()
 Returns the objective function gradient.
virtual void SetObjectiveGradient (IVector value)
 Sets the objective function gradient. If CopyReferences=true (false by default) then only the reference is copied.
virtual void SetObjectiveGradientReference (IVector reference)
 Sets the objective function gradient. Only the reference is copied.
virtual double GetObjectiveGradient (int index)
 Returns the specified component of the objective function gradient.
virtual void SetObjectiveGradient (int index, double value)
 Sets the specified component of the objective function gradient.
virtual List< double > GetConstraints ()
 Returns a list of constraint function values.
virtual void SetConstraints (List< double > values)
 Sets the list of constraint function values. If CopyReferences=true (false by default) then only the list reference is copied.
virtual void SetConstraintsReference (List< double > reference)
 Sets the list of constraint function values. Only the list reference is copied.
virtual double GetConstraint (int which)
 Returns the specified constraint function value.
virtual void SetConstraint (int which, double value)
 Sets the specified constraint function value.
virtual List< IVectorGetConstraintGradients ()
 Returns a list of constraint function gradients.
virtual void SetConstraintGradients (List< IVector > values)
 Sets constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied.
virtual void SetConstraintGradientsReference (List< IVector > reference)
 Sets constraint function gradients. Only the list reference is copied.
virtual IVector GetConstraintGradient (int which)
 Returns the gradient of the specified constraint function.
virtual double GetConstraintGradient (int which, int index)
 Returns the specific constraint function gradient component.
virtual void SetConstraintGradient (int which, IVector value)
 Sets the specified constraint function gradient. If CopyReferences=true (false by default) then only the reference is copied.
virtual void SetConstraintGradientReference (int which, IVector reference)
 Sets the specified constraint function gradient. Only the reference is copied.
virtual void SetConstraintGradient (int which, int index, double value)
 Sets the specified constraint fuction gradient component.
virtual IMatrix GetObjectiveHessian ()
 Returns the objective function's Hessian.
virtual void SetObjectiveHessian (IMatrix value)
 Sets the objective functions' Hessian. If CopyReferences=true (false by default) then only the reference is copied.
virtual void SetObjectiveHessianReference (IMatrix reference)
 Sets the objective functions' Hessian. Only the reference is copied.
virtual double GetObjectiveHessian (int rowIndex, int columnIndex)
 Returns the specified component of the objective function Hessian.
virtual void SetObjectiveHessian (int rowIndex, int columnIndex, double value)
 Sets the specified component of the objective function's Hessian.
virtual List< IMatrixGetConstraintHessians ()
 Returns the list of constraint functions' Hessians.
virtual void SetConstraintHessians (List< IMatrix > values)
 Sets constraint functios' Hessians. If CopyReferences=true (false by default) then only the list reference is copied.
virtual void SetConstraintHessiansReference (List< IMatrix > reference)
 Sets constraint functios' Hessians. Only the list reference is copied.
virtual IMatrix GetConstraintHessian (int which)
 Returns Hessian of the specified constraint function.
virtual double GetConstraintHessian (int which, int rowIndex, int columnIndex)
 Returns the specified component of Hessian of the specified constraint function.
virtual void SetConstraintHessian (int which, IMatrix value)
 Sets the specified constraint function's Hessian. If CopyReferences=true (false by default) then only the reference is copied.
virtual void SetConstraintHessianReference (int which, IMatrix reference)
 Sets the specified constraint function's Hessian. Only the reference is copied.
virtual void SetConstraintHessian (int which, int rowIndex, int columnIndex, double value)
 Sets the specified component of the specified constraint's Hessian.
virtual void NullifyAll ()
 Sets all objects (parameters and result objects) to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection.
virtual void NullifyResults ()
 Sets all result objects to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection.
virtual void AllocateParameters ()
 Allocates space for parameters.
virtual void AllocateRequested ()
 Allocates space for all requested result objects.
virtual void AllocateObjectiveGradient ()
 Allocate space for objective function gradient.
virtual void AllocateObjectiveHessian ()
 Allocates space for objective function Hessian.
virtual void AllocateConstraintsList ()
 Allocates space for list of constraint functions.
virtual void AllocateConstraintGradientsList ()
 Allocates space for list of constraint function gradients.
virtual void AllocateConstrainGradients ()
 Allocates space for constraint function gradients (including for the list, if necessarty).
virtual void AllocateConstraintGradient (int which)
 Allocates space for the specified constraint function gradient.
virtual void AllocateConstraintHessiansList ()
 Allocates space for the list of constraint functions' Hessians.
virtual void AllocateConstraintHessians ()
 Allocates space for constraint functions' Hessians (including space for the list, if necessary).
virtual void AllocateConstraintHessian (int which)
 Allocates space for the specified constraint fucnction's Hessian.
virtual void ResetResults ()
 Sets all calculated flags to false, error code to 0 (no error) and error string to null.
virtual void SetDimensions (int numParameters, int numConstraints)
 Sets the dimension of the analysis results object according to the specified values. Number of objective functions is set to 1.
virtual void SetDimensions (int numParameters, int numObjectives, int numConstraints)
 Sets the dimension of the analysis results object according to the specified values.
virtual void PrepareResultStorage ()
 Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. Things whose calculation is not requested are not calculated.
virtual void PrepareResultStorage (bool resetCalculatedFlags)
 Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. Things whose calculation is not requested are not calculated.
virtual void PrepareResultStorage (int numParameters, int numConstraints)
 Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters and constraints while number of objective functions is set to 1).Things whose calculation is not requested are not calculated.
virtual void PrepareResultStorage (int numParameters, int numObjectives, int numConstraints)
 Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated.
virtual void PrepareResultStorage (int numParameters, int numObjectives, int numConstraints, bool resetCalculatedFlags)
 Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated.
virtual void Copy (IAnalysisResults results)
 Copies data from another analysis results.
virtual IAnalysisResults GetCopy ()
 Returns an exact deep copy of the current object.
virtual bool IsViolated (int which, double equalityTolerance)
 Returns true if the specified constraint is violated according to the current analysis results, false otherwise.
virtual bool IsViolated (int which)
 Returns true if the specified constraint is violated according to the current analysis results, false otherwise.
virtual bool IsFeasible (double equalityTolerance)
 Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true.
virtual bool IsFeasible ()
 Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true.
virtual int GetNumViolatedConstraints (double equalityTolerance)
 Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
virtual int GetNumViolatedConstraints ()
 Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
virtual double GetSumResiduals (double equalityTolerance)
 Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
virtual double GetSumResiduals ()
 Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
virtual double GetMaximalResidual (double equalityTolerance)
 Returns the largest constraint function value corresponding to any violated constraint in the current analysis results, or 0 if there are no violated constraints. Specific constraint is violated if the corresponding constraint function is greater than 0.
virtual double GetMaximalResidual ()
 Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
virtual double GetPenaltyTerm (int which, IPenaltyEvaluator evaluator)
 Returns value of the penalty term corresponding to the specified constraint, calculated by the specified penalty evaluator.
virtual double GetSumPenaltyTerms (IPenaltyEvaluator evaluator)
 Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator.
virtual double GetMaxPenaltyTerm (IPenaltyEvaluator evaluator)
 Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator.
override string ToString ()
 Returns a string representation of the current analysis results object in a standard IGLib form.
string ToStringMath ()
 Returns a string representation of the current analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers).

Static Public Member Functions

static string ToString (IAnalysisResults anres)
 Returns a string representation of the specified analysis results object in a standard IGLib form.
static string ToStringRequestMath (IAnalysisResults anres)
 Returns a string representation of the specified analysis request object in a standard IGLib form (Mathematica-like format but with C representation of numbers).
static string ToStringMath (IAnalysisResults anres)
 Returns a string representation of the specified analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers).
static void LoadStringRequestMath (string requestString, ref AnalysisResults anres)
 Reads analysis request data.
static void LoadStringMath (string analysisOutputString, ref AnalysisResults anres)
 Reads analysis results data.
static void SaveRequestMath (IAnalysisResults anres, string filePath)
 Saves the specified analysis request to a file. If the file already exists then it is overwritten.
static void SaveRequestMath (IAnalysisResults anres, string filePath, bool append)
 Saves the specified analysis request to a file.
static void SaveMath (IAnalysisResults anres, string filePath)
 Saves the specified analysis results to a file. If the file already exists then it is overwritten.
static void SaveMath (IAnalysisResults anres, string filePath, bool append)
 Saves the specified analysis results to a file.
static void LoadRequestMath (string filePath, ref AnalysisResults anResults)
 Loads analysis request data from a file in standard mathematical format and stores it in the specified analysis results object.
static void LoadMath (string filePath, ref AnalysisResults anResults)
 Loads analysis results from a file in standard mathematical format and stores it in the specified analysis results object.
static void SaveRequestJson (AnalysisResults anResulsts, string filePath)
 Saves (serializes) the specified analysis request to the specified JSON file. File is owerwritten if it exists.
static void SaveRequestJson (AnalysisResults anResults, string filePath, bool append)
 Saves (serializes) the specified analysis request to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.
static void LoadRequestJson (string filePath, ref AnalysisResults anResultsRestored)
 Restores (deserializes) analysis request from the specified file in JSON format.
static void SaveJson (AnalysisResults anResulsts, string filePath)
 Saves (serializes) the specified analysis results to the specified JSON file. File is owerwritten if it exists.
static void SaveJson (AnalysisResults anResults, string filePath, bool append)
 Saves (serializes) the specified analysis results to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.
static void LoadJson (string filePath, ref AnalysisResults anResultsRestored)
 Restores (deserializes) analysis results from the specified file in JSON format.
static AnalysisResults CreateExample (int numParameters, int numConstraints, bool reqObjective, bool reqConstraints, bool reqObjectiveGradient, bool reqConstraintGradients, bool reqObjectiveHessian, bool reqConstraintHessians)
 Creates an example analysis results object according to parameters, with some arbitrary result components.

Static Protected Member Functions

static void AppendRequestFlagsMath (StringBuilder sb, IAnalysisResults anres)

Protected Attributes

int _numParameters = 0
int _numObjectives = 1
int _numConstraints = 0
int _numEqualityConstraints = 0
IVector _parameters
double _objective
IVector _objectiveGradient
IMatrix _objectiveHessian
List< double > _constraints
List< IVector_constraintGradients
List< IMatrix_constraintHessians
bool _copyReferences = false
bool _reqObjective = false
bool _reqConstraints = false
bool _reqObjectiveGradient = false
bool _reqConstraintGradients = false
bool _reqObjectiveHessian = false
bool _reqConstraintHessians = false
int _errorCode = 0
string _errorString = null
bool _calcObjective = false
bool _calcConstraints = false
bool _calcObjectiveGradient = false
bool _calcConstraintGradients = false
bool _calcObjectiveHessian = false
bool _calcConstraintHessians = false

Properties

virtual int NumParameters [get, set]
 Number of parameters.
virtual int NumObjectives [get, set]
 Number of objective functions (normally 1 for this type, but can be 0).
virtual int NumConstraints [get, set]
 Number of constraints.
virtual int NumEqualityConstraints [get, set]
 Number of equality constraints.
virtual int NumInequalityConstraints [get]
 Returns number of inequality constraints.
virtual bool CopyReferences [get, set]
 Indicates whether just references can be copied when setting optimization parameters or results. If false then deep copy is always performed. Default is false.
virtual IVector Parameters [get, set]
 Optimization parameters. If CopyReferences=true (false by default) then only the reference is copied when assigning.
virtual double Objective [get, set]
 Value of the objective function.
virtual IVector ObjectiveGradient [get, set]
 Objective function gradient. If CopyReferences=true (false by default) then only the reference is copied in assignments.
virtual List< double > Constraints [get, set]
 Constraint function values. If CopyReferences=true (false by default) then only the list reference is copied in assignments.
virtual List< IVectorConstraintGradients [get, set]
 Constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied in assignments.
virtual IMatrix ObjectiveHessian [get, set]
 Objective function Hessian (matrix of second derivatives). If CopyReferences=true (false by default) then only the reference is copied in assignments.
virtual List< IMatrixConstraintHessians [get, set]
 Constraint functions' Hessians (matrices of second derivatives). If CopyReferences=true (false by default) then only the list reference is copied in assignments.
virtual bool ReqObjective [get, set]
 Indicates whether calculation of objective function is/was requested.
virtual bool ReqObjectiveGradient [get, set]
 Indicates whether calculation of objective function gradient is/was requested.
virtual bool ReqObjectiveHessian [get, set]
 Indicates whether calculation of objective function Hessian is/was requested.
virtual bool ReqConstraints [get, set]
 Indicates whether calculation of constraint functions is/was requested.
virtual bool ReqConstraintGradients [get, set]
 Indicates whether calculation of constraint functions gradient is/was requested.
virtual bool ReqConstraintHessians [get, set]
 Indicates whether calculation of constraint functions Hessian is/was requested.
virtual int ErrorCode [get, set]
 Error code. 0 - everything is OK. negative value - something went wrong.
virtual String ErrorString [get, set]
 Error string indicating what went wrong.
virtual bool Calculated [get, set]
 Collectively gets or sets calculated flags. Set false: all calculated flags are set to false. Set true: all calculated flags for which the corresponding request flags are true, are set to truee, others are set to false. Get: returns true if all the flags for which the corresponding request flags are true, are also true. Otherwise returns false.
virtual bool CalculatedObjective [get, set]
 Indicates whether calculation of objective function is/was requested.
virtual bool CalculatedObjectiveGradient [get, set]
 Indicates whether calculation of objective function gradient is/was requested.
virtual bool CalculatedObjectiveHessian [get, set]
 Indicates whether calculation of objective function Hessian is/was requested.
virtual bool CalculatedConstraints [get, set]
 Indicates whether calculation of constraint functions is/was requested.
virtual bool CalculatedConstraintGradients [get, set]
 Indicates whether calculation of constraint functions gradient is/was requested.
virtual bool CalculatedConstraintHessians [get, set]
 Indicates whether calculation of constraint functions Hessian is/was requested.

Static Private Member Functions

static string ToStringMath (bool value)
 Returns a atring representation of a boolean value: "0" for false and "1" for true.
static void ReadAnalysisRequest (string filePath, ref IVector parameters, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr, ref string cd)
 Read the analysis data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }.
static void GetAnalysisRequest (string requestString, ref IVector parameters, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr, ref string cd)
 Read the analysis request data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }.
static void ReadAnalysisResult (string filePath, ref IVector parameters, ref bool calcobj, ref bool calcconstr, ref bool calcgradobj, ref bool calcgradconstr, ref double obj, ref IVector constr, ref IVector dobjdp, ref IVector[] dconstr, ref int errorcode, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr)
 Read the analysis result data from data file Format:
static void GetAnalysisResult (string requestString, ref IVector parameters, ref bool calcobj, ref bool calcconstr, ref bool calcgradobj, ref bool calcgradconstr, ref double obj, ref IVector constr, ref IVector dobjdp, ref IVector[] dconstr, ref int errorcode, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr)
 Read the analysis result data from data file Format:

Detailed Description

Single objective optimization analysis results. Used to transfer parameters input (e.g. vector of parameters, request flags) to the analysis function and to store analysis output results (e.g. objective and constraint functions, their gradients, error codes, and flags indicating what has actually been calculated). REMARKS: Property CopyReferences specifies whether only references are copied when individial object fields are assigned & set (when the property is true), or values are actually copied (when false - deep copy). Each setter method also has the variant that always copies only the reference (function name appended by "Reference"). This makes possible to avoid duplication of allocated data and also to avoid having different data with the same references. AGREEMENTS: Optimization problem is defined as minimize f(x), subject to: c_i(x)<=0, i=0...NI-1 c_j(x)=0, j=NI...NI+NE-1. Here x is vector of parameters, f(x) is the objective function, and c_i(x) and c_j(c) are constraint functions. NI is number of inequality constraints and NE is number of equality constraints. If there are equality constraints then they are listed after inequality constraints.

$A Igor Jan08 Jun08;


Constructor & Destructor Documentation

IG::Num::AnalysisResults::AnalysisResults ( ) [inline]

1 parameter, no constraints, 1 objective function. No gradients required

IG::Num::AnalysisResults::AnalysisResults ( bool  reqGradients) [inline]

1 parameter, no constraints, 1 objective function.

Parameters:
reqGradientsWhether gradient of the objective function is required.
IG::Num::AnalysisResults::AnalysisResults ( int  numParameters) [inline]

Specified number of parameters, 1 objective, no constraints. No gradients required.

Parameters:
numParametersNumber of parameters.
IG::Num::AnalysisResults::AnalysisResults ( int  numParameters,
bool  reqGradients 
) [inline]

Specified number of parameters, 1 objective, no constraints. No gradients required.

Parameters:
numParametersNumber of parameters.
reqGradientsWhether gradients are requested.
IG::Num::AnalysisResults::AnalysisResults ( int  numParameters,
int  numConstraints 
) [inline]

Specified number of parameters and constraints, 1 objective. No gradients required.

Parameters:
numParametersNumber of parameters.
numConstraintsNumber of constraints.
IG::Num::AnalysisResults::AnalysisResults ( int  numParameters,
int  numConstraints,
bool  reqGradients 
) [inline]

Specified number of parameters and constraints, 1 objective. No gradients required.

Parameters:
numParametersNumber of parameters.
numConstraintsNumber of constraints.

Member Function Documentation

virtual bool IG::Num::AnalysisResults::IsEqualityConstraint ( int  which) [inline, virtual]

Returns true if the specified constraint is an equality constraint, and false otherwise.

Parameters:
whichIndex of constraint to determine the type.
Returns:
True if the specified constraint is equality constraint, false otherwise.
virtual IVector IG::Num::AnalysisResults::GetParameters ( ) [inline, virtual]

Returns vector of optimization parameters.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetParameters ( IVector  value) [inline, virtual]

Sets the vector of optimization parameters. If CopyReferences=true (false by default) then only the reference is copied.

Parameters:
valueValue to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetParametersReference ( IVector  reference) [inline, virtual]

Sets the vector of optimization parameters. Only the reference is copied.

Parameters:
valueReference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetParameter ( int  index) [inline, virtual]

Returns specific optimization parameter. Throws exception if not defined or index out of bounds.

Parameters:
iindexIndex of parameter to be returned (counting from 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetParameter ( int  index,
double  value 
) [inline, virtual]

Sets the specified optimization parameter.

Parameters:
indexIndex of parameter to be set (counting from 0).
valueParameter value.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetObjective ( ) [inline, virtual]

Returns the value of the objective function./summary>

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjective ( double  value) [inline, virtual]

Sets the value of the objective function.

Parameters:
valueValue to be assigned to the objective function.

Implements IG::Num::IAnalysisResults.

virtual IVector IG::Num::AnalysisResults::GetObjectiveGradient ( ) [inline, virtual]

Returns the objective function gradient.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjectiveGradient ( IVector  value) [inline, virtual]

Sets the objective function gradient. If CopyReferences=true (false by default) then only the reference is copied.

Parameters:
valueValue to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjectiveGradientReference ( IVector  reference) [inline, virtual]

Sets the objective function gradient. Only the reference is copied.

Parameters:
valueReference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetObjectiveGradient ( int  index) [inline, virtual]

Returns the specified component of the objective function gradient.

Parameters:
indexIndex of the component.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjectiveGradient ( int  index,
double  value 
) [inline, virtual]

Sets the specified component of the objective function gradient.

Parameters:
indexIndex of objective gradient component to be set.
valueValue of the objective gradient component.

Implements IG::Num::IAnalysisResults.

virtual List<double> IG::Num::AnalysisResults::GetConstraints ( ) [inline, virtual]

Returns a list of constraint function values.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraints ( List< double >  values) [inline, virtual]

Sets the list of constraint function values. If CopyReferences=true (false by default) then only the list reference is copied.

Parameters:
valuesValues of constraint functions.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintsReference ( List< double >  reference) [inline, virtual]

Sets the list of constraint function values. Only the list reference is copied.

Parameters:
valuesReference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetConstraint ( int  which) [inline, virtual]

Returns the specified constraint function value.

Parameters:
whichSpecifies which constraint function to return (counting from 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraint ( int  which,
double  value 
) [inline, virtual]

Sets the specified constraint function value.

Parameters:
whichSpecifies which constraint function is set (counting from 0).
valueAssigned value of the constraint function.

Implements IG::Num::IAnalysisResults.

virtual List<IVector> IG::Num::AnalysisResults::GetConstraintGradients ( ) [inline, virtual]

Returns a list of constraint function gradients.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintGradients ( List< IVector values) [inline, virtual]

Sets constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied.

Parameters:
valuesValue to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintGradientsReference ( List< IVector reference) [inline, virtual]

Sets constraint function gradients. Only the list reference is copied.

Parameters:
valuesReference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual IVector IG::Num::AnalysisResults::GetConstraintGradient ( int  which) [inline, virtual]

Returns the gradient of the specified constraint function.

Parameters:
whichSpecifies which constraint function to take (couonted from 0).

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetConstraintGradient ( int  which,
int  index 
) [inline, virtual]

Returns the specific constraint function gradient component.

Parameters:
whichSpecifies which constraint function to take (couonted from 0).
indexSpecifies gradient component (conted form 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintGradient ( int  which,
IVector  value 
) [inline, virtual]

Sets the specified constraint function gradient. If CopyReferences=true (false by default) then only the reference is copied.

Parameters:
whichSpecifies which constraint function to take (couonted from 0).
valueValue of the gradient to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintGradientReference ( int  which,
IVector  reference 
) [inline, virtual]

Sets the specified constraint function gradient. Only the reference is copied.

Parameters:
whichSpecifies which constraint function to take (couonted from 0).
valueGradient reference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintGradient ( int  which,
int  index,
double  value 
) [inline, virtual]

Sets the specified constraint fuction gradient component.

Parameters:
whichSpecifies which constraint function to take (couonted from 0).
indexSpecified index of gradient coponent to be set.
valueValue to be assigned to the specified component.

Implements IG::Num::IAnalysisResults.

virtual IMatrix IG::Num::AnalysisResults::GetObjectiveHessian ( ) [inline, virtual]

Returns the objective function's Hessian.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjectiveHessian ( IMatrix  value) [inline, virtual]

Sets the objective functions' Hessian. If CopyReferences=true (false by default) then only the reference is copied.

Parameters:
valueValue to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjectiveHessianReference ( IMatrix  reference) [inline, virtual]

Sets the objective functions' Hessian. Only the reference is copied.

Parameters:
valueReference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetObjectiveHessian ( int  rowIndex,
int  columnIndex 
) [inline, virtual]

Returns the specified component of the objective function Hessian.

Parameters:
rowIndexRow index of the component (counting from 0).
columnIndexColumn index of the component (counting from 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetObjectiveHessian ( int  rowIndex,
int  columnIndex,
double  value 
) [inline, virtual]

Sets the specified component of the objective function's Hessian.

Parameters:
rowIndexRow index of the component (counting from 0).
columnIndexColumn index of the component (counting from 0).
valueValue to be assigned to Hessian.

Implements IG::Num::IAnalysisResults.

virtual List<IMatrix> IG::Num::AnalysisResults::GetConstraintHessians ( ) [inline, virtual]

Returns the list of constraint functions' Hessians.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintHessians ( List< IMatrix values) [inline, virtual]

Sets constraint functios' Hessians. If CopyReferences=true (false by default) then only the list reference is copied.

Parameters:
valuesList of Hessians to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintHessiansReference ( List< IMatrix reference) [inline, virtual]

Sets constraint functios' Hessians. Only the list reference is copied.

Parameters:
valuesReference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual IMatrix IG::Num::AnalysisResults::GetConstraintHessian ( int  which) [inline, virtual]

Returns Hessian of the specified constraint function.

Parameters:
whichSpecifies which constraint function it applies to (counting from 0).

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetConstraintHessian ( int  which,
int  rowIndex,
int  columnIndex 
) [inline, virtual]

Returns the specified component of Hessian of the specified constraint function.

Parameters:
whichSpecifies which constraint function it applies to (counting from 0).
rowIndexRow index of the component (counting from 0).
columnIndexColumn index of the component (counting from 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintHessian ( int  which,
IMatrix  value 
) [inline, virtual]

Sets the specified constraint function's Hessian. If CopyReferences=true (false by default) then only the reference is copied.

Parameters:
whichSpecifies which constraint function it applies to (counting from 0).
valueHessian matrix to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintHessianReference ( int  which,
IMatrix  reference 
) [inline, virtual]

Sets the specified constraint function's Hessian. Only the reference is copied.

Parameters:
whichSpecifies which constraint function it applies to (counting from 0).
valueHessian matrix reference to be assigned.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetConstraintHessian ( int  which,
int  rowIndex,
int  columnIndex,
double  value 
) [inline, virtual]

Sets the specified component of the specified constraint's Hessian.

Parameters:
whichSpecifies which constraint function it applies to (counting from 0).
rowIndexRow index of the component (counting from 0).
columnIndexColumn index of the component (counting from 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::NullifyAll ( ) [inline, virtual]

Sets all objects (parameters and result objects) to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::NullifyResults ( ) [inline, virtual]

Sets all result objects to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateParameters ( ) [inline, virtual]

Allocates space for parameters.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateRequested ( ) [inline, virtual]

Allocates space for all requested result objects.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateObjectiveGradient ( ) [inline, virtual]

Allocate space for objective function gradient.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateObjectiveHessian ( ) [inline, virtual]

Allocates space for objective function Hessian.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstraintsList ( ) [inline, virtual]

Allocates space for list of constraint functions.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstraintGradientsList ( ) [inline, virtual]

Allocates space for list of constraint function gradients.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstrainGradients ( ) [inline, virtual]

Allocates space for constraint function gradients (including for the list, if necessarty).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstraintGradient ( int  which) [inline, virtual]

Allocates space for the specified constraint function gradient.

Parameters:
whichSpecifies which constraint function it applies to (countinf form 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstraintHessiansList ( ) [inline, virtual]

Allocates space for the list of constraint functions' Hessians.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstraintHessians ( ) [inline, virtual]

Allocates space for constraint functions' Hessians (including space for the list, if necessary).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::AllocateConstraintHessian ( int  which) [inline, virtual]

Allocates space for the specified constraint fucnction's Hessian.

Parameters:
whichSpecifies which constraint function it applies to (conting form 0).

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::ResetResults ( ) [inline, virtual]

Sets all calculated flags to false, error code to 0 (no error) and error string to null.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetDimensions ( int  numParameters,
int  numConstraints 
) [inline, virtual]

Sets the dimension of the analysis results object according to the specified values. Number of objective functions is set to 1.

Parameters:
numParametersNumber of parameters.
numConstraintsNumber of constraints.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::SetDimensions ( int  numParameters,
int  numObjectives,
int  numConstraints 
) [inline, virtual]

Sets the dimension of the analysis results object according to the specified values.

Parameters:
numParametersNumber of parameters.
numObjectivesNumber of objective functions.
numConstraintsNumber of constraints.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::PrepareResultStorage ( ) [inline, virtual]

Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. Things whose calculation is not requested are not calculated.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::PrepareResultStorage ( bool  resetCalculatedFlags) [inline, virtual]

Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. Things whose calculation is not requested are not calculated.

Parameters:
resetCalculatedFlagsWhether the calculation flags are reset to false or not.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::PrepareResultStorage ( int  numParameters,
int  numConstraints 
) [inline, virtual]

Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters and constraints while number of objective functions is set to 1).Things whose calculation is not requested are not calculated.

Parameters:
numParametersNumber of parameters.
numConstraintsNumber of constraints.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::PrepareResultStorage ( int  numParameters,
int  numObjectives,
int  numConstraints 
) [inline, virtual]

Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated.

Parameters:
numParametersNumber of parameters.
numObjectivesNumber of objective functions.
numConstraintsNumber of constraints.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::PrepareResultStorage ( int  numParameters,
int  numObjectives,
int  numConstraints,
bool  resetCalculatedFlags 
) [inline, virtual]

Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated.

Parameters:
numParametersNumber of parameters.
numObjectivesNumber of objective functions.
numConstraintsNumber of constraints.
resetCalculatedFlagsWhether the calculation flags are reset to false or not.

Implements IG::Num::IAnalysisResults.

virtual void IG::Num::AnalysisResults::Copy ( IAnalysisResults  results) [inline, virtual]

Copies data from another analysis results.

Parameters:
resAnalysis results which data is copied from.

Implements IG::Num::IAnalysisResults.

virtual IAnalysisResults IG::Num::AnalysisResults::GetCopy ( ) [inline, virtual]

Returns an exact deep copy of the current object.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::IsViolated ( int  which,
double  equalityTolerance 
) [inline, virtual]

Returns true if the specified constraint is violated according to the current analysis results, false otherwise.

Parameters:
whichSpecifies the constraint in question.
equalityToleranceTolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated.
Returns:
True if the constraint is violated, false if not. Constraint is violated when the corresponding constraint function is greater than 0.
Exceptions:
IndexOutOfRangeExceptionwhen constraint index is smaller lesser than 0 or greater than the number of constraints.
InvalidOperationExceptionwhen constraints are not evaluated.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::IsViolated ( int  which) [inline, virtual]

Returns true if the specified constraint is violated according to the current analysis results, false otherwise.

Parameters:
whichSpecifies the constraint in question.
Returns:
True if the constraint is violated, false if not. Constraint is violated when the corresponding constraint function is greater than 0.
Exceptions:
IndexOutOfRangeExceptionwhen constraint index is smaller lesser than 0 or greater than the number of constraints.
InvalidOperationExceptionwhen constraints are not evaluated.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::IsFeasible ( double  equalityTolerance) [inline, virtual]

Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true.

Returns:
True if the current analysis results represent a feasible point, false otherwise.
Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::IsFeasible ( ) [inline, virtual]

Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true.

Returns:
True if the current analysis results represent a feasible point, false otherwise.
Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::GetNumViolatedConstraints ( double  equalityTolerance) [inline, virtual]

Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.

Parameters:
equalityToleranceTolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated.
Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::GetNumViolatedConstraints ( ) [inline, virtual]

Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.

Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetSumResiduals ( double  equalityTolerance) [inline, virtual]

Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.

Parameters:
equalityToleranceTolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated.
Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetSumResiduals ( ) [inline, virtual]

Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.

Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetMaximalResidual ( double  equalityTolerance) [inline, virtual]

Returns the largest constraint function value corresponding to any violated constraint in the current analysis results, or 0 if there are no violated constraints. Specific constraint is violated if the corresponding constraint function is greater than 0.

Parameters:
equalityToleranceTolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated.
Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetMaximalResidual ( ) [inline, virtual]

Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.

Exceptions:
InvalidOperationExceptionIf constraint optimization results do not contain evaluated constraint values.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetPenaltyTerm ( int  which,
IPenaltyEvaluator  evaluator 
) [inline, virtual]

Returns value of the penalty term corresponding to the specified constraint, calculated by the specified penalty evaluator.

Parameters:
whichSpecifies the constraint in question.
evaluatorPenalty function evaluator that evaluates penalty functions.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetSumPenaltyTerms ( IPenaltyEvaluator  evaluator) [inline, virtual]

Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator.

Parameters:
evaluatorPenalty function evaluator that evaluates penalty functions.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::GetMaxPenaltyTerm ( IPenaltyEvaluator  evaluator) [inline, virtual]

Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator.

Parameters:
evaluatorPenalty function evaluator that evaluates penalty functions.

Implements IG::Num::IAnalysisResults.

static string IG::Num::AnalysisResults::ToStringMath ( bool  value) [inline, static, private]

Returns a atring representation of a boolean value: "0" for false and "1" for true.

Parameters:
valueValue whose string representation is returned.
Returns:
static void IG::Num::AnalysisResults::AppendRequestFlagsMath ( StringBuilder  sb,
IAnalysisResults  anres 
) [inline, static, protected]
static string IG::Num::AnalysisResults::ToString ( IAnalysisResults  anres) [inline, static]

Returns a string representation of the specified analysis results object in a standard IGLib form.

Parameters:
anresObject whose string representation is returned.
static string IG::Num::AnalysisResults::ToStringRequestMath ( IAnalysisResults  anres) [inline, static]

Returns a string representation of the specified analysis request object in a standard IGLib form (Mathematica-like format but with C representation of numbers).

Parameters:
anresObject whose string representation is returned.
static string IG::Num::AnalysisResults::ToStringMath ( IAnalysisResults  anres) [inline, static]

Returns a string representation of the specified analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers).

Parameters:
anresObject whose string representation is returned.
static void IG::Num::AnalysisResults::LoadStringRequestMath ( string  requestString,
ref AnalysisResults  anres 
) [inline, static]

Reads analysis request data.

Parameters:
requestString
anres

$A Igor Mar11; Tako78 Apr11;

static void IG::Num::AnalysisResults::LoadStringMath ( string  analysisOutputString,
ref AnalysisResults  anres 
) [inline, static]

Reads analysis results data.

Parameters:
analysisOutputStringString from which data is read.
anresObject where results are stored.

$A Igor Mar11; Tako78 Apr11;

static void IG::Num::AnalysisResults::SaveRequestMath ( IAnalysisResults  anres,
string  filePath 
) [inline, static]

Saves the specified analysis request to a file. If the file already exists then it is overwritten.

Parameters:
anresObject from which analysis request is saved.
filePathPath to the file where analysis request is stored.
static void IG::Num::AnalysisResults::SaveRequestMath ( IAnalysisResults  anres,
string  filePath,
bool  append 
) [inline, static]

Saves the specified analysis request to a file.

Parameters:
anresObject from which analysis request is saved.
filePathPath to the file where analysis request is stored.
appendIf true then contents are appended to the end of the file if the file already exists.
static void IG::Num::AnalysisResults::SaveMath ( IAnalysisResults  anres,
string  filePath 
) [inline, static]

Saves the specified analysis results to a file. If the file already exists then it is overwritten.

Parameters:
anresObject from which analysis results are saved.
filePathPath to the file where analysis results are stored.
static void IG::Num::AnalysisResults::SaveMath ( IAnalysisResults  anres,
string  filePath,
bool  append 
) [inline, static]

Saves the specified analysis results to a file.

Parameters:
anresObject from which analysis results are saved.
filePathPath to the file where analysis results are stored.
appendIf true then contents are appended to the end of the file if the file already exists.
static void IG::Num::AnalysisResults::LoadRequestMath ( string  filePath,
ref AnalysisResults  anResults 
) [inline, static]

Loads analysis request data from a file in standard mathematical format and stores it in the specified analysis results object.

Parameters:
filePathPath to the file from which object is read.
anResultsObject where data is stored.
static void IG::Num::AnalysisResults::LoadMath ( string  filePath,
ref AnalysisResults  anResults 
) [inline, static]

Loads analysis results from a file in standard mathematical format and stores it in the specified analysis results object.

Parameters:
filePathPath to the file from which object is read.
anResultsObject where data is stored.
static void IG::Num::AnalysisResults::SaveRequestJson ( AnalysisResults  anResulsts,
string  filePath 
) [inline, static]

Saves (serializes) the specified analysis request to the specified JSON file. File is owerwritten if it exists.

Parameters:
anResulstsObject that is saved to a file.
filePathPath to the file in which object is is saved.
static void IG::Num::AnalysisResults::SaveRequestJson ( AnalysisResults  anResults,
string  filePath,
bool  append 
) [inline, static]

Saves (serializes) the specified analysis request to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.

Parameters:
anResultsObject that is saved to a file.
filePathPath to the file in which object is is saved.
appendSpecifies whether serialized data is appended at the end of the file in the case that the file already exists.
static void IG::Num::AnalysisResults::LoadRequestJson ( string  filePath,
ref AnalysisResults  anResultsRestored 
) [inline, static]

Restores (deserializes) analysis request from the specified file in JSON format.

Parameters:
filePathFile from which object is restored.
anResultsRestoredObject that is restored by deserialization.
static void IG::Num::AnalysisResults::SaveJson ( AnalysisResults  anResulsts,
string  filePath 
) [inline, static]

Saves (serializes) the specified analysis results to the specified JSON file. File is owerwritten if it exists.

Parameters:
anResulstsObject that is saved to a file.
filePathPath to the file in which object is is saved.
static void IG::Num::AnalysisResults::SaveJson ( AnalysisResults  anResults,
string  filePath,
bool  append 
) [inline, static]

Saves (serializes) the specified analysis results to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.

Parameters:
anResultsObject that is saved to a file.
filePathPath to the file in which object is is saved.
appendSpecifies whether serialized data is appended at the end of the file in the case that the file already exists.
static void IG::Num::AnalysisResults::LoadJson ( string  filePath,
ref AnalysisResults  anResultsRestored 
) [inline, static]

Restores (deserializes) analysis results from the specified file in JSON format.

Parameters:
filePathFile from which object is restored.
anResultsRestoredObject that is restored by deserialization.
static void IG::Num::AnalysisResults::ReadAnalysisRequest ( string  filePath,
ref IVector  parameters,
ref bool  reqcalcobj,
ref bool  reqcalcconstr,
ref bool  reqcalcgradobj,
ref bool  reqcalcgradconstr,
ref string  cd 
) [inline, static, private]

Read the analysis data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }.

Parameters:
filePathPath to the file where training data are saved.
parametersInput and output parameters: { p1, p2, … }.
reqcalcobjFlag: reqcalcobj.
reqcalcconstrFlag: reqcalcconstr.
reqcalcgradobjFlag: reqcalcgradobj.
reqcalcgradconstrFlag: reqcalcgradconstr.
cdString: cd.

$A Tako78 Mar11;

static void IG::Num::AnalysisResults::GetAnalysisRequest ( string  requestString,
ref IVector  parameters,
ref bool  reqcalcobj,
ref bool  reqcalcconstr,
ref bool  reqcalcgradobj,
ref bool  reqcalcgradconstr,
ref string  cd 
) [inline, static, private]

Read the analysis request data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }.

Parameters:
requestStringString with request analysis data.
parametersInput and output parameters: { p1, p2, … }.
reqcalcobjFlag: reqcalcobj.
reqcalcconstrFlag: reqcalcconstr.
reqcalcgradobjFlag: reqcalcgradobj.
reqcalcgradconstrFlag: reqcalcgradconstr.
cdString: cd.

$A Tako78 Mar11;

static void IG::Num::AnalysisResults::ReadAnalysisResult ( string  filePath,
ref IVector  parameters,
ref bool  calcobj,
ref bool  calcconstr,
ref bool  calcgradobj,
ref bool  calcgradconstr,
ref double  obj,
ref IVector  constr,
ref IVector  dobjdp,
ref IVector[]  dconstr,
ref int  errorcode,
ref bool  reqcalcobj,
ref bool  reqcalcconstr,
ref bool  reqcalcgradobj,
ref bool  reqcalcgradconstr 
) [inline, static, private]

Read the analysis result data from data file Format:

Parameters:
filePathPath to the file where training data are saved.
parametersInput and output parameters: { p1, p2, … }.
calcobjFlag for the objective function.
calcconstrFlag for constraint functions.
calcgradobjGradient of the objective function.
calcgradconstrGradients of constraint functions.
objValue of the objective functions.
constrValues of the constraint functions.
dobjdpDerivatives of the objective function.
dconstrDerivatives of individual constraint functions.
errorcodeInteger error code of analysis.
reqcalcobjFlag for calculation of the various values.
reqcalcconstrFlag for calculation of the various values.
reqcalcgradobjFlag for calculation of the various values.
reqcalcgradconstrFlag for calculation of the various values.

$A Tako78 Apr11;

static void IG::Num::AnalysisResults::GetAnalysisResult ( string  requestString,
ref IVector  parameters,
ref bool  calcobj,
ref bool  calcconstr,
ref bool  calcgradobj,
ref bool  calcgradconstr,
ref double  obj,
ref IVector  constr,
ref IVector  dobjdp,
ref IVector[]  dconstr,
ref int  errorcode,
ref bool  reqcalcobj,
ref bool  reqcalcconstr,
ref bool  reqcalcgradobj,
ref bool  reqcalcgradconstr 
) [inline, static, private]

Read the analysis result data from data file Format:

Parameters:
resultStringString with result analysis data.
parametersInput and output parameters: { p1, p2, … }.
calcobjFlag for the objective function.
calcconstrFlag for constraint functions.
calcgradobjGradient of the objective function.
calcgradconstrGradients of constraint functions.
objValue of the objective functions.
constrValues of the constraint functions.
dobjdpDerivatives of the objective function.
dconstrDerivatives of individual constraint functions.
errorcodeInteger error code of analysis.
reqcalcobjFlag for calculation of the various values.
reqcalcconstrFlag for calculation of the various values.
reqcalcgradobjFlag for calculation of the various values.
reqcalcgradconstrFlag for calculation of the various values.

$A Tako78 Apr11;

override string IG::Num::AnalysisResults::ToString ( ) [inline]

Returns a string representation of the current analysis results object in a standard IGLib form.

string IG::Num::AnalysisResults::ToStringMath ( ) [inline]

Returns a string representation of the current analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers).

static AnalysisResults IG::Num::AnalysisResults::CreateExample ( int  numParameters,
int  numConstraints,
bool  reqObjective,
bool  reqConstraints,
bool  reqObjectiveGradient,
bool  reqConstraintGradients,
bool  reqObjectiveHessian,
bool  reqConstraintHessians 
) [inline, static]

Creates an example analysis results object according to parameters, with some arbitrary result components.

Parameters:
numParametersNumber of prameters of the optimization problem.
numConstraintsNumber of constraints.
reqObjectiveWhether calculation of the objective function is required.
reqConstraintsWhether calculation of constraint functions is required.
reqObjectiveGradientWhether calculation of objective gradient is required.
reqConstraintGradientsWhether calculation of constraint gradients is required.
reqObjectiveHessianWhether calculation of objective Hessian is required.
reqConstraintHessiansWhether calculation of constraint Hessians is required.

Member Data Documentation

List<double> IG::Num::AnalysisResults::_constraints [protected]
bool IG::Num::AnalysisResults::_reqObjective = false [protected]
string IG::Num::AnalysisResults::_errorString = null [protected]
bool IG::Num::AnalysisResults::_calcObjective = false [protected]

Property Documentation

virtual int IG::Num::AnalysisResults::NumParameters [get, set]

Number of parameters.

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::NumObjectives [get, set]

Number of objective functions (normally 1 for this type, but can be 0).

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::NumConstraints [get, set]

Number of constraints.

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::NumEqualityConstraints [get, set]

Number of equality constraints.

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::NumInequalityConstraints [get]

Returns number of inequality constraints.

virtual bool IG::Num::AnalysisResults::CopyReferences [get, set]

Indicates whether just references can be copied when setting optimization parameters or results. If false then deep copy is always performed. Default is false.

Implements IG::Num::IAnalysisResults.

virtual IVector IG::Num::AnalysisResults::Parameters [get, set]

Optimization parameters. If CopyReferences=true (false by default) then only the reference is copied when assigning.

Implements IG::Num::IAnalysisResults.

virtual double IG::Num::AnalysisResults::Objective [get, set]

Value of the objective function.

Implements IG::Num::IAnalysisResults.

virtual IVector IG::Num::AnalysisResults::ObjectiveGradient [get, set]

Objective function gradient. If CopyReferences=true (false by default) then only the reference is copied in assignments.

Implements IG::Num::IAnalysisResults.

virtual List<double> IG::Num::AnalysisResults::Constraints [get, set]

Constraint function values. If CopyReferences=true (false by default) then only the list reference is copied in assignments.

Implements IG::Num::IAnalysisResults.

virtual List<IVector> IG::Num::AnalysisResults::ConstraintGradients [get, set]

Constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied in assignments.

Implements IG::Num::IAnalysisResults.

virtual IMatrix IG::Num::AnalysisResults::ObjectiveHessian [get, set]

Objective function Hessian (matrix of second derivatives). If CopyReferences=true (false by default) then only the reference is copied in assignments.

Implements IG::Num::IAnalysisResults.

virtual List<IMatrix> IG::Num::AnalysisResults::ConstraintHessians [get, set]

Constraint functions' Hessians (matrices of second derivatives). If CopyReferences=true (false by default) then only the list reference is copied in assignments.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::ReqObjective [get, set]

Indicates whether calculation of objective function is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::ReqObjectiveGradient [get, set]

Indicates whether calculation of objective function gradient is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::ReqObjectiveHessian [get, set]

Indicates whether calculation of objective function Hessian is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::ReqConstraints [get, set]

Indicates whether calculation of constraint functions is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::ReqConstraintGradients [get, set]

Indicates whether calculation of constraint functions gradient is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::ReqConstraintHessians [get, set]

Indicates whether calculation of constraint functions Hessian is/was requested.

Implements IG::Num::IAnalysisResults.

virtual int IG::Num::AnalysisResults::ErrorCode [get, set]

Error code. 0 - everything is OK. negative value - something went wrong.

Implements IG::Num::IAnalysisResults.

virtual String IG::Num::AnalysisResults::ErrorString [get, set]

Error string indicating what went wrong.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::Calculated [get, set]

Collectively gets or sets calculated flags. Set false: all calculated flags are set to false. Set true: all calculated flags for which the corresponding request flags are true, are set to truee, others are set to false. Get: returns true if all the flags for which the corresponding request flags are true, are also true. Otherwise returns false.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::CalculatedObjective [get, set]

Indicates whether calculation of objective function is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::CalculatedObjectiveGradient [get, set]

Indicates whether calculation of objective function gradient is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::CalculatedObjectiveHessian [get, set]

Indicates whether calculation of objective function Hessian is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::CalculatedConstraints [get, set]

Indicates whether calculation of constraint functions is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::CalculatedConstraintGradients [get, set]

Indicates whether calculation of constraint functions gradient is/was requested.

Implements IG::Num::IAnalysisResults.

virtual bool IG::Num::AnalysisResults::CalculatedConstraintHessians [get, set]

Indicates whether calculation of constraint functions Hessian is/was requested.

Implements IG::Num::IAnalysisResults.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events