All Frameworks Class Hierarchy This Framework Indexes
OptimizationInterfaces Interface CATIOptGoal
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIOptGoal
This interface encapsulates an optimization goal : it has mainly a goal parameter, an objective (minimum, maximum, target value) and a priority
(used only in multigoals optimization).
Method Index
- o
GetGoalParameterOrPub()
- Gets the goal publication or the goal parameter.
- o
GetGoalParameter()
- Gets the final goal parameter.
- o
GetGoalType()
- Gets the goal type.
- o
GetHighFlag(int&)
- Get the high flag attribute value.
- o
GetHighParmValue(double&)
- Get the value of the high parameter if the high flag is equal to 1.
- o
GetHighParm(CATICkeParm_var&)
- Get the parameter used to defined the high bound.
- o
GetLowFlag(int&)
- Get the low flag attribute value.
- o
GetLowParmValue(double&)
- Get the value of the low parameter if the low flag is equal to 1.
- o
GetLowParm(CATICkeParm_var&)
- Get the parameter used to defined the low bound.
- o
GetPrecision()
- Gets the wanted precision.
- o
GetTargetValue()
- Gets the target value parameter.
- o
GetWeight(double&)
- Gets the Goal weight.
- o
SetGoalParameterOrItsProxy(CATICkeParm_var&)
- Sets the goal parameter with the care of selective loading capability.
- o
SetGoalParameter(CATICkeParm_var&)
- Sets the goal parameter.
- o
SetGoalType(CATIOptGoal::Type)
- Sets the goal type.
- o
SetHighFlag(int)
- Valuate the high flag attribute.
- o
SetHighParmValue(double)
- If the high flag is equal to 1, this method sets the value of the high parameter.
- o
SetLowFlag(int)
- Valuate the low flag attribute.
- o
SetLowParmValue(double)
- If the low flag is equal to 1, this method sets the value of the low parameter.
- o
SetPrecision(double)
- Sets the wanted precision (when the goal type is TargetValue).
- o
SetTargetValue(double)
- Sets the value of the target value parameter (when the goal type is TargetValue).
- o
SetWeight(double)
- Sets the Goal weight.
Enumerated Type Index
- o
Type
- Goal possible types:
Methods
o GetGoalParameterOrPub
| public virtual GetGoalParameterOrPub( | ) |
-
Gets the goal publication or the goal parameter.
- Returns:
- The goal publication or the goal parameter.
- If you called SetGoalParameter or SetGoalParameterOrItsProxy by giving
a publication of parameter in argument, this method will return the
the publication.
WARNING : in publication case (the CATICkeParm object returned by GetGoalParameterOrPub() is
different from the one returned by GetGoalParameter()), 2 successive calls to this method
will not return the same CATICkeParm !!!
- In other cases, it will return :
# The proxy of the proxiable parameter you gave while calling SetGoalParameterOrItsProxy(), if one has been linked.
# The non-proxiable parameter you gave while calling SetGoalParameterOrItsProxy() or SetGoalParameter().
o GetGoalParameter
| public virtual GetGoalParameter( | ) |
-
Gets the final goal parameter.
- Returns:
- The final goal parameter.
- If you called SetGoalParameter or SetGoalParameterOrItsProxy by giving
a publication of parameter in argument, this method will return the
parameter pointed by the publication :
For instance, you called one of the
Setxxx method with the publication "...!Part.1!PubOfReal.1" of the parameter Real.1
of Part.1
=> This method will return "Part.1\Real.1" and not exactly what you set
- In other cases, it will return :
# The proxy of the proxiable parameter you gave while calling SetGoalParameterOrItsProxy(), if one has been linked.
# The non-proxiable parameter you gave while calling SetGoalParameterOrItsProxy() or SetGoalParameter().
o GetGoalType
| public virtual GetGoalType( | ) |
-
Gets the goal type.
- Returns:
- The goal type.
o GetHighFlag
| public virtual GetHighFlag( | | oHasHighValue) |
-
Get the high flag attribute value.
- Parameters:
-
- oHasLowValue
- is set to 1 if the goal has a high bound and 0 else.
- Returns:
- S_OK if the reading of the attribute succeeded, E_FAIL else.
o GetHighParmValue
| public virtual GetHighParmValue( | | oMksHighParmValue) |
-
Get the value of the high parameter if the high flag is equal to 1.
- Parameters:
-
- oMksHighParmValue
- the mks value of the high parameter if if the high flag is equal to 1, 0.0 else.
- Returns:
- S_OK if the high flag is equal to 1, E_FAIL else.
o GetHighParm
| public virtual GetHighParm( | | oHighParm) |
-
Get the parameter used to defined the high bound.
- Parameters:
-
- oHighParm
- The high parameter, or NULL_var if the high flag is set to 0.
Notice that, if you changed the goal parameter (call to SetGoalParameter()) since
your last call to GetHighParm(), the high parameter may have change. Indeed, if
the type of the goal parameter has changed, the old high parameter has been replaced by
a new one (whose type is the same as the new goal parameter type).
- Returns:
- S_OK if oHighParm != NULL_var, E_FAIL else.
o GetLowFlag
| public virtual GetLowFlag( | | oHasLowValue) |
-
Get the low flag attribute value.
- Parameters:
-
- oHasLowValue
- is set to 1 if the goal has a low bound and 0 else.
- Returns:
- S_OK if reading attribute succeeded, E_FAIL else.
o GetLowParmValue
| public virtual GetLowParmValue( | | oMksLowParmValue) |
-
Get the value of the low parameter if the low flag is equal to 1.
- Parameters:
-
- oMksLowParmValue
- the mks value of the low parameter if the low flag is equal to 1, 0.0 else.
- Returns:
- S_OK if the low flag is equal to 1, E_FAIL else.
o GetLowParm
| public virtual GetLowParm( | | oLowParm) |
-
Get the parameter used to defined the low bound.
- Parameters:
-
- oLowParm
- The low parameter, or NULL_var if the low flag is set to 0.
Notice that, if you changed the goal parameter (call to SetGoalParameter()) since
your last call to GetLowParm(), the low parameter may have change. Indeed, if
the type of the goal parameter has changed, the old low parameter has been replaced by
a new one (whose type is the same as the new goal parameter type).
- Returns:
- S_OK if oLowParm != NULL_var, E_FAIL else.
o GetPrecision
| public virtual GetPrecision( | ) |
-
Gets the wanted precision.
- Returns:
- The precision.
o GetTargetValue
| public virtual GetTargetValue( | ) |
-
Gets the target value parameter.
- Returns:
- The target value parameter.
o GetWeight
| public virtual GetWeight( | | ioWeight) |
-
Gets the Goal weight.
- Parameters:
-
- ioWeight
- The current weight assigned to the goal. Default value is 1.0.
- Returns:
- S_OK if succeeded, E_FAIL else.
o SetGoalParameterOrItsProxy
| public virtual SetGoalParameterOrItsProxy( | const | iParm) |
-
Sets the goal parameter with the care of selective loading capability.
It means that if the parameter "parm" is in a document different from
the document were the optimization is, this method will keep the link
with the parameter (thanks to a proxy), whereas the SetGoalParameter()
does not (the parameter will not be found).
In other cases, behavior is the same between the two methods.
=> This method allows the optimization to works in Visu Mode.
WARNING : if you call this method with the parameter "p1"in argument,
by calling the GetGoalParameter() method just after, you may not get
the given p1 (but its proxy).
- Parameters:
-
- iParm
- The parameter that must be considered as the goal parameter (i.e. the parameter
to optimize) by the optimization algorithm.
- Returns:
- - S_OK if the link is set to the parameter "iParm"
=> parameter not concerned by selective loading context.
- S_FALSE if the link is set to the proxy of the parameter "iParm"
=> the GetGoalParameter() method will not return "iParm", but its proxy.
- E_FAIL if the link is not set because something failed.
o SetGoalParameter
| public virtual SetGoalParameter( | const | iParm) |
-
Sets the goal parameter.
- Parameters:
-
- iParm
- The parameter that must be considered as the goal parameter (i.e. the parameter
to optimize) by the optimization algorithm.
- Returns:
- - S_OK if the link is set to the parameter "iParm"
- E_FAIL if the link is not set because something failed.
o SetGoalType
| public virtual SetGoalType( | | iType) |
-
Sets the goal type.
- Parameters:
-
- iType
- The goal type to set. Must be one of the types given by the "enum" described above.
- Returns:
- S_OK if succeeded, E_FAIL else.
o SetHighFlag
| public virtual SetHighFlag( | | iHasHighValue) |
-
Valuate the high flag attribute.
- Parameters:
-
- iHasHighValue
- set it to 1 to indicate that the goal has a high bound and 0 else.
- Returns:
- S_OK if succeeded, E_FAIL else.
o SetHighParmValue
| public virtual SetHighParmValue( | | iMksHighParmValue) |
-
If the high flag is equal to 1, this method sets the value of the high parameter.
- Parameters:
-
- iMksHighParmValue
- The mks value to give to the high parameter.
- Returns:
- S_OK if high parameter is valuated, E_FAIL else.
o SetLowFlag
| public virtual SetLowFlag( | | iHasLowValue) |
-
Valuate the low flag attribute.
- Parameters:
-
- iHasLowValue
- set it to 1 to indicate that the goal has a low bound and 0 else.
- Returns:
- S_OK if writing attribute succeeded, E_FAIL else.
o SetLowParmValue
| public virtual SetLowParmValue( | | iMksLowParmValue) |
-
If the low flag is equal to 1, this method sets the value of the low parameter.
- Parameters:
-
- iMksLowParmValue
- The mks value to give to the low parameter.
- Returns:
- S_OK if low parameter is valuated, E_FAIL else.
o SetPrecision
| public virtual SetPrecision( | | iPrecision) |
-
Sets the wanted precision (when the goal type is TargetValue).
This value tells the algorithm if they succeeded to find ojective.
(double in MKS unit).
- Parameters:
-
- iPrecision
- The precision to set.
- Returns:
- S_OK if succeeded, E_FAIL else.
o SetTargetValue
| public virtual SetTargetValue( | | iParmValueMKS) |
-
Sets the value of the target value parameter (when the goal type is TargetValue).
This parameter is always shown in f(x) and equation editors.
- Parameters:
-
- iParmValueMKS
- The MKS value to set.
- Returns:
- S_OK if succeeded, E_FAIL else.
o SetWeight
| public virtual SetWeight( | | iWeight) |
-
Sets the Goal weight.
- Parameters:
-
- iWeight
- The double weight to set.
- Returns:
- S_OK if succeeded, E_FAIL else.
Enumerated Types
o Type
-
enum Type {
Minimum,
Maximum,
TargetValue,
OnlyBoundedVariation,
NoGoal,
CstOnly
}
Goal possible types:
- Parameters:
-
- Minimum
- for mimization type of optimization.
- Maximum
- for maximization type of optimization.
- TargetValue
- for target value type of optimization.
- CstOnly
- is for problems that do not have any goal and only constraints to be satisfied.
- NoGoal
- when the type is not defined.
- OnlyBoundedVariation
This object is included in the file: CATIOptGoal.h
If needed, your Imakefile.mk should include the module: OptimizationItf