Navigation: Scripting Reference Manual > Functions & Subroutines > SetMzrMultiStarts

 

SetMzrMultiStarts

 

Contact Us: fredsupport@photonengr.com

 

Description

This command sets the number of multiple random restarts for an optimization (if the method selected supports restarts).

 

 

Syntax

SetMzrMultiStarts numStarts

 

 

Parameters

numStarts As Long

Number of restarts to be used in the optimization (if the method selected supports restarts).

 

 

Example

The following example sets the starting conditions for an optimization.  Note that in the example, SetMzrAnnealStopBelowMinTemperature is called after SetMzrAnnealStopAfterSteps.  This means that the stopping criteria is controlled by the min temperature setting.

 

Sub Main

 

    Dim multiStarts As Long

    Dim startTemp As Double

    Dim stopSteps As Long

    Dim stopMinTemp As Double

    Dim tempReduceFrac As Double

 

    multiStarts = 15

    startTemp = -1

    stopSteps = 50

    stopMinTemp = 0.001

    tempReduceFrac = 0.9

 

    SetMzrMultiStarts multiStarts

    SetMzrAnnealStartTemperature startTemp

    SetMzrAnnealStopAfterSteps stopSteps

    SetMzrAnnealStopBelowMinTemperature stopMinTemp

    SetMzrAnnealTemperatureReduceFraction tempReduceFrac

 

    Print "Multi Starts: " & Chr(9) & multiStarts

    Print "Start Temp: " & Chr(9) & startTemp

    Print "Stop Steps: " & Chr(9) & stopSteps

    Print "Stop Min Temp: " & Chr(9) & stopMinTemp

    Print "Temp Reduc. Frac: " & Chr(9) & tempReduceFrac

 

End Sub

 

 

See Also

Optimization Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC