Show / Hide Table of Contents

Class SequenceDirectedProblem

Defines a directed sequence problem.

Inheritance
System.Object
SequenceDirectedProblem
Inherited Members
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 SequenceDirectedProblem

Constructors

SequenceDirectedProblem(Tour, Single[][], Single)

Creates a new problem.

Declaration
public SequenceDirectedProblem(Tour sequence, float[][] weights, float turnPenalty)
Parameters
Tour sequence

The sequence to optimize.

System.Single[][] weights

The directed weights.

System.Single turnPenalty

The turn penalty.

Properties

Closed

Gets the closed flag.

Declaration
public bool Closed { get; set; }
Property Value
System.Boolean

Sequence

Gets or sets the sequence.

Declaration
public Tour Sequence { get; set; }
Property Value
Tour

TurnPenalties

Gets or sets the turn penalties per type of turn. 0: forward, forward. 1: forward, backward. 2: backward, forward. 3: backward, backward.

Declaration
public float[] TurnPenalties { get; set; }
Property Value
System.Single[]

Weights

Gets the weights.

Declaration
public float[][] Weights { get; set; }
Property Value
System.Single[][]

Methods

Solve()

Solves this TSP using a default solver.

Declaration
public Tour Solve()
Returns
Tour

Solve(ISolver<Single, SequenceDirectedProblem, SequenceDirectedObjective, Tour, Single>)

Solvers this problem using the given solver.

Declaration
public Tour Solve(ISolver<float, SequenceDirectedProblem, SequenceDirectedObjective, Tour, float> solver)
Parameters
ISolver<System.Single, SequenceDirectedProblem, SequenceDirectedObjective, Tour, System.Single> solver

Returns
Tour

Back to top Built by Itinero, MIT licensed.