jmetal.problems
Class mTSP
java.lang.Object
jmetal.core.Problem
jmetal.problems.mTSP
- All Implemented Interfaces:
- java.io.Serializable
public class mTSP
- extends Problem
Class representing a multi-objective TSP (Traveling Salesman Problem) problem.
This class is tested with two objectives and the KROA150 and KROB150
instances of TSPLIB
- See Also:
- Serialized Form
Constructor Summary |
mTSP(java.lang.String solutionType,
java.lang.String file_distances,
java.lang.String file_cost)
Creates a new mTSP problem instance. |
Methods inherited from class jmetal.core.Problem |
evaluateConstraints, getLength, getLowerLimit, getName, getNumberOfBits, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables, getPrecision, getPrecision, getSolutionType, getUpperLimit, setNumberOfVariables, setPrecision, setSolutionType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numberOfCities_
public int numberOfCities_
distanceMatrix_
public double[][] distanceMatrix_
costMatrix_
public double[][] costMatrix_
mTSP
public mTSP(java.lang.String solutionType,
java.lang.String file_distances,
java.lang.String file_cost)
throws java.io.IOException
- Creates a new mTSP problem instance. It accepts data files from TSPLIB
- Throws:
java.io.IOException
evaluate
public void evaluate(Solution solution)
- Evaluates a solution
- Specified by:
evaluate
in class Problem
- Parameters:
solution
- The solution to evaluate
readProblem
public double[][] readProblem(java.lang.String file)
throws java.io.IOException
- Throws:
java.io.IOException