jmetal.problems
Class mTSP

java.lang.Object
  extended by jmetal.core.Problem
      extended by 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

Field Summary
 double[][] costMatrix_
           
 double[][] distanceMatrix_
           
 int numberOfCities_
           
 
Fields inherited from class jmetal.core.Problem
length_, lowerLimit_, numberOfConstraints_, numberOfObjectives_, numberOfVariables_, problemName_, solutionType_, upperLimit_
 
Constructor Summary
mTSP(java.lang.String solutionType, java.lang.String file_distances, java.lang.String file_cost)
          Creates a new mTSP problem instance.
 
Method Summary
 void evaluate(Solution solution)
          Evaluates a solution
 double[][] readProblem(java.lang.String file)
           
 
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
 

Field Detail

numberOfCities_

public int numberOfCities_

distanceMatrix_

public double[][] distanceMatrix_

costMatrix_

public double[][] costMatrix_
Constructor Detail

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
Method Detail

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