Class STSProblem
The default STSP profile definition.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public sealed class STSProblem
Constructors
STSProblem(Int32, Int32, Single[][], Single)
Creates a new STSP, 'closed' when first equals last.
Declaration
public STSProblem(int first, int last, float[][] weights, float max)
Parameters
|
System.Int32
first
|
|
System.Int32
last
|
|
System.Single[][]
weights
|
|
System.Single
max
|
STSProblem(Int32, Single[][], Single)
Creates a new STSP 'open' STSP with only a start customer.
Declaration
public STSProblem(int first, float[][] weights, float max)
Parameters
|
System.Int32
first
|
|
System.Single[][]
weights
|
|
System.Single
max
|
Properties
First
Gets the first customer.
Declaration
public int First { get; set; }
Property Value
|
System.Int32
|
Last
Gets the last customer if the problem is closed.
Declaration
public int ? Last { get; set; }
Property Value
|
System.Nullable<System.Int32>
|
Max
Gets or sets the max.
Declaration
public float Max { get; set; }
Property Value
|
System.Single
|
Weights
Gets the weights.
Declaration
public float[][] Weights { get; set; }
Property Value
|
System.Single[][]
|
Methods
CreateEmptyTour()
Creates an initial empty tour, add fixed first and/or last customer.
Declaration
public Tour CreateEmptyTour()
Returns
|
Tour
|
GetNearestNeighboursBackward(Single, Int32)
Generate the nearest neighbour list.
Declaration
public SortedNearestNeighbours GetNearestNeighboursBackward(float weight, int customer)
Parameters
|
System.Single
weight
|
|
System.Int32
customer
|
Returns
|
SortedNearestNeighbours
|
GetNearestNeighboursForward(Single, Int32)
Generate the nearest neighbour list.
Declaration
public SortedNearestNeighbours GetNearestNeighboursForward(float weight, int customer)
Parameters
|
System.Single
weight
|
|
System.Int32
customer
|
Returns
|
SortedNearestNeighbours
|
GetNNearestNeighboursBackward(Int32, Int32)
Generate the nearest neighbour list.
Declaration
public NearestNeighbours GetNNearestNeighboursBackward(int n, int customer)
Parameters
|
System.Int32
n
|
|
System.Int32
customer
|
Returns
|
NearestNeighbours
|
GetNNearestNeighboursForward(Int32, Int32)
Generate the nearest neighbour list.
Declaration
public NearestNeighbours GetNNearestNeighboursForward(int n, int customer)
Parameters
|
System.Int32
n
|
|
System.Int32
customer
|
Returns
|
NearestNeighbours
|
Solve()
Solvers this problem using the default solver.
Declaration
public Tour Solve()
Returns
|
Tour
|
Solve(SolverBase<Single, STSProblem, STSPObjective, Tour, STSPFitness>)
Solves this problem using the given solver.
Declaration
public Tour Solve(SolverBase<float, STSProblem, STSPObjective, Tour, STSPFitness> solver)
Parameters
|
SolverBase<System.Single, STSProblem, STSPObjective, Tour, STSPFitness>
solver
|
Returns
|
Tour
|