Description This function evaluates the merit function value using one of three options for supplying and/or applying variable values.
Syntax success = EvaluateMeritFunction( mf, evalType )
Parameters success (Boolean) Return value indicating whether the merit function evaluation was successful.
mf As Double After the function executes, this variable contains the evaluated merit function value.
evalType As String String specifying the merit function evaluation mode. Refer to Help topic Optimize Commands for more information. Options are:
Example The following example demonstrates how to use the EvaluateMeritFunction command with the "once" mode option and print the result to the output window.
Sub Main
Dim success As Boolean Dim MF As Double Dim evalType As String evalType = "once" success = EvaluateMeritFunction( MF, evalType )
Print "Merit function evaluation: " & Chr(9) & success Print "Evaluation type: " & Chr(9) & evalType Print "MF value: " & Chr(9) & MF
End Sub
See Also
|