Click or drag to resize

StochasticHillClimbingSolver Class

Nonlinear programming solver that uses a stocastic hill climbing algorithm. It starts from a random set of decision values, and repeatedly tries small random changes to the decision values. It keeps changes that make the answer better, and rejects changes that make it worse.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreConstrainedOptimizer
    CenterSpace.NMath.CoreStochasticHillClimbingSolver

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class StochasticHillClimbingSolver : ConstrainedOptimizer

The StochasticHillClimbingSolver type exposes the following members.

Constructors
 NameDescription
Public methodStochasticHillClimbingSolverInitializes a new instance of the StochasticHillClimbingSolver class
Top
Properties
 NameDescription
Public propertyExceptionMessage If the solver result is SolverResult.UnexpectedException gets the exception message property.
(Inherited from ConstrainedOptimizer)
Public propertyOptimalObjectiveFunctionValue Gets the optimal objective function value if the solve result is SolverResult.Optimal, or the current solution value if the result is SolverResult.SolutionFeasibleButNotOptimal Otherwise the value is Double.NaN.
(Inherited from ConstrainedOptimizer)
Public propertyOptimalX Gets the optimal value if the solve result is SolverResult.Optimal, or the current solution value if the result is SolverResult.SolutionFeasibleButNotOptimal Contains an empty vector otherwise.
(Inherited from ConstrainedOptimizer)
Public propertyRandomSeed Sets the random seed that (re)initializes the random number sequence generation.
Public propertyResult Gets the result of the most recent solve attempt.
(Inherited from ConstrainedOptimizer)
Public propertySteps Gets the number of steps performed by the solver during the most recent solve attempt.
Top
Methods
 NameDescription
Protected methodAddConstraints Adds the linear constraints in the given linearly constrained problem to a Microsoft Solver Foundation linear model.
(Inherited from ConstrainedOptimizer)
Protected methodAddVariablesAndBounds Adds the variables in the given linearly constrained problem to a Microsoft Solver Foundation linear model.
(Inherited from ConstrainedOptimizer)
Protected methodSetStatus Sets the SolverResult value base on the give Microsoft Solver Foundation LinearResult value.
(Inherited from ConstrainedOptimizer)
Public methodSolve(MixedIntegerNonlinearProgrammingProblem) Attempts to solve the given mixed integer nonlinear programming problem using default settings.
Public methodSolve(NonlinearProgrammingProblem) Attempts to solve the given nonlinear programming problem using default settings.
Public methodSolve(MixedIntegerNonlinearProgrammingProblem, DoubleVector) Attempts to solve the given mixed integer nonlinear programming problem using default settings and the given starting point.
Public methodSolve(MixedIntegerNonlinearProgrammingProblem, StochasticHillClimbingParameters) Attempts to solve the given mixed integer nonlinear programming problem using the given solver parameters.
Public methodSolve(NonlinearProgrammingProblem, DoubleVector) Attempts to solve the given nonlinear programming problem using default settings and the given starting point.
Public methodSolve(NonlinearProgrammingProblem, StochasticHillClimbingParameters) Attempts to solve the given nonlinear programming problem using the given solver parameters.
Public methodSolve(MixedIntegerNonlinearProgrammingProblem, DoubleVector, StochasticHillClimbingParameters) Attempts to solve the given nonlinear mixed integer programming problem using the given solver parameters and starting point.
Public methodSolve(NonlinearProgrammingProblem, DoubleVector, StochasticHillClimbingParameters) Attempts to solve the given nonlinear programming problem using the given solver parameters and starting point.
Top
Fields
 NameDescription
Protected fieldexceptionMessage_ Constains exception message if there is an unexpected exception during the solve.
(Inherited from ConstrainedOptimizer)
Protected fieldoptimalValue_ Optimal value of the objective function if the the result of the solver is SolveResult.Optimal
(Inherited from ConstrainedOptimizer)
Protected fieldoptimalX_ Optimal solution value of the the result if the solver is SolveResult.Optimal
(Inherited from ConstrainedOptimizer)
Protected fieldresult_ Result of the solver attempt.
(Inherited from ConstrainedOptimizer)
Top
See Also