NelderMeadSolver Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Finds a local minimum or maximum for a box-constrained nonlinear function.

Inheritance Hierarchy

System.Object
  Microsoft.SolverFoundation.Solvers.UnconstrainedNonlinearModel
    Microsoft.SolverFoundation.Solvers.NelderMeadSolver

Namespace:  Microsoft.SolverFoundation.Solvers
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

Syntax

'Declaration
Public Class NelderMeadSolver _
    Inherits UnconstrainedNonlinearModel _
    Implements INonlinearSolver, IRowVariableSolver, ISolver, INonlinearModel,  _
    IRowVariableModel, IGoalModel, INonlinearSolution, ISolverSolution, ISolverProperties,  _
    IReportProvider
public class NelderMeadSolver : UnconstrainedNonlinearModel, 
    INonlinearSolver, IRowVariableSolver, ISolver, INonlinearModel, IRowVariableModel, 
    IGoalModel, INonlinearSolution, ISolverSolution, ISolverProperties, IReportProvider
public ref class NelderMeadSolver : public UnconstrainedNonlinearModel, 
    INonlinearSolver, IRowVariableSolver, ISolver, INonlinearModel, IRowVariableModel, 
    IGoalModel, INonlinearSolution, ISolverSolution, ISolverProperties, IReportProvider
type NelderMeadSolver =  
    class
        inherit UnconstrainedNonlinearModel
        interface INonlinearSolver
        interface IRowVariableSolver
        interface ISolver
        interface INonlinearModel
        interface IRowVariableModel
        interface IGoalModel
        interface INonlinearSolution
        interface ISolverSolution
        interface ISolverProperties
        interface IReportProvider
    end
public class NelderMeadSolver extends UnconstrainedNonlinearModel implements INonlinearSolver, IRowVariableSolver, ISolver, INonlinearModel, IRowVariableModel, IGoalModel, INonlinearSolution, ISolverSolution, ISolverProperties, IReportProvider

The NelderMeadSolver type exposes the following members.

Constructors

  Name Description
Public method NelderMeadSolver() Initializes a new instance of the NelderMeadSolver class.
Public method NelderMeadSolver(IEqualityComparer<Object>) Initializes a new instance of the NelderMeadSolver class.

Top

Properties

  Name Description
Public property AcceptedContractionsCount Specifies the number of times the contracted point was accepted.
Public property AcceptedExpansionsCount Specifies the number of times the expanded point was accepted.
Public property AcceptedReflectionsCount Specifies the number of times the reflected point was accepted.
Public property EvaluationCallCount Represents the number of function evaluations performed for the most recent solve.
Public property FunctionEvaluator Function value callback. (Inherited from UnconstrainedNonlinearModel.)
Public property GradientCapability Specifies the Gradient capabilities of the solver.
Public property GradientEvaluator Gradient callback. (Inherited from UnconstrainedNonlinearModel.)
Public property HessianCapability Specifies the Hessian capabilities of this solver.
Public property Indices Returns the variable index collection, inclusive of rows (Inherited from UnconstrainedNonlinearModel.)
Public property IterationCount The number of Nelder-Mead iterations.
Public property KeyComparer Is used for row or variable key comparison (Inherited from UnconstrainedNonlinearModel.)
Public property KeyCount Returns the number of keys, inclusive of rows and variables. (Inherited from UnconstrainedNonlinearModel.)
Public property Keys Returns the variable and row key collection. Indices are guaranteed to be greater than or equal to 0 and less than the KeyCount. (Inherited from UnconstrainedNonlinearModel.)
Public property NonlinearCapabilities The capabilities for this solver.
Public property RejectedContractionsCount Represents the number of times the contracted point was rejected (regenerating the simplex).
Public property RejectedExpansionsCount Represents the number of times the expanded point was rejected (using the reflected point).
Public property Result Indicates the type of result (for example, LocalOptimal).
Public property RowCount Returns the number of rows in the model (Inherited from UnconstrainedNonlinearModel.)
Public property RowIndices Returns the row index collection (Inherited from UnconstrainedNonlinearModel.)
Public property RowKeys Returns the row key collection (Inherited from UnconstrainedNonlinearModel.)
Protected property RowValue Sets the value of the only row of the model (Inherited from UnconstrainedNonlinearModel.)
Public property SmallSimplexCount Represents the number of times a small simplex was encountered.
Public property SolvedGoalCount Represents the number of goals being solved.
Public property TheGoal The only goal of the model (Inherited from UnconstrainedNonlinearModel.)
Public property VariableCount Gets the number of variables in the model. (Inherited from UnconstrainedNonlinearModel.)
Public property VariableIndices Gets an IEnumerable containing the variable indexes. (Inherited from UnconstrainedNonlinearModel.)
Protected property VariableKeyCount Returns a count for keys (not including null) for variables (Inherited from UnconstrainedNonlinearModel.)
Public property VariableKeys Gets an IEnumerable containing the variable keys. (Inherited from UnconstrainedNonlinearModel.)

Top

Methods

  Name Description
