All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

OptimizationInterfaces Interface CATIOptGoal

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---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 GetGoalParameter()
Gets the final goal parameter.
o GetGoalParameterOrPub()
Gets the goal publication or the goal parameter.
o GetGoalType()
Gets the goal type.
o GetHighFlag(int&)
Get the high flag attribute value.
o GetHighParm(CATICkeParm_var&)
Get the parameter used to defined the high bound.
o GetHighParmValue(double&)
Get the value of the high parameter if the high flag is equal to 1.
o GetLowFlag(int&)
Get the low flag attribute value.
o GetLowParm(CATICkeParm_var&)
Get the parameter used to defined the low bound.
o GetLowParmValue(double&)
Get the value of the low parameter if the low flag is equal to 1.
o GetPrecision()
Gets the wanted precision.
o GetTargetValue()
Gets the target value parameter.
o GetWeight(double&)
Gets the Goal weight.
o SetGoalParameter(CATICkeParm_var&)
Sets the goal parameter.
o SetGoalParameterOrItsProxy(CATICkeParm_var&)
Sets the goal parameter with the care of selective loading capability.
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 GetGoalParameter
public virtual CATICkeParm_var GetGoalParameter()const = 0
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 GetGoalParameterOrPub
public virtual CATICkeParm_var GetGoalParameterOrPub()const = 0
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 GetGoalType
public virtual CATIOptGoal::Type GetGoalType()const = 0
Gets the goal type.
Returns:
The goal type.
o GetHighFlag
public virtual HRESULT GetHighFlag(int& oHasHighValue) = 0
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 GetHighParm
public virtual HRESULT GetHighParm(CATICkeParm_var& oHighParm) = 0
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 GetHighParmValue
public virtual HRESULT GetHighParmValue(double& oMksHighParmValue) = 0
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 GetLowFlag
public virtual HRESULT GetLowFlag(int& oHasLowValue) = 0
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 GetLowParm
public virtual HRESULT GetLowParm(CATICkeParm_var& oLowParm) = 0
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 GetLowParmValue
public virtual HRESULT GetLowParmValue(double& oMksLowParmValue) = 0
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 GetPrecision
public virtual double GetPrecision()const = 0
Gets the wanted precision.
Returns:
The precision.
o GetTargetValue
public virtual CATICkeParm_var GetTargetValue()const = 0
Gets the target value parameter.
Returns:
The target value parameter.
o GetWeight
public virtual HRESULT GetWeight(double& ioWeight) const = 0
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 SetGoalParameter
public virtual HRESULT SetGoalParameter( const CATICkeParm_var& iParm) = 0
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 SetGoalParameterOrItsProxy
public virtual HRESULT SetGoalParameterOrItsProxy( const CATICkeParm_var& iParm) = 0
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 SetGoalType
public virtual HRESULT SetGoalType(CATIOptGoal::Type iType) = 0
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 HRESULT SetHighFlag(int iHasHighValue) = 0
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 HRESULT SetHighParmValue(double iMksHighParmValue) = 0
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 HRESULT SetLowFlag(int iHasLowValue) = 0
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 HRESULT SetLowParmValue(double iMksLowParmValue) = 0
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 HRESULT SetPrecision(double iPrecision) = 0
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 HRESULT SetTargetValue(double iParmValueMKS) = 0
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 HRESULT SetWeight(double iWeight) = 0
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

Copyright © 2003, Dassault Systèmes. All rights reserved.