public final class RuinRandom extends AbstractRuinStrategy
random, ruinShareFactory| Constructor and Description |
|---|
RuinRandom(VehicleRoutingProblem vrp,
double fraction)
Constructs ruinRandom.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<Job> |
ruinRoutes(Collection<VehicleRoute> vehicleRoutes)
Removes a fraction of jobs from vehicleRoutes.
|
String |
toString() |
addListener, getListeners, getRuinShareFactory, removeJob, removeJob, removeListener, ruin, setRandom, setRuinShareFactorypublic RuinRandom(VehicleRoutingProblem vrp, double fraction)
vrp - fraction - which is the fraction of total cpublic Collection<Job> ruinRoutes(Collection<VehicleRoute> vehicleRoutes)
The number of jobs is calculated as follows: Math.ceil(vrp.getJobs().values().size() * fractionOfAllNodes2beRuined).
ruinRoutes in class AbstractRuinStrategyCopyright © 2013–2019. All rights reserved.