Public method AddGoal Marks a row as a goal. (Inherited from UnconstrainedNonlinearModel.)
Public method AddRow Adds a row to the model. (Inherited from UnconstrainedNonlinearModel.)
Public method AddRowAsGoal Adds a row as a goal. Unconstrained models can have just one row. By convention this row will always have 0 as an index. (Inherited from UnconstrainedNonlinearModel.)
Public method AddVariable Ensures that a user variable with the given key is in the model. (Overrides UnconstrainedNonlinearModel.AddVariable(Object, Int32%).)
Protected method CopyVariableValuesFrom Copies variable values from an array. (Inherited from UnconstrainedNonlinearModel.)
Protected method CopyVariableValuesTo Copies variable values to an array. (Inherited from UnconstrainedNonlinearModel.)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetBounds Returns the bounds for a vid. (Overrides UnconstrainedNonlinearModel.GetBounds(Int32, Rational%, Rational%).)
Public method GetGoalFromIndex Returns a goal entry if the row id is a goal (Inherited from UnconstrainedNonlinearModel.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetIndexFromKey Maps the variable index from the key. If not found, KeyNotFoundException will be thrown (Inherited from UnconstrainedNonlinearModel.)
Public method GetKeyFromIndex Maps the variable index to the key. If not found, ArgumentException will be thrown (Inherited from UnconstrainedNonlinearModel.)
Public method GetProperty Gets a property for the specified index.
Public method GetReport Generates a report.
Public method GetSolutionValue Gets the objective value of a goal.
Public method GetSolvedGoal Gets information about a solved goal.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValue Gets the value associated with the variable index. This is typically used when retrieving results. (Inherited from UnconstrainedNonlinearModel.)
Public method IsGoal(Int32) Checks if a row identified by the specified id is a goal row. (Inherited from UnconstrainedNonlinearModel.)
Public method IsGoal(Int32, IGoal%) Checks if a row identified by the specified id is a goal row. If true, return the goal entry (Inherited from UnconstrainedNonlinearModel.)
Public method IsRow Validates whether the specified id represents a row index (Inherited from UnconstrainedNonlinearModel.)
Public methodStatic member IsValidTolerance Determines if the specified value is a valid solver tolerance.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method PreChange Invoke this function before modfying the model. (Inherited from UnconstrainedNonlinearModel.)
Public method RemoveGoal Removes a goal row (Inherited from UnconstrainedNonlinearModel.)
Public method SetBounds Sets the upper and lower bounds for a vid. (Overrides UnconstrainedNonlinearModel.SetBounds(Int32, Rational, Rational).)
Protected method SetGoalValue Sets the goal value. (Inherited from UnconstrainedNonlinearModel.)
Public method SetLowerBound Sets the lower bound for a vid. (Overrides UnconstrainedNonlinearModel.SetLowerBound(Int32, Rational).)
Public method SetProperty Sets a property for the specified index.
Public method SetUpperBound Sets the upper bound for a vid. (Overrides UnconstrainedNonlinearModel.SetUpperBound(Int32, Rational).)
Public method SetValue Sets the value of model identified by the vid. The default value for a vid is Indeterminate. (Inherited from UnconstrainedNonlinearModel.)
Public method Shutdown Shuts down the solver.
Public method Solve(ISolverParameters) Solves the model using the given parameter instance.
Public methodStatic member Solve(Func<T, TResult>, Boolean)
Public methodStatic member Solve(Func<T, TResult>, Boolean, array<Double[], Double)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetIndexFromKey Attempts to get the variable index based on the specified key (Inherited from UnconstrainedNonlinearModel.)
Protected method ValidateVid Validates a vid, and throws ArgumentException if not valid. (Inherited from UnconstrainedNonlinearModel.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IGoalModel.ClearGoals Clears all the goals (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate property IGoalModel.GoalCount The number of goals in this model (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate property IGoalModel.Goals Returns the goal collection of this model. (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method INonlinearModel.GetActiveVariables Specifies variables that participate in the row. (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method INonlinearModel.IsActiveVariable Determines whether a variable is active in a specific row (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method INonlinearModel.SetActiveVariable Sets a specific variable in a row to be active or inactive (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method INonlinearModel.SetActiveVariables Sets all variables in a row to be active or inactive (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method INonlinearSolution.GetValue Returns the value of a variable.
Explicit interface implemetationPrivate method IRowVariableModel.GetIgnoreBounds Gets the flag that specifies whether bounds are ignored (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method IRowVariableModel.GetIntegrality Checks if a variable is an integer variable (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate property IRowVariableModel.IntegerIndexCount Returns the number of integer variables (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method IRowVariableModel.SetIgnoreBounds Adjusts whether the bounds of a vid should be respected or ignored during solving. By default, bounds are respected. (Inherited from UnconstrainedNonlinearModel.)
Explicit interface implemetationPrivate method IRowVariableModel.SetIntegrality Marks a variable as an integer variable (Inherited from UnconstrainedNonlinearModel.)

Top

Remarks

NelderMeadSolver is used to find local minima or maxima for a function whose variables may be constrained to be in a range. It does not require computing derivatives so it can be used in cases where other techniques cannot. NelderMeadSolver implements the INonlinearSolver interface, and the goal function is specified using the FunctionEvaluator property. NelderMeadSolver implements the method described in Nelder, J.A. and Mead, R., "A Simplex Method for Function Minimization", Computer Journal 7 (4): 308-313 (Jan., 1965) with the modifications described in Lee, D. and Wiswall, M., "A Parallel Implementation of the Simplex Function Minimization Routine".

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SolverFoundation.Solvers Namespace