You can run optimization from the API.
One common application is to run several iterations of multiple types of optimization, see https://awrcorp.com/download/faq/english/scripts/Optimizers.aspx
Setting Optimizer Type
The number will the number in the list when you open the optimizer in the user interface.
We don't recommend setting optimizer by number as this order could change.
Alternately, you can set by the name
You can write a simple script to print out all the types.
Sub Main Debug.Clear For i = 1 To Project.Optimizer.TypeCount Debug.Print Project.Optimizer.TypeName(i) Next i End Sub
The output of this will be in the debug window
Pointer - Robust Optimization Pointer - Train an Optimizer Pointer - Run Trained Optimizer Pointer - Gradient Optimization Random (Local) Gradient Optimization Conjugate Gradient Simplex Optimizer Genetic (Uniform Mutation) Genetic (Gaussian Mutation) Simulated Annealing (Simplex) Simulated Annealing (Local) Random (Global) Direction Set Method
* Alternately, you can write a function to call the optimizer by name and have it return the index if the name is matched, an example is shown below.
Setting Optimizer Iterations
Running the Optimizer
simple to start, write a loop to check to see if running on when to continue.