org.optaplanner.examples.vehiclerouting.domain
Class Customer
java.lang.Object
org.optaplanner.examples.common.domain.AbstractPersistable
org.optaplanner.examples.vehiclerouting.domain.Customer
- All Implemented Interfaces:
- Serializable, Comparable<AbstractPersistable>, Standstill
- Direct Known Subclasses:
- TimeWindowedCustomer
public class Customer
- extends AbstractPersistable
- implements Standstill
- See Also:
- Serialized Form
location
protected Location location
demand
protected int demand
previousStandstill
protected Standstill previousStandstill
nextCustomer
protected Customer nextCustomer
vehicle
protected Vehicle vehicle
Customer
public Customer()
getLocation
public Location getLocation()
- Specified by:
getLocation
in interface Standstill
- Returns:
- never null
setLocation
public void setLocation(Location location)
getDemand
public int getDemand()
setDemand
public void setDemand(int demand)
getPreviousStandstill
public Standstill getPreviousStandstill()
setPreviousStandstill
public void setPreviousStandstill(Standstill previousStandstill)
getNextCustomer
public Customer getNextCustomer()
- Specified by:
getNextCustomer
in interface Standstill
- Returns:
- sometimes null
setNextCustomer
public void setNextCustomer(Customer nextCustomer)
- Specified by:
setNextCustomer
in interface Standstill
getVehicle
public Vehicle getVehicle()
- Specified by:
getVehicle
in interface Standstill
- Returns:
- sometimes null
setVehicle
public void setVehicle(Vehicle vehicle)
getMilliDistanceToPreviousStandstill
public int getMilliDistanceToPreviousStandstill()
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
getMilliDistanceTo
public int getMilliDistanceTo(Standstill standstill)
- Parameters:
standstill
- never null
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
solutionEquals
public boolean solutionEquals(Object o)
- The normal methods
Object.equals(Object)
and Object.hashCode()
cannot be used because the rule engine already
requires them (for performance in their original state).
- See Also:
solutionHashCode()
solutionHashCode
public int solutionHashCode()
- The normal methods
Object.equals(Object)
and Object.hashCode()
cannot be used because the rule engine already
requires them (for performance in their original state).
- See Also:
solutionEquals(Object)
toString
public String toString()
- Overrides:
toString
in class AbstractPersistable
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.