Klappt nicht.
Mitlerweile kann ich mit CreateOptimization die Optimierung erstellen, aber nicht starten.
In V5Automation.chm steht:
Method Index
Run
Runs the optimization as it is defined.
Properties
o Property AlgorithmType( ) As CatAlgorithmType
Returns or sets the algorithm type. Currently available algorithms are gradient and simulatedAnnealing
See also:
CatAlgorithmType
o Property Constraints( ) As CATIAOptimizationConstraints (Read Only)
Returns the collection of optimization constraints.
o Property FreeParameters( ) As CATIAFreeParameters (Read Only)
Returns the collection of the free parameters.
o Property MaxEvalsNb( ) As long
Returns or sets the maximum number of model updates allowed during one run of the optimization.
o Property MaxEvalsWoImprovement( ) As long
Returns or sets the maximum number of model updates without improvement of the problem solution during one run of the optimization.
o Property MaxTime( ) As long
Returns or sets the maximum time allowed for one run of the optimization (in minutes).
o Property ObjectiveParameter( ) As CATIARealParam
Returns or sets the objective parameter of the optimization. This parameter can not exist (in this case the get_ method returns E_FAIL) when the optimization contains only constraints and uses Simulated Annealing, or if the optimization feature doesn't contain all information necessary to be run.
o Property OptimizationType( ) As CatOptimizationType
Returns or sets the type of the optimization: minimum, maximum or target value searched on the objective parameter.
See also:
CatOptimizationType
o Property TargetValue( ) As CATIARealParam (Read Only)
Returns the objective parameter target value. (used only if the optimization type is a target value search)
o Property UseMaxEvalsWoImprovement( ) As boolean
Returns or sets if the number of updates without improvement of the solution has to be used as a termination criterion.
o Property UseMaxTime( ) As boolean
Returns or sets if max time has to be used as a termination criterion.
Methods
o Sub Run( boolean iWithStopDialog)
Runs the optimization as it is defined. The stop dialog appears if argument is TRUE
Before running, a check is made to ensure that the optimization feature contains enough information to run the optimization. In the case where some information is missing, this method returns E_FAIL
WARNING : if argument is TRUE, the optimization is launched asynchronously, and you can not run several optimizations in this mode.
Kann es aber irgendwie nicht anwenden. Bitte um Hilfe.
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP