NMath Reference Guide

## Stochastic |

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

CenterSpace.NMath.CoreConstrainedOptimizer

CenterSpace.NMath.CoreStochasticHillClimbingSolver

Syntax

The StochasticHillClimbingSolver type exposes the following members.

Constructors

Name | Description | |
---|---|---|

StochasticHillClimbingSolver | Initializes a new instance of the StochasticHillClimbingSolver class |

Properties

Name | Description | |
---|---|---|

ExceptionMessage |
If the solver result is SolverResult.UnexpectedException
gets the exception message property.
(Inherited from ConstrainedOptimizer) | |

OptimalObjectiveFunctionValue |
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) | |

OptimalX |
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) | |

RandomSeed | Sets the random seed that (re)initializes the random number sequence generation. | |

Result |
Gets the result of the most recent solve attempt.
(Inherited from ConstrainedOptimizer) | |

Steps | Gets the number of steps performed by the solver during the most recent solve attempt. |

Methods

Name | Description | |
---|---|---|

AddConstraints |
Adds the linear constraints in the given linearly constrained problem to a Microsoft
Solver Foundation linear model.
(Inherited from ConstrainedOptimizer) | |

AddVariablesAndBounds |
Adds the variables in the given linearly constrained problem to a Microsoft
Solver Foundation linear model.
(Inherited from ConstrainedOptimizer) | |

SetStatus |
Sets the SolverResult value base on the give Microsoft
Solver Foundation LinearResult value.
(Inherited from ConstrainedOptimizer) | |

Solve(MixedIntegerNonlinearProgrammingProblem) | Attempts to solve the given mixed integer nonlinear programming problem using default settings. | |

Solve(NonlinearProgrammingProblem) | Attempts to solve the given nonlinear programming problem using default settings. | |

Solve(MixedIntegerNonlinearProgrammingProblem, DoubleVector) | Attempts to solve the given mixed integer nonlinear programming problem using default settings and the given starting point. | |

Solve(MixedIntegerNonlinearProgrammingProblem, StochasticHillClimbingParameters) | Attempts to solve the given mixed integer nonlinear programming problem using the given solver parameters. | |

Solve(NonlinearProgrammingProblem, DoubleVector) | Attempts to solve the given nonlinear programming problem using default settings and the given starting point. | |

Solve(NonlinearProgrammingProblem, StochasticHillClimbingParameters) | Attempts to solve the given nonlinear programming problem using the given solver parameters. | |

Solve(MixedIntegerNonlinearProgrammingProblem, DoubleVector, StochasticHillClimbingParameters) | Attempts to solve the given nonlinear mixed integer programming problem using the given solver parameters and starting point. | |

Solve(NonlinearProgrammingProblem, DoubleVector, StochasticHillClimbingParameters) | Attempts to solve the given nonlinear programming problem using the given solver parameters and starting point. |

Fields

Name | Description | |
---|---|---|

exceptionMessage_ |
Constains exception message if there is an unexpected exception
during the solve.
(Inherited from ConstrainedOptimizer) | |

optimalValue_ |
Optimal value of the objective function if the the result of
the solver is SolveResult.Optimal (Inherited from ConstrainedOptimizer) | |

optimalX_ |
Optimal solution value of the the result if the solver is
SolveResult.Optimal (Inherited from ConstrainedOptimizer) | |

result_ |
Result of the solver attempt.
(Inherited from ConstrainedOptimizer) |

See Also