All Frameworks Class Hierarchy This Framework Previous Next Indexes
OptimizationInterfaces Interface CATIOptOptimization
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIOptOptimization
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIOptOptimization
Interface dedicated to the management of the optimization feature.
- See also:
- CATIOptFactory
Method Index
- o
AddFreeParameter(CATIOptFreeParameter_var&)
- Adds a free parameter (the free parameters can be modified during the optimization).
- o
GetAlgorithm()
- Gets the algorithm used for this optimization.
- o
GetFreeParameters()
- Returns the collection of free parameters.
- o
GetOptimizationLock(CATULong,CATULong&)
- Returns the lock or unlocked status of some optimization attributes.
- o
GetOptimizationLog()
- Gets the optimization log used.
- o
GetOptimizationType()
- Gets the Optimization type.
- o
GetProblemToSolve()
- Returns the interface describing the problem to optimize.
- o
GetRunningModeFlag()
- Gets the running mode flag.
- o
GetUpdateMode()
- Returns the Update Mode used in Product/Part/Analysis environement.
- o
GetUpdateVisualizationFlag()
- Gets the update visualization flag.
- o
LaunchUpdate(int,CATLISTV(CATBaseUnknown_var)*)
- Launches a model update.
- o
LockOptimization(CATULong,CATULong)
- Specifies if some attributes of the optimization can be modified.
- o
RemoveFreeParameter(CATIOptFreeParameter_var&,int)
- Removes a free parameter (by handler or by index if handler null).
- o
RunHasToStop(int)
- Indicates or forces if the optimization run has to stop or not.
- o
SendOptimizationError(CATUnicodeString&,CATUnicodeString&)
- Sends an optimization error.
- o
SetAlgorithm(CATIOptAlgorithm_var&)
- Sets the algorithm to use for this optimization.
- o
SetOptimizationLog(CATIOptimizationLog_var&)
- Set the optimization log.
- o
SetOptimizationType(CATIOptOptimization::Type)
- Sets the Optimization Type.
- o
SetProblemToSolve(CATIOptProblem_var&)
- Sets the problem to optimize.
- o
SetRunningModeFlag(int&)
- Sets the running mode flag.
- o
SetUpdateMode(CATIOptUpdateManagement::PEOUpdateMode)
- Specifies the Update Mode used in Product/Part/Analysis environement.
- o
SetUpdateVisualizationFlag(int&)
- Sets the update visualization flag.
Enumerated Type Index
- o
OptimizationMode
- Optimization possible running mode.
- o
Type
- Optimization possible types.
Methods
o AddFreeParameter
public virtual HRESULT AddFreeParameter( | const CATIOptFreeParameter_var& | spiFreeParameter) = 0 |
-
Adds a free parameter (the free parameters can be modified during the optimization).
- Parameters:
-
- spiFreeParameter
-
the free parameter to add.
- Returns:
- S_OK if the operation succeeded, E_FAIL else.
o GetAlgorithm
-
Gets the algorithm used for this optimization.
- Returns:
- NULL_var if no algorithm is associated or if it failed.
o GetFreeParameters
-
Returns the collection of free parameters.
A free parameter is a parameter that can be modified during the optimization.
This list mustn't be freed.
o GetOptimizationLock
public virtual HRESULT GetOptimizationLock( | CATULong | iIdentifier, |
| CATULong& | oLock) = 0 |
-
Returns the lock or unlocked status of some optimization attributes.
- Parameters:
-
- iIdentifier
- The number identifying what must be locked or unlocked.
Legal values:
- 1 Inputs.
- 2 Outputs.
- 3 Run.
- oLock,
- the lock status 0 for not locked, 1 for locked, 2 for seen, 3 for hidden (2,3 for Run only).
- Returns:
- the success (S_OK) or failure (E_FAIL) of the method.
o GetOptimizationLog
-
Gets the optimization log used.
- Returns:
- NULL_var if no optimization log is associated or if it failed.
o GetOptimizationType
public virtual CATIOptOptimization::Type GetOptimizationType( | )const = 0 |
-
Gets the Optimization type.
- Returns:
- The Optimization type.
o GetProblemToSolve
-
Returns the interface describing the problem to optimize.
- Returns:
- the interface describing the problem to optimize.
o GetRunningModeFlag
public virtual int GetRunningModeFlag( | )const = 0 |
-
Gets the running mode flag.
- Returns:
- 1 if the undo log is locked during the run ("Light Run"), and O else.
o GetUpdateMode
public virtual CATIOptUpdateManagement::PEOUpdateMode GetUpdateMode( | )const = 0 |
-
Returns the Update Mode used in Product/Part/Analysis environement.
- Parameters:
-
- iUpdateMode
- The update mode.
o GetUpdateVisualizationFlag
public virtual int GetUpdateVisualizationFlag( | )const = 0 |
-
Gets the update visualization flag.
- Returns:
- 1 if the model modifications are visible during the run, and O else.
o LaunchUpdate
-
Launches a model update.
For example, call it when you have valuated
the free parameters (in the algorithm run) and you want the model to be up to date.
o LockOptimization
public virtual HRESULT LockOptimization( | CATULong | iIdentifier, |
| CATULong | iLock) = 0 |
-
Specifies if some attributes of the optimization can be modified.
- Parameters:
-
- iIdentifier
- The number identifying what must be locked or unlocked.
Legal values:
- 1 Inputs.
- 2 Outputs.
- 3 Run.
- iLock
- 0 for unlocked, 1 for locked, 2 for seen, 3 for hidden (2,3 for Run only).
- Returns:
- the success (S_OK) or failure (E_FAIL) of the method.
o RemoveFreeParameter
public virtual HRESULT RemoveFreeParameter( | const CATIOptFreeParameter_var& | spiFreeParameter, |
| int | iIndex) = 0 |
-
Removes a free parameter (by handler or by index if handler null).
- Returns:
- S_OK if the operation succeeded, E_FAIL else.
o RunHasToStop
public virtual int* RunHasToStop( | int | reset | = 2) = 0 |
-
Indicates or forces if the optimization run has to stop or not.
- Parameters:
-
- reset.
-
Legal values:
- default value = 2 if you want to know if the run has to stop.
- 0 if the optimization run is authorized to continue.
- 1 if the optimization run has to stop.
- Returns:
- flag int.
Legal values:
- 0 if the optimization run is authorized to continue.
- 1 if the optimization run has to stop because of a user interaction (stop button).
o SendOptimizationError
-
Sends an optimization error.
In an interactive context, optimization errors
are caugth after checking compatibility between the optimization and its algorithm
and after running the algorithm (see CATIOptAlgorithm). Then, errors are displayed
in a popup window.
- Parameters:
-
- iMessage
- the error explanation (what happened, what to do etc ...)
- iSummary
- the error message in few words
By default, severity is set to 2.
- Returns:
- S_OK if the error is sent and E_FAIL else.
o SetAlgorithm
public virtual HRESULT SetAlgorithm( | const CATIOptAlgorithm_var& | spiAlgo) = 0 |
-
Sets the algorithm to use for this optimization.
- Parameters:
-
- spiAlgo
-
The algorithm to set
- Returns:
- S_OK if the operation succeeded, E_FAIL else.
o SetOptimizationLog
public virtual HRESULT SetOptimizationLog( | const CATIOptimizationLog_var& | spiOptimLog) = 0 |
-
Set the optimization log.
- Parameters:
-
- spiOptimLog
-
The optimization log to set. Give NULL_var if you want to remove
the existing one.
- Returns:
- S_OK if the operation succeeded, E_FAIL else.
o SetOptimizationType
public virtual HRESULT SetOptimizationType( | CATIOptOptimization::Type | iOptimType) = 0 |
-
Sets the Optimization Type.
- Parameters:
-
- iOptimType.
- Must be one of the types given by the "enum" described above.
- Returns:
- S_OK if succeeded, E_FAIL else.
o SetProblemToSolve
public virtual HRESULT SetProblemToSolve( | const CATIOptProblem_var& | pb) = 0 |
-
Sets the problem to optimize.
o SetRunningModeFlag
public virtual HRESULT SetRunningModeFlag( | const int& | iWithoutUndo) = 0 |
-
Sets the running mode flag.
- Parameters:
-
- iWithoutUndo.
-
Legal values:
- 1 if you want to lock the undo log during the run.
Advantage :
Locking the undo log avoid memory saturation (big models, lot of updates).
because data used by the undo functionnality will not be stored during the run.
Drawback :
All the actions done before running the optimization won't be undoable after the run.
- Returns:
- S_OK if the operation succeeded, E_FAIL else.
o SetUpdateMode
public virtual void SetUpdateMode( | CATIOptUpdateManagement::PEOUpdateMode | iUpdateMode) = 0 |
-
Specifies the Update Mode used in Product/Part/Analysis environement.
- Parameters:
-
- iUpdateMode
- The update mode.
o SetUpdateVisualizationFlag
public virtual HRESULT SetUpdateVisualizationFlag( | const int& | iUpdateVisu) = 0 |
-
Sets the update visualization flag.
Set it to 1 if you want to see the model modifications during the run, and O else.
Notice that for optimization purpose, it is better to set it to 0.
- Returns:
- S_OK if the operation succeeded, E_FAIL else.
Enumerated Types
o OptimizationMode
-
enum OptimizationMode {
UnlockAll,
LockTransactions,
LockOptimizationInputs
}
Optimization possible running mode.
- Parameters:
-
- LockTransactions
- enable to run the optimization without logging transactions.
- LockOptimizationInputs
- prevents any modification of the optimization input list.
o Type
-
enum Type {
DS_Optimization,
DS_DoE,
PARTNERS_Methods,
Undefined
}
Optimization possible types.
- Parameters:
-
- DS_Optimization
- for Optimization created/modified thanks to the PEO "Optimization" command.
- DS_DoE
- for Design Of Experiments created/modified thanks to the PEO "Design Of Experiments" command.
- PARTNERS_Methods
- for optimization method created/modified through the "Defines a PEO problem" command.
- Undefined
- default value for optimization method created by an other way (VB, CAA ...)
This object is included in the file: CATIOptOptimization.h
If needed, your Imakefile.mk should include the module: OptimizationItf