Show / Hide Table of Contents

Class VNSSolver<TWeight, TProblem, TObjective, TSolution, TFitness>

A Variable Neighbourhood Search (VNS) solver.

Inheritance
System.Object
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>
VNSSolver<TWeight, TProblem, TObjective, TSolution, TFitness>
Inherited Members
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Name
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Solve(TProblem, TObjective)
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Solve(TProblem, TObjective, TFitness)
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.IsStopped
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Stop()
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.ReportIntermidiateResult(TSolution)
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.IntermidiateResult
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class VNSSolver<TWeight, TProblem, TObjective, TSolution, TFitness> : SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>, ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> where TWeight : struct where TObjective : ObjectiveBase<TProblem, TSolution, TFitness> where TSolution : ISolution
Type Parameters
TWeight

TProblem

TObjective

TSolution

TFitness

Constructors

VNSSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>, IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness>, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>)

Creates a new VNS solver.

Declaration
public VNSSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> generator, IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness> perturber, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> localSearch)
Parameters
ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> generator

The solver that generates initial solutions.

IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness> perturber

The perturber that varies neighbourhood.

IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> localSearch

The local search that improves solutions.

VNSSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>, IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness>, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>, SolverDelegates.StopConditionWithLevelDelegate<TProblem, TObjective, TSolution>)

Creates a new VNS solver.

Declaration
public VNSSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> generator, IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness> perturber, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> localSearch, SolverDelegates.StopConditionWithLevelDelegate<TProblem, TObjective, TSolution> stopCondition)
Parameters
ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> generator

The solver that generates initial solutions.

IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness> perturber

The perturber that varies neighbourhood.

IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> localSearch

The local search that improves solutions.

SolverDelegates.StopConditionWithLevelDelegate<TProblem, TObjective, TSolution> stopCondition

The stop condition to control the number of iterations.

Properties

Name

Gets the name.

Declaration
public override string Name { get; }
Property Value
System.String

Overrides
Itinero.Optimization.Algorithms.Solvers.SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Name
Implements
IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>.Name

Methods

Apply(TProblem, TObjective, TSolution, out TFitness)

Solves the given problem.

Declaration
public bool Apply(TProblem problem, TObjective objective, TSolution solution, out TFitness delta)
Parameters
TProblem problem

TObjective objective

TSolution solution

TFitness delta

Returns
System.Boolean

Implements
IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>.Apply(TProblem, TObjective, TSolution, out TFitness)

Solve(TProblem, TObjective, out TFitness)

Solves the given problem.

Declaration
public override TSolution Solve(TProblem problem, TObjective objective, out TFitness fitness)
Parameters
TProblem problem

TObjective objective

TFitness fitness

Returns
TSolution

Overrides
Itinero.Optimization.Algorithms.Solvers.SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Solve(TProblem, TObjective, TFitness)

Supports(TObjective)

Returns true if the given objective is supported.

Declaration
public virtual bool Supports(TObjective objective)
Parameters
TObjective objective

Returns
System.Boolean

Implements
IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>.Supports(TObjective)
Back to top Built by Itinero, MIT licensed.