Class TSPTWObjective
The TSP-TW objective.
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class TSPTWObjective : TSPTWObjectiveBase
Properties
Infinite
Gets the value that represents infinity.
Declaration
public override sealed float Infinite { get; }
Property Value
|
System.Single
|
IsNonContinuous
Returns true if the object is non-linear.
Declaration
public override bool IsNonContinuous { get; }
Property Value
|
System.Boolean
|
Name
Gets the name of this objective.
Declaration
public override string Name { get; }
Property Value
|
System.String
|
Zero
Gets the value that represents 0.
Declaration
public override sealed float Zero { get; }
Property Value
|
System.Single
|
Methods
Add(TSPTWProblem, Single, Single)
Adds the two given fitness values.
Declaration
public override sealed float Add(TSPTWProblem problem, float fitness1, float fitness2)
Parameters
|
TSPTWProblem
problem
|
|
System.Single
fitness1
|
|
System.Single
fitness2
|
Returns
|
System.Single
|
Calculate(TSPTWProblem, IEnumerable<Int32>)
Calculates the fitness value of the given solution.
Declaration
public override sealed float Calculate(TSPTWProblem problem, IEnumerable<int> solution)
Parameters
|
TSPTWProblem
problem
|
|
IEnumerable<System.Int32>
solution
|
Returns
|
System.Single
|
Overrides
Calculate(TSPTWProblem, IEnumerable<Int32>, out Int32, out Single, out Single, out Single, ref Boolean[])
Calculates the fitness value of the given solution.
Declaration
public override float Calculate(TSPTWProblem problem, IEnumerable<int> tour, out int violated, out float violatedTime, out float waitTime, out float time, ref bool[] validFlags)
Parameters
|
TSPTWProblem
problem
|
|
IEnumerable<System.Int32>
tour
|
|
System.Int32
violated
|
|
System.Single
violatedTime
|
|
System.Single
waitTime
|
|
System.Single
time
|
|
System.Boolean[]
validFlags
|
Returns
|
System.Single
|
Overrides
Calculate(TSPTWProblem, Tour)
Calculates the fitness value of the given solution.
Declaration
public override sealed float Calculate(TSPTWProblem problem, Tour solution)
Parameters
|
TSPTWProblem
problem
|
|
Tour
solution
|
Returns
|
System.Single
|
CalculateTimeForPart(TSPTWProblem, IEnumerable<Int32>, Single, out Int32, out Single, out Single)
Calculates the time for a part of the tour including the turns at first and last position.
Declaration
public float CalculateTimeForPart(TSPTWProblem problem, IEnumerable<int> part, float timeBefore, out int violated, out float violatedTime, out float waitTime)
Parameters
|
TSPTWProblem
problem
|
|
IEnumerable<System.Int32>
part
|
|
System.Single
timeBefore
|
|
System.Int32
violated
|
|
System.Single
violatedTime
|
|
System.Single
waitTime
|
Returns
|
System.Single
|
CalculateTimeForPart(TSPTWProblem, IEnumerable<Int32>, Single, out Int32, out Single, out Single, ref Boolean[])
Calculates the time for a part of the tour including the turns at first and last position.
Declaration
public float CalculateTimeForPart(TSPTWProblem problem, IEnumerable<int> part, float timeBefore, out int violated, out float violatedTime, out float waitTime, ref bool[] validFlags)
Parameters
|
TSPTWProblem
problem
|
|
IEnumerable<System.Int32>
part
|
|
System.Single
timeBefore
|
|
System.Int32
violated
|
|
System.Single
violatedTime
|
|
System.Single
waitTime
|
|
System.Boolean[]
validFlags
|
Returns
|
System.Single
|
CompareTo(TSPTWProblem, Single, Single)
Compares the two fitness values.
Declaration
public override sealed int CompareTo(TSPTWProblem problem, float fitness1, float fitness2)
Parameters
|
TSPTWProblem
problem
|
|
System.Single
fitness1
|
|
System.Single
fitness2
|
Returns
|
System.Int32
|
IsZero(TSPTWProblem, Single)
Returns true if the given fitness value is zero.
Declaration
public override sealed bool IsZero(TSPTWProblem problem, float fitness)
Parameters
|
TSPTWProblem
problem
|
|
System.Single
fitness
|
Returns
|
System.Boolean
|
Subtract(TSPTWProblem, Single, Single)
Subtracts the given fitness values.
Declaration
public override sealed float Subtract(TSPTWProblem problem, float fitness1, float fitness2)
Parameters
|
TSPTWProblem
problem
|
|
System.Single
fitness1
|
|
System.Single
fitness2
|
Returns
|
System.Single
|