Class GeneralRandom1Shift<TProblem, TObjective>
An operator to execute n random 1-shift* relocations.
Inheritance
System.Object
GeneralRandom1Shift<TProblem, TObjective>
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public sealed class GeneralRandom1Shift<TProblem, TObjective> : IPerturber<float, TProblem, TObjective, Tour, float>
Type Parameters
|
TProblem
|
|
TObjective
|
Remarks
- 1-shift: Remove a customer and relocate it somewhere.
Constructors
GeneralRandom1Shift(Func<TProblem, Single[][]>)
Creates a new general random 1 shift operator.
Declaration
public GeneralRandom1Shift(Func<TProblem, float[][]> getWeights)
Parameters
|
Func<TProblem, System.Single[][]>
getWeights
|
Properties
Name
Returns the name of the operator.
Declaration
public string Name { get; }
Property Value
|
System.String
|
Methods
Apply(TProblem, TObjective, Tour, Int32, out Single)
Returns true if there was an improvement, false otherwise.
Declaration
public bool Apply(TProblem problem, TObjective objective, Tour tour, int level, out float difference)
Parameters
|
TProblem
problem
|
|
TObjective
objective
|
|
Tour
tour
|
|
System.Int32
level
|
|
System.Single
difference
|
Returns
|
System.Boolean
|
Apply(TProblem, TObjective, Tour, out Single)
Returns true if there was an improvement, false otherwise.
Declaration
public bool Apply(TProblem problem, TObjective objective, Tour tour, out float difference)
Parameters
|
TProblem
problem
|
|
TObjective
objective
|
|
Tour
tour
|
|
System.Single
difference
|
Returns
|
System.Boolean
|
Supports(TObjective)
Returns true if the given objective is supported.
Declaration
public bool Supports(TObjective objective)
Parameters
|
TObjective
objective
|
Returns
|
System.Boolean
|