org.optaplanner.examples.vehiclerouting.domain
Class Location
java.lang.Object
org.optaplanner.examples.common.domain.AbstractPersistable
org.optaplanner.examples.vehiclerouting.domain.Location
- All Implemented Interfaces:
- Serializable, Comparable<AbstractPersistable>
public class Location
- extends AbstractPersistable
- See Also:
- Serialized Form
Location
public Location()
getName
public String getName()
setName
public void setName(String name)
getLatitude
public double getLatitude()
setLatitude
public void setLatitude(double latitude)
getLongitude
public double getLongitude()
setLongitude
public void setLongitude(double longitude)
getMilliDistance
public int getMilliDistance(Location location)
- The distance is not in miles or km, but in the TSPLIB's unit of measurement.
- Parameters:
location
- never null
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
toString
public String toString()
- Overrides:
toString
in class AbstractPersistable
getSafeName
public String getSafeName()
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.