C# Class SwarmOps.ProblemWrapper

Transparently wrap a problem-object.
Inheritance: Problem
Show file Open project: DanWBR/dwsim3

Public Methods

Method Description
BeginOptimizationRun ( ) : void

Propagate signal to wrapped problem.

Continue ( int iterations, double fitness, bool feasible ) : bool

Return whether optimization of wrapped problem is allowed to continue.

EndOptimizationRun ( ) : void

Propagate signal to wrapped problem.

EnforceConstraints ( double &parameters ) : bool

Enforce constraints and evaluate feasiblity of the wrapped problem.

Feasible ( double parameters ) : bool

Evaluate feasibility (constraint satisfaction) of the wrapped problem.

Gradient ( double x, double &v ) : int

Compute the gradient of the wrapped problem.

ProblemWrapper ( Problem problem )

Create the object.

Method Details

BeginOptimizationRun() public method

Propagate signal to wrapped problem.
public BeginOptimizationRun ( ) : void
return void

Continue() public method

Return whether optimization of wrapped problem is allowed to continue.
public Continue ( int iterations, double fitness, bool feasible ) : bool
iterations int Number of iterations performed in optimization run.
fitness double Best fitness found in optimization run.
feasible bool Feasibility of best found candidate solution.
return bool

EndOptimizationRun() public method

Propagate signal to wrapped problem.
public EndOptimizationRun ( ) : void
return void

EnforceConstraints() public method

Enforce constraints and evaluate feasiblity of the wrapped problem.
public EnforceConstraints ( double &parameters ) : bool
parameters double Candidate solution.
return bool

Feasible() public method

Evaluate feasibility (constraint satisfaction) of the wrapped problem.
public Feasible ( double parameters ) : bool
parameters double Candidate solution.
return bool

Gradient() public method

Compute the gradient of the wrapped problem.
public Gradient ( double x, double &v ) : int
x double Candidate solution.
v double Array for holding the gradient.
return int

ProblemWrapper() public method

Create the object.
public ProblemWrapper ( Problem problem )
problem Problem Problem-object to be wrapped.