1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

add javaDoc to RuinStrategy

This commit is contained in:
oblonski 2013-08-13 20:55:17 +02:00
parent d46fed424d
commit 5b0857d6bf

View file

@ -28,27 +28,58 @@ import basics.route.VehicleRoute;
interface RuinStrategy { interface RuinStrategy {
/**
* Listener that listens to the ruin-process. It informs whoever is interested about start, end and about a removal of a job.
*
* @author schroeder
*
*/
public static interface RuinListener { public static interface RuinListener {
/**
* informs about ruin-start.
*
* @param routes
*/
public void ruinStarts(Collection<VehicleRoute> routes); public void ruinStarts(Collection<VehicleRoute> routes);
/**
* informs about ruin-end.
*
* @param routes
* @param unassignedJobs
*/
public void ruinEnds(Collection<VehicleRoute> routes, Collection<Job> unassignedJobs); public void ruinEnds(Collection<VehicleRoute> routes, Collection<Job> unassignedJobs);
/**
* informs if a {@link Job} has been removed from a {@link VehicleRoute}.
*
* @param job
* @param fromRoute
*/
public void removed(Job job, VehicleRoute fromRoute); public void removed(Job job, VehicleRoute fromRoute);
} }
/** /**
* Ruins a current solution, i.e. removes jobs from service providers and * Ruins a current solution, i.e. a collection of vehicle-routes and
* returns a collection of these removed, and thus unassigned, jobs. * returns a collection of removed and thus unassigned jobs.
* *
* @param vehicleRoutes * @param {@link VehicleRoute}
* @return * @return Collection of {@link Job}
*/ */
public Collection<Job> ruin(Collection<VehicleRoute> vehicleRoutes); public Collection<Job> ruin(Collection<VehicleRoute> vehicleRoutes);
/**
* Removes targetJob as well as its neighbors with a size of (nOfJobs2BeRemoved-1).
*/
public Collection<Job> ruin(Collection<VehicleRoute> vehicleRoutes, Job targetJob, int nOfJobs2BeRemoved); public Collection<Job> ruin(Collection<VehicleRoute> vehicleRoutes, Job targetJob, int nOfJobs2BeRemoved);
/**
* Adds a ruin-listener.
*
* @param {@link RuinListener}
*/
public void addListener(RuinListener ruinListener); public void addListener(RuinListener ruinListener);
} }