target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void insertingDeliveryInBetweenShipmentShouldFail(){ ini(20d, 30, Double.MAX_VALUE); StateManager stateManager = new StateManager(vrp); StateId latestStartId = stateManager.createStateId("latest-start-id"); StateId openJobsId = stateManager.createStateId("open-jobs-id"); UpdateMaxTimeInVehicle updater = ne...
@Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = newAct instanceof DeliveryActivity; double newActArrival = prevAc...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
@Test public void insertingPickupShipmentAtAnyPositionShouldWork(){ ini(25d, Double.MAX_VALUE, Double.MAX_VALUE); VehicleRoute r = VehicleRoute.Builder.newInstance(v).setJobActivityFactory(vrp.getJobActivityFactory()) .addDelivery(d1).addDelivery(d2).build(); StateManager stateManager = new StateManager(vrp); StateId l...
@Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = newAct instanceof DeliveryActivity; double newActArrival = prevAc...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
@Test public void insertingPickupShipmentShouldWork() { ini(30, Double.MAX_VALUE, Double.MAX_VALUE); VehicleRoute r = VehicleRoute.Builder.newInstance(v).setJobActivityFactory(vrp.getJobActivityFactory()) .addPickup(p1).addDelivery(d2).build(); StateManager stateManager = new StateManager(vrp); StateId latestStartId = ...
@Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = newAct instanceof DeliveryActivity; double newActArrival = prevAc...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
@Test public void insertingPickupShipmentShouldWork2() { ini(30, 30, Double.MAX_VALUE); VehicleRoute r = VehicleRoute.Builder.newInstance(v).setJobActivityFactory(vrp.getJobActivityFactory()) .addPickup(p1).addDelivery(d2).build(); StateManager stateManager = new StateManager(vrp); StateId latestStartId = stateManager....
@Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = newAct instanceof DeliveryActivity; double newActArrival = prevAc...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
@Test public void whenPickupIsInsertedAt0_insertingDeliveryShipmentShouldFailWhereConstraintIsBroken(){ ini(25d, Double.MAX_VALUE, Double.MAX_VALUE); VehicleRoute r = VehicleRoute.Builder.newInstance(v).setJobActivityFactory(vrp.getJobActivityFactory()) .addDelivery(d1).addDelivery(d2).build(); StateManager stateManage...
@Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = newAct instanceof DeliveryActivity; double newActArrival = prevAc...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
@Test public void whenPickupIsInsertedAt1_insertingDeliveryShipmentShouldFailWhereConstraintIsBroken(){ ini(25d, Double.MAX_VALUE, Double.MAX_VALUE); VehicleRoute r = VehicleRoute.Builder.newInstance(v).setJobActivityFactory(vrp.getJobActivityFactory()) .addDelivery(d1).addDelivery(d2).build(); StateManager stateManage...
@Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = newAct instanceof DeliveryActivity; double newActArrival = prevAc...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
MaxTimeInVehicleConstraint implements HardActivityConstraint { @Override public ConstraintsStatus fulfilled(final JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { boolean newActIsPickup = newAct instanceof PickupActivity; boolean newActIsDelivery = ne...
@Test public void whenGettingConstraintsViaConstructor_theyShouldBeResolvedCorrectly() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.add(new ServiceDeliveriesFirstConstraint()); constraints.add(mock(HardRouteConstraint.class)); ConstraintManager cManager = new ConstraintManager(mock(VehicleR...
public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardRouteConstraintManager.getConstraints()); constraints.addAll(softActivityConstraintManager.getConstraints()); constraints...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
@Test public void whenGettingConstraintsViaConstructorAndAtLeastOneConstraintCannotBeResolved_itShouldOnlyAddTheKnownConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.add(new ServiceDeliveriesFirstConstraint()); constraints.add(mock(Constraint.class)); ConstraintManager cManager = ...
public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardRouteConstraintManager.getConstraints()); constraints.addAll(softActivityConstraintManager.getConstraints()); constraints...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
ConstraintManager implements HardActivityConstraint, HardRouteConstraint, SoftActivityConstraint, SoftRouteConstraint { public Collection<Constraint> getConstraints() { List<Constraint> constraints = new ArrayList<Constraint>(); constraints.addAll(actLevelConstraintManager.getAllConstraints()); constraints.addAll(hardR...
@Test public void whenSkillsAdded_theyShouldBeinSkillSet() { Skills skills = Skills.Builder.newInstance().addSkill("skill1").addSkill("skill2").build(); assertTrue(skills.containsSkill("skill1")); assertTrue(skills.containsSkill("skill2")); }
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenReadingSolomonInstance_vehicleLocationsAreCorrect_and_correspondToDepotLocation() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new SolomonReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); for (Vehicle v : vrp.getVehicles()) { as...
public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line.split(" +"); co...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
@Test public void whenSkillsAddedCaseInsensitive_theyShouldBeinSkillSet() { Skills skills = Skills.Builder.newInstance().addSkill("skill1").addSkill("skill2").build(); assertTrue(skills.containsSkill("skilL1")); assertTrue(skills.containsSkill("skIll2")); }
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedCaseInsensitive2_theyShouldBeinSkillSet() { Skills skills = Skills.Builder.newInstance().addSkill("Skill1").addSkill("skill2").build(); assertTrue(skills.containsSkill("skilL1")); assertTrue(skills.containsSkill("skIll2")); }
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedThroughAddAll_theyShouldBeinSkillSet() { Set<String> skillSet = new HashSet<String>(); skillSet.add("skill1"); skillSet.add("skill2"); Skills skills = Skills.Builder.newInstance().addAllSkills(skillSet).build(); assertTrue(skills.containsSkill("skill1")); assertTrue(skills.containsSkill...
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedThroughAddAllCaseInsensitive_theyShouldBeinSkillSet() { Set<String> skillSet = new HashSet<String>(); skillSet.add("skill1"); skillSet.add("skill2"); Skills skills = Skills.Builder.newInstance().addAllSkills(skillSet).build(); assertTrue(skills.containsSkill("skilL1")); assertTrue(skill...
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedThroughAddAllCaseInsensitive2_theyShouldBeinSkillSet() { Set<String> skillSet = new HashSet<String>(); skillSet.add("skill1"); skillSet.add("Skill2"); Skills skills = Skills.Builder.newInstance().addAllSkills(skillSet).build(); assertTrue(skills.containsSkill("skill1")); assertTrue(skil...
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedPrecedingWhitespaceShouldNotMatter() { Set<String> skillSet = new HashSet<String>(); skillSet.add(" skill1"); skillSet.add("Skill2"); Skills skills = Skills.Builder.newInstance().addAllSkills(skillSet).build(); assertTrue(skills.containsSkill("skill1")); assertTrue(skills.containsSkill(...
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedTrailingWhitespaceShouldNotMatter() { Set<String> skillSet = new HashSet<String>(); skillSet.add("skill1 "); skillSet.add("Skill2"); Skills skills = Skills.Builder.newInstance().addAllSkills(skillSet).build(); assertTrue(skills.containsSkill("skill1")); assertTrue(skills.containsSkill("...
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void whenSkillsAddedTrailingWhitespaceShouldNotMatter2() { Skills skills = Skills.Builder.newInstance().addSkill("skill1 ").build(); assertTrue(skills.containsSkill("skill1")); }
public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
Skills { public boolean containsSkill(String skill) { return skills.contains(skill.trim().toLowerCase()); } private Skills(Builder builder); Set<String> values(); String toString(); boolean containsSkill(String skill); @Override boolean equals(Object o); @Override int hashCode(); }
@Test public void routeShouldBeAssigned() { assertEquals(route, context.getRoute()); }
public VehicleRoute getRoute() { return route; }
JobInsertionContext { public VehicleRoute getRoute() { return route; } }
JobInsertionContext { public VehicleRoute getRoute() { return route; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); }
JobInsertionContext { public VehicleRoute getRoute() { return route; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssociate...
JobInsertionContext { public VehicleRoute getRoute() { return route; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssociate...
@Test public void jobShouldBeAssigned() { assertEquals(job, context.getJob()); }
public Job getJob() { return job; }
JobInsertionContext { public Job getJob() { return job; } }
JobInsertionContext { public Job getJob() { return job; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); }
JobInsertionContext { public Job getJob() { return job; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssociatedActivities()...
JobInsertionContext { public Job getJob() { return job; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssociatedActivities()...
@Test public void whenReadingSolomonInstance_demandOfCustomerOneIsCorrect() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new SolomonReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); assertEquals(10, vrp.getJobs().get("1").getSize().get(0)); }
public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line.split(" +"); co...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
@Test public void vehicleShouldBeAssigned() { assertEquals(vehicle, context.getNewVehicle()); }
public Vehicle getNewVehicle() { return newVehicle; }
JobInsertionContext { public Vehicle getNewVehicle() { return newVehicle; } }
JobInsertionContext { public Vehicle getNewVehicle() { return newVehicle; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); }
JobInsertionContext { public Vehicle getNewVehicle() { return newVehicle; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAsso...
JobInsertionContext { public Vehicle getNewVehicle() { return newVehicle; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAsso...
@Test public void driverShouldBeAssigned() { assertEquals(driver, context.getNewDriver()); }
public Driver getNewDriver() { return newDriver; }
JobInsertionContext { public Driver getNewDriver() { return newDriver; } }
JobInsertionContext { public Driver getNewDriver() { return newDriver; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); }
JobInsertionContext { public Driver getNewDriver() { return newDriver; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssocia...
JobInsertionContext { public Driver getNewDriver() { return newDriver; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssocia...
@Test public void depTimeShouldBeAssigned() { assertEquals(0., context.getNewDepTime(), 0.001); }
public double getNewDepTime() { return newDepTime; }
JobInsertionContext { public double getNewDepTime() { return newDepTime; } }
JobInsertionContext { public double getNewDepTime() { return newDepTime; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); }
JobInsertionContext { public double getNewDepTime() { return newDepTime; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssoc...
JobInsertionContext { public double getNewDepTime() { return newDepTime; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTime(); List<TourActivity> getAssoc...
@Test public void relatedActivitiesShouldBeAssigned() { context.getAssociatedActivities().add(mock(TourActivity.class)); context.getAssociatedActivities().add(mock(TourActivity.class)); assertEquals(2, context.getAssociatedActivities().size()); }
public List<TourActivity> getAssociatedActivities() { return associatedActivities; }
JobInsertionContext { public List<TourActivity> getAssociatedActivities() { return associatedActivities; } }
JobInsertionContext { public List<TourActivity> getAssociatedActivities() { return associatedActivities; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); }
JobInsertionContext { public List<TourActivity> getAssociatedActivities() { return associatedActivities; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTim...
JobInsertionContext { public List<TourActivity> getAssociatedActivities() { return associatedActivities; } JobInsertionContext(VehicleRoute route, Job job, Vehicle newVehicle, Driver newDriver, double newDepTime); VehicleRoute getRoute(); Job getJob(); Vehicle getNewVehicle(); Driver getNewDriver(); double getNewDepTim...
@Test(expected = IllegalArgumentException.class) public void whenIndexSmallerZero_throwException() { Location l = Location.Builder.newInstance().setIndex(-1).build(); }
public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); }
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } }
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } private Location(Builder builder); }
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } private Location(Builder builder); static Location newInstance(double x, double y); static Location newInstance(String id); static ...
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } private Location(Builder builder); static Location newInstance(double x, double y); static Location newInstance(String id); static ...
@Test(expected = IllegalArgumentException.class) public void whenCoordinateAndIdAndIndexNotSet_throwException() { Location l = Location.Builder.newInstance().build(); }
public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); }
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } }
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } private Location(Builder builder); }
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } private Location(Builder builder); static Location newInstance(double x, double y); static Location newInstance(String id); static ...
Location implements HasIndex, HasId { public static Location newInstance(double x, double y) { return Location.Builder.newInstance().setCoordinate(Coordinate.newInstance(x, y)).build(); } private Location(Builder builder); static Location newInstance(double x, double y); static Location newInstance(String id); static ...
@Test public void whenBuildingWithInfiniteFleet_fleetSizeShouldBeInfinite() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); builder.setFleetSize(FleetSize.INFINITE); VehicleRoutingProblem vrp = builder.build(); assertEquals(FleetSize.INFINITE, vrp.getFleetSize()); }
public FleetSize getFleetSize() { return fleetSize; }
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } }
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes(); Collection<Vehi...
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes(); Collection<Vehi...
@Test public void whenBuildingWithFiniteFleet_fleetSizeShouldBeFinite() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); builder.setFleetSize(FleetSize.FINITE); VehicleRoutingProblem vrp = builder.build(); assertEquals(FleetSize.FINITE, vrp.getFleetSize()); }
public FleetSize getFleetSize() { return fleetSize; }
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } }
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes(); Collection<Vehi...
VehicleRoutingProblem { public FleetSize getFleetSize() { return fleetSize; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes(); Collection<Vehi...
@Test public void whenAddingFourVehiclesAllAtOnce_vrpShouldContainTheCorrectNuOfVehicles() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setStartLocation(Location.newInstance("start")).build(); VehicleImpl v2 = VehicleImpl.B...
public Collection<Vehicle> getVehicles() { return Collections.unmodifiableCollection(vehicles); }
VehicleRoutingProblem { public Collection<Vehicle> getVehicles() { return Collections.unmodifiableCollection(vehicles); } }
VehicleRoutingProblem { public Collection<Vehicle> getVehicles() { return Collections.unmodifiableCollection(vehicles); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Collection<Vehicle> getVehicles() { return Collections.unmodifiableCollection(vehicles); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInc...
VehicleRoutingProblem { public Collection<Vehicle> getVehicles() { return Collections.unmodifiableCollection(vehicles); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInc...
@Test public void whenBuildingWithFourVehiclesAndTwoTypes_vrpShouldContainTheCorrectNuOfTypes() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("type1").build(); VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance...
public Collection<VehicleType> getTypes() { return Collections.unmodifiableCollection(vehicleTypes); }
VehicleRoutingProblem { public Collection<VehicleType> getTypes() { return Collections.unmodifiableCollection(vehicleTypes); } }
VehicleRoutingProblem { public Collection<VehicleType> getTypes() { return Collections.unmodifiableCollection(vehicleTypes); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Collection<VehicleType> getTypes() { return Collections.unmodifiableCollection(vehicleTypes); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJo...
VehicleRoutingProblem { public Collection<VehicleType> getTypes() { return Collections.unmodifiableCollection(vehicleTypes); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJo...
@Test public void whenReadingSolomonInstance_serviceDurationOfCustomerTwoIsCorrect() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new SolomonReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); assertEquals(90, ((Service) vrp.getJobs().get("2")).getServ...
public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line.split(" +"); co...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
@Test public void whenPickupsAreAdded_vrpShouldContainThem() { Pickup s1 = mock(Pickup.class); when(s1.getId()).thenReturn("s1"); when(s1.getLocation()).thenReturn(Location.Builder.newInstance().setIndex(1).build()); Pickup s2 = mock(Pickup.class); when(s2.getId()).thenReturn("s2"); when(s2.getLocation()).thenReturn(Lo...
public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
@Test public void whenPickupsAreAddedAllAtOnce_vrpShouldContainThem() { Pickup s1 = mock(Pickup.class); when(s1.getId()).thenReturn("s1"); when(s1.getLocation()).thenReturn(Location.Builder.newInstance().setIndex(1).build()); Pickup s2 = mock(Pickup.class); when(s2.getId()).thenReturn("s2"); when(s2.getLocation()).then...
public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
@Test public void whenDelivieriesAreAdded_vrpShouldContainThem() { Delivery s1 = mock(Delivery.class); when(s1.getId()).thenReturn("s1"); when(s1.getSize()).thenReturn(Capacity.Builder.newInstance().build()); when(s1.getLocation()).thenReturn(Location.Builder.newInstance().setIndex(1).build()); Delivery s2 = mock(Deliv...
public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
@Test public void whenDelivieriesAreAddedAllAtOnce_vrpShouldContainThem() { Delivery s1 = mock(Delivery.class); when(s1.getId()).thenReturn("s1"); when(s1.getSize()).thenReturn(Capacity.Builder.newInstance().build()); when(s1.getLocation()).thenReturn(Location.Builder.newInstance().setIndex(1).build()); Delivery s2 = m...
public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
@Test public void whenServicesAreAddedAllAtOnce_vrpShouldContainThem() { Service s1 = mock(Service.class); when(s1.getId()).thenReturn("s1"); when(s1.getLocation()).thenReturn(Location.Builder.newInstance().setIndex(1).build()); Service s2 = mock(Service.class); when(s2.getId()).thenReturn("s2"); when(s2.getLocation())...
public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
VehicleRoutingProblem { public Map<String, Job> getJobs() { return Collections.unmodifiableMap(jobs); } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
@Test public void whenSettingActivityCosts_vrpShouldContainIt() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); builder.setActivityCosts(new VehicleRoutingActivityCosts() { @Override public double getActivityCost(TourActivity tourAct, double arrivalTime, Driver driver, Vehicle veh...
public VehicleRoutingActivityCosts getActivityCosts() { return activityCosts; }
VehicleRoutingProblem { public VehicleRoutingActivityCosts getActivityCosts() { return activityCosts; } }
VehicleRoutingProblem { public VehicleRoutingActivityCosts getActivityCosts() { return activityCosts; } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public VehicleRoutingActivityCosts getActivityCosts() { return activityCosts; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
VehicleRoutingProblem { public VehicleRoutingActivityCosts getActivityCosts() { return activityCosts; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsI...
@Test public void whenSettingRoutingCosts_vprShouldContainIt() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); builder.setRoutingCost(new AbstractForwardVehicleRoutingTransportCosts() { @Override public double getDistance(Location from, Location to, double departureTime, Vehicle v...
public VehicleRoutingTransportCosts getTransportCosts() { return transportCosts; }
VehicleRoutingProblem { public VehicleRoutingTransportCosts getTransportCosts() { return transportCosts; } }
VehicleRoutingProblem { public VehicleRoutingTransportCosts getTransportCosts() { return transportCosts; } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public VehicleRoutingTransportCosts getTransportCosts() { return transportCosts; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJo...
VehicleRoutingProblem { public VehicleRoutingTransportCosts getTransportCosts() { return transportCosts; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJo...
@Test public void whenAddingInitialRoute_itShouldBeAddedCorrectly() { VehicleImpl vehicle = VehicleImpl.Builder.newInstance("v") .setStartLocation(Location.newInstance("start")).setEndLocation(Location.newInstance("end")).build(); VehicleRoute route = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).bui...
public Collection<VehicleRoute> getInitialVehicleRoutes() { Collection<VehicleRoute> copiedInitialRoutes = new ArrayList<>(); for (VehicleRoute route : initialVehicleRoutes) { copiedInitialRoutes.add(VehicleRoute.copyOf(route)); } return copiedInitialRoutes; }
VehicleRoutingProblem { public Collection<VehicleRoute> getInitialVehicleRoutes() { Collection<VehicleRoute> copiedInitialRoutes = new ArrayList<>(); for (VehicleRoute route : initialVehicleRoutes) { copiedInitialRoutes.add(VehicleRoute.copyOf(route)); } return copiedInitialRoutes; } }
VehicleRoutingProblem { public Collection<VehicleRoute> getInitialVehicleRoutes() { Collection<VehicleRoute> copiedInitialRoutes = new ArrayList<>(); for (VehicleRoute route : initialVehicleRoutes) { copiedInitialRoutes.add(VehicleRoute.copyOf(route)); } return copiedInitialRoutes; } private VehicleRoutingProblem(Buil...
VehicleRoutingProblem { public Collection<VehicleRoute> getInitialVehicleRoutes() { Collection<VehicleRoute> copiedInitialRoutes = new ArrayList<>(); for (VehicleRoute route : initialVehicleRoutes) { copiedInitialRoutes.add(VehicleRoute.copyOf(route)); } return copiedInitialRoutes; } private VehicleRoutingProblem(Buil...
VehicleRoutingProblem { public Collection<VehicleRoute> getInitialVehicleRoutes() { Collection<VehicleRoute> copiedInitialRoutes = new ArrayList<>(); for (VehicleRoute route : initialVehicleRoutes) { copiedInitialRoutes.add(VehicleRoute.copyOf(route)); } return copiedInitialRoutes; } private VehicleRoutingProblem(Buil...
@Test public void whenAddingInitialRoute_locationOfVehicleMustBeMemorized() { Location start = TestUtils.loc("start", Coordinate.newInstance(0, 1)); Location end = Location.newInstance("end"); VehicleImpl vehicle = VehicleImpl.Builder.newInstance("v") .setStartLocation(start) .setEndLocation(end).build(); VehicleRoute ...
public Collection<Location> getAllLocations(){ return allLocations; }
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } }
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes();...
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes();...
@Test public void whenAddingTwoJobs_theyShouldHaveProperIndeces() { Service service = Service.Builder.newInstance("myService").setLocation(Location.newInstance("loc")).build(); Shipment shipment = Shipment.Builder.newInstance("shipment").setPickupLocation(Location.Builder.newInstance().setId("pick").build()) .setDelive...
public Collection<Location> getAllLocations(){ return allLocations; }
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } }
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } private VehicleRoutingProblem(Builder builder); }
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes();...
VehicleRoutingProblem { public Collection<Location> getAllLocations(){ return allLocations; } private VehicleRoutingProblem(Builder builder); @Override String toString(); FleetSize getFleetSize(); Map<String, Job> getJobs(); Collection<Job> getJobsWithLocation(); Map<String, Job> getJobsInclusiveInitialJobsInRoutes();...
@Test public void whenReadingSolomonInstance_earliestServiceStartTimeOfCustomerSixtyTwoIsCorrect() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new SolomonReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); assertEquals(262.0, ((Service) vrp.getJobs()....
public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line.split(" +"); co...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
@Test public void whenSettingSimplyOneCapDimension_nuOfDimensionMustBeCorrect() { Capacity.Builder capBuilder = Capacity.Builder.newInstance(); capBuilder.addDimension(0, 4); Capacity cap = capBuilder.build(); assertEquals(1, cap.getNuOfDimensions()); }
public int getNuOfDimensions() { return dimensions.length; }
Capacity { public int getNuOfDimensions() { return dimensions.length; } }
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert(Capacity cap2invert); static double...
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert(Capacity cap2invert); static double...
@Test public void whenSettingTwoCapDimension_nuOfDimensionMustBeCorrect() { Capacity.Builder capBuilder = Capacity.Builder.newInstance(); capBuilder.addDimension(0, 4); capBuilder.addDimension(1, 10); Capacity cap = capBuilder.build(); assertEquals(2, cap.getNuOfDimensions()); }
public int getNuOfDimensions() { return dimensions.length; }
Capacity { public int getNuOfDimensions() { return dimensions.length; } }
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert(Capacity cap2invert); static double...
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert(Capacity cap2invert); static double...
@Test public void whenSettingRandomNuOfCapDimension_nuOfDimensionMustBeCorrect() { Random rand = new Random(); int nuOfCapDimensions = 1 + rand.nextInt(100); Capacity.Builder capBuilder = Capacity.Builder.newInstance(); capBuilder.addDimension(nuOfCapDimensions - 1, 4); Capacity cap = capBuilder.build(); assertEquals(n...
public int getNuOfDimensions() { return dimensions.length; }
Capacity { public int getNuOfDimensions() { return dimensions.length; } }
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert(Capacity cap2invert); static double...
Capacity { public int getNuOfDimensions() { return dimensions.length; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert(Capacity cap2invert); static double...
@Test public void whenSettingOneDimValue_valueMustBeCorrect() { Capacity.Builder capBuilder = Capacity.Builder.newInstance(); capBuilder.addDimension(0, 4); Capacity cap = capBuilder.build(); assertEquals(4, cap.get(0)); }
public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; }
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } }
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert...
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert...
@Test public void whenGettingIndexWhichIsHigherThanNuOfCapDimensions_itShouldReturn0() { Capacity.Builder capBuilder = Capacity.Builder.newInstance(); capBuilder.addDimension(0, 4); Capacity cap = capBuilder.build(); assertEquals(0, cap.get(2)); }
public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; }
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } }
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert...
Capacity { public int get(int index) { if (index < dimensions.length) return dimensions[index]; return 0; } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); static Capacity invert...
@Test public void whenCopyingNull_itShouldReturnNull() { Capacity nullCap = Capacity.copyOf(null); assertTrue(nullCap == null); }
public static Capacity copyOf(Capacity capacity) { if (capacity == null) return null; return new Capacity(capacity); }
Capacity { public static Capacity copyOf(Capacity capacity) { if (capacity == null) return null; return new Capacity(capacity); } }
Capacity { public static Capacity copyOf(Capacity capacity) { if (capacity == null) return null; return new Capacity(capacity); } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public static Capacity copyOf(Capacity capacity) { if (capacity == null) return null; return new Capacity(capacity); } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); ...
Capacity { public static Capacity copyOf(Capacity capacity) { if (capacity == null) return null; return new Capacity(capacity); } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capacity cap1, Capacity cap2); static Capacity subtract(Capacity cap, Capacity cap2subtract); ...
@Test(expected = NullPointerException.class) public void whenOneOfArgsIsNullWhenAdding_itShouldThrowException() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 2).build(); @SuppressWarnings("unused") Capacity result = Capacity.addup(cap1, null); }
public static Capacity addup(Capacity cap1, Capacity cap2) { if (cap1 == null || cap2 == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap1.getNuOfDimensions(), cap2.getNuOfDimensions()); i++) { capacit...
Capacity { public static Capacity addup(Capacity cap1, Capacity cap2) { if (cap1 == null || cap2 == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap1.getNuOfDimensions(), cap2.getNuOfDimensions()); i++...
Capacity { public static Capacity addup(Capacity cap1, Capacity cap2) { if (cap1 == null || cap2 == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap1.getNuOfDimensions(), cap2.getNuOfDimensions()); i++...
Capacity { public static Capacity addup(Capacity cap1, Capacity cap2) { if (cap1 == null || cap2 == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap1.getNuOfDimensions(), cap2.getNuOfDimensions()); i++...
Capacity { public static Capacity addup(Capacity cap1, Capacity cap2) { if (cap1 == null || cap2 == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap1.getNuOfDimensions(), cap2.getNuOfDimensions()); i++...
@Test(expected = NullPointerException.class) public void whenOneOfArgsIsNullWhenSubtracting_itShouldThrowException() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 2).build(); @SuppressWarnings("unused") Capacity result = Capacity.subtract(cap1, null); }
public static Capacity subtract(Capacity cap, Capacity cap2subtract) { if (cap == null || cap2subtract == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap.getNuOfDimensions(), cap2subtract.getNuOfDimen...
Capacity { public static Capacity subtract(Capacity cap, Capacity cap2subtract) { if (cap == null || cap2subtract == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap.getNuOfDimensions(), cap2subtract.g...
Capacity { public static Capacity subtract(Capacity cap, Capacity cap2subtract) { if (cap == null || cap2subtract == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap.getNuOfDimensions(), cap2subtract.g...
Capacity { public static Capacity subtract(Capacity cap, Capacity cap2subtract) { if (cap == null || cap2subtract == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap.getNuOfDimensions(), cap2subtract.g...
Capacity { public static Capacity subtract(Capacity cap, Capacity cap2subtract) { if (cap == null || cap2subtract == null) throw new NullPointerException("arguments must not be null"); Capacity.Builder capacityBuilder = Capacity.Builder.newInstance(); for (int i = 0; i < Math.max(cap.getNuOfDimensions(), cap2subtract.g...
@Test public void whenOneCapIsLessThanAnother_itShouldReturnCorrectBoolean() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 2).addDimension(2, 3).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); assertTrue(cap1...
public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
@Test public void whenOneCapIsLessThanAnother_itShouldReturnCorrectBoolean_v2() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 2).addDimension(2, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); assertTrue(c...
public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
@Test public void whenReadingSolomonInstance_latestServiceStartTimeOfCustomerEightySevenIsCorrect() { VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new SolomonReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); assertEquals(144.0, ((Service) vrp.getJobs()...
public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line.split(" +"); co...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
SolomonReader { public void read(String solomonFile) { vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while ((line = readLine(reader)) != null) { line = line.replace("\r", ""); line = line.trim(); String[] tokens = line...
@Test public void whenOneCapIsLessThanAnother_itShouldReturnCorrectBoolean_v3() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); assertTrue(c...
public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
@Test public void whenOneCapIsBiggerThanAnother_itShouldReturnCorrectBoolean() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).addDimension(2, 4).build(); assertFalse(c...
public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
Capacity { public boolean isLessOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < this.getNuOfDimensions(); i++) { if (this.get(i) > toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity); private Capacity(Builder builder); static ...
@Test public void whenOneCapIsBiggerThanAnother_greaterOrEqualShouldReturnTrue() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).addDimension(2, 4).build(); assertTrue(...
public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; }
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
@Test public void whenOneCapIsBiggerThanAnother_greaterOrEqualShouldReturnTrue_v2() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().build(); assertTrue(cap1.isGreaterOrEqual(cap2)); }
public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; }
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
@Test public void whenOneCapIsEqualToAnother_greaterOrEqualShouldReturnTrue() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 3).addDimension(2, 4).build(); assertTrue(cap...
public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; }
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } }
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
Capacity { public boolean isGreaterOrEqual(Capacity toCompare) { if (toCompare == null) throw new NullPointerException(); for (int i = 0; i < Math.max(this.getNuOfDimensions(), toCompare.getNuOfDimensions()); i++) { if (this.get(i) < toCompare.get(i)) return false; } return true; } private Capacity(Capacity capacity);...
@Test public void whenDividingTwoCapacities_itShouldReturn05() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 2).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).build(); assertEquals(0.5, Capacity.divide(cap1, cap2), 0.001); }
public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new IllegalArg...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
@Test public void whenDividingTwoEqualCapacities_itShouldReturn10() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).build(); assertEquals(1.0, Capacity.divide(cap1, cap2), 0.001); }
public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new IllegalArg...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
@Test public void whenDividingTwoCapacities_itShouldReturn00() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 0).addDimension(1, 0).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).build(); assertEquals(0.0, Capacity.divide(cap1, cap2), 0.001); }
public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new IllegalArg...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
@Test(expected = IllegalArgumentException.class) public void whenDividingByAZeroDim_itShouldThrowException() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 2).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 0).build(); Capacity.divide(cap1,...
public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new IllegalArg...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
@Test public void whenBothDimOfNominatorAndDenominatorAreZero_divisionShouldIgnoreThisDim() { Capacity cap1 = Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 2).addDimension(3, 0).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 4).addDimension(3, 0).build(); ...
public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new IllegalArg...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
@Test public void whenReadingBelhaizaInstance_nuOfCustomersIsCorrect(){ VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new BelhaizaReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); assertEquals(100,vrp.getJobs().values().size()); }
public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; if(counter == 2){ ...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
@Test public void whenReadingInstance_fleetSizeIsFinite() { VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); new CordeauReader(vrpBuilder).read(getPath("p01")); VehicleRoutingProblem vrp = vrpBuilder.build(); assertEquals(FleetSize.FINITE, vrp.getFleetSize()); }
public void read(String fileName) { vrpBuilder.setFleetSize(FleetSize.FINITE); BufferedReader reader = getReader(fileName); int vrpType; int nOfDepots = 0; int nOfCustomers = 0; int nOfVehiclesAtEachDepot = 0; int counter = 0; String line; List<List<Builder>> vehiclesAtDepot = new ArrayList<List<Builder>>(); int depotC...
CordeauReader { public void read(String fileName) { vrpBuilder.setFleetSize(FleetSize.FINITE); BufferedReader reader = getReader(fileName); int vrpType; int nOfDepots = 0; int nOfCustomers = 0; int nOfVehiclesAtEachDepot = 0; int counter = 0; String line; List<List<Builder>> vehiclesAtDepot = new ArrayList<List<Builder...
CordeauReader { public void read(String fileName) { vrpBuilder.setFleetSize(FleetSize.FINITE); BufferedReader reader = getReader(fileName); int vrpType; int nOfDepots = 0; int nOfCustomers = 0; int nOfVehiclesAtEachDepot = 0; int counter = 0; String line; List<List<Builder>> vehiclesAtDepot = new ArrayList<List<Builder...
CordeauReader { public void read(String fileName) { vrpBuilder.setFleetSize(FleetSize.FINITE); BufferedReader reader = getReader(fileName); int vrpType; int nOfDepots = 0; int nOfCustomers = 0; int nOfVehiclesAtEachDepot = 0; int counter = 0; String line; List<List<Builder>> vehiclesAtDepot = new ArrayList<List<Builder...
CordeauReader { public void read(String fileName) { vrpBuilder.setFleetSize(FleetSize.FINITE); BufferedReader reader = getReader(fileName); int vrpType; int nOfDepots = 0; int nOfCustomers = 0; int nOfVehiclesAtEachDepot = 0; int counter = 0; String line; List<List<Builder>> vehiclesAtDepot = new ArrayList<List<Builder...
@Test public void whenDividingZeroCaps_itShouldReturnZero() { Capacity cap1 = Capacity.Builder.newInstance().build(); Capacity cap2 = Capacity.Builder.newInstance().build(); assertEquals(0.0, Capacity.divide(cap1, cap2), 0.001); }
public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new IllegalArg...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
Capacity { public static double divide(Capacity numerator, Capacity denominator) { int nuOfDimensions = 0; double sumQuotients = 0.0; for (int index = 0; index < Math.max(numerator.getNuOfDimensions(), denominator.getNuOfDimensions()); index++) { if (numerator.get(index) != 0 && denominator.get(index) == 0) { throw new...
@Test public void shouldBeEqual(){ Capacity cap1 = Capacity.Builder.newInstance().build(); Capacity cap2 = Capacity.Builder.newInstance().build(); Assert.assertTrue(cap1.equals(cap2)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); }
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } }
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capaci...
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capaci...
@Test public void shouldBeEqual2(){ Capacity cap1 = Capacity.Builder.newInstance().addDimension(0,10).addDimension(1,100).addDimension(2,1000).build(); Capacity cap2 = Capacity.Builder.newInstance().addDimension(0,10).addDimension(2, 1000).addDimension(1,100).build(); Assert.assertTrue(cap1.equals(cap2)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); }
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } }
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } private Capacity(Capacity capacity); private Capacity(Builder builder); }
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capaci...
Capacity { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Capacity)) return false; Capacity capacity = (Capacity) o; return Arrays.equals(dimensions, capacity.dimensions); } private Capacity(Capacity capacity); private Capacity(Builder builder); static Capacity addup(Capaci...
@Test public void whenTwoShipmentsHaveTheSameId_theyShouldBeEqual() { Shipment one = Shipment.Builder.newInstance("s").addSizeDimension(0, 10).setPickupLocation(Location.Builder.newInstance().setId("foo").build()). setDeliveryLocation(TestUtils.loc("foofoo")).setPickupServiceTime(10).setDeliveryServiceTime(20).build();...
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Shipment other = (Shipment) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; }
Shipment extends AbstractJob { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Shipment other = (Shipment) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; ...
Shipment extends AbstractJob { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Shipment other = (Shipment) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; ...
Shipment extends AbstractJob { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Shipment other = (Shipment) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; ...
Shipment extends AbstractJob { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Shipment other = (Shipment) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; ...
@Test public void whenShipmentIsInstantiatedWithASizeOf10_theSizeShouldBe10() { Shipment one = Shipment.Builder.newInstance("s").addSizeDimension(0, 10).setPickupLocation(Location.Builder.newInstance().setId("foo").build()). setDeliveryLocation(TestUtils.loc("foofoo")).setPickupServiceTime(10).setDeliveryServiceTime(20...
@Override public Capacity getSize() { return capacity; }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
@Test public void whenPickupCoordIsSet_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s") .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").setCoordinate(Coordinate.newInstance(1, 2)).build()).build(); assertEquals(1.0, s.getPickupLoc...
public Location getPickupLocation() { return pickupLocation_; }
Shipment extends AbstractJob { public Location getPickupLocation() { return pickupLocation_; } }
Shipment extends AbstractJob { public Location getPickupLocation() { return pickupLocation_; } Shipment(Builder builder); }
Shipment extends AbstractJob { public Location getPickupLocation() { return pickupLocation_; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection...
Shipment extends AbstractJob { public Location getPickupLocation() { return pickupLocation_; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection...
@Test public void whenDeliveryCoordIsSet_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").setDeliveryLocation(TestUtils.loc("delLoc", Coordinate.newInstance(1, 2))) .setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()) .build(); assertEquals(1.0, s.getDeliveryLocation().g...
public Location getDeliveryLocation() { return deliveryLocation_; }
Shipment extends AbstractJob { public Location getDeliveryLocation() { return deliveryLocation_; } }
Shipment extends AbstractJob { public Location getDeliveryLocation() { return deliveryLocation_; } Shipment(Builder builder); }
Shipment extends AbstractJob { public Location getDeliveryLocation() { return deliveryLocation_; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collec...
Shipment extends AbstractJob { public Location getDeliveryLocation() { return deliveryLocation_; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collec...
@Test public void whenPickupServiceTimeIsNotSet_itShouldBeZero() { Shipment s = Shipment.Builder.newInstance("s") .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(0.0, s.getPickupServiceTime(), 0.01); }
public double getPickupServiceTime() { return pickupServiceTime; }
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } }
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } Shipment(Builder builder); }
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collect...
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collect...
@Test public void whenDeliveryServiceTimeIsNotSet_itShouldBeZero() { Shipment s = Shipment.Builder.newInstance("s") .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(0.0, s.getDeliveryServiceTime(), 0.01); }
public double getDeliveryServiceTime() { return deliveryServiceTime; }
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } }
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } Shipment(Builder builder); }
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Col...
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Col...
@Test public void whenPickupServiceTimeIsSet_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s") .setPickupServiceTime(2.0) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(2.0, s.getPickupServiceTime(),...
public double getPickupServiceTime() { return pickupServiceTime; }
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } }
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } Shipment(Builder builder); }
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collect...
Shipment extends AbstractJob { public double getPickupServiceTime() { return pickupServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collect...
@Test public void whenReadingBelhaizaInstance_fleetSizeIsInfinite(){ VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new BelhaizaReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); assertEquals(FleetSize.INFINITE,vrp.getFleetSize()); }
public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; if(counter == 2){ ...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
@Test public void whenDeliveryServiceTimeIsSet_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").setDeliveryServiceTime(2.0) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(2.0, s.getDeliveryServiceTi...
public double getDeliveryServiceTime() { return deliveryServiceTime; }
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } }
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } Shipment(Builder builder); }
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Col...
Shipment extends AbstractJob { public double getDeliveryServiceTime() { return deliveryServiceTime; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Col...
@Test public void whenPickupTimeWindowIsNotSet_itShouldBeTheDefaultOne() { Shipment s = Shipment.Builder.newInstance("s").setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(0.0, s.getPickupTimeWindow().getStart(), 0.01); assertEq...
public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
@Test public void whenPickupTimeWindowIsSet_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").setPickupTimeWindow(TimeWindow.newInstance(1, 2)) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(1.0, s.g...
public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
@Test public void whenDeliveryTimeWindowIsNotSet_itShouldBeTheDefaultOne() { Shipment s = Shipment.Builder.newInstance("s").setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(0.0, s.getDeliveryTimeWindow().getStart(), 0.01); asse...
public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
@Test public void whenDeliveryTimeWindowIsSet_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").setDeliveryTimeWindow(TimeWindow.newInstance(1, 2)) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(1.0,...
public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
@Test public void whenUsingAddDeliveryTimeWindow_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").addDeliveryTimeWindow(TimeWindow.newInstance(1, 2)) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(1...
public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
@Test public void whenUsingAddDeliveryTimeWindow2_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").addDeliveryTimeWindow(1, 2) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(1.0, s.getDeliveryTimeWi...
public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
@Test public void whenAddingMultipleDeliveryTimeWindows_itShouldBeDoneCorrectly() { TimeWindow tw1 = TimeWindow.newInstance(1,2); TimeWindow tw2 = TimeWindow.newInstance(4,5); Shipment s = Shipment.Builder.newInstance("s").addDeliveryTimeWindow(tw1).addDeliveryTimeWindow(tw2) .setDeliveryLocation(TestUtils.loc("delLoc"...
public Collection<TimeWindow> getDeliveryTimeWindows() { return deliveryTimeWindows.getTimeWindows(); }
Shipment extends AbstractJob { public Collection<TimeWindow> getDeliveryTimeWindows() { return deliveryTimeWindows.getTimeWindows(); } }
Shipment extends AbstractJob { public Collection<TimeWindow> getDeliveryTimeWindows() { return deliveryTimeWindows.getTimeWindows(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public Collection<TimeWindow> getDeliveryTimeWindows() { return deliveryTimeWindows.getTimeWindows(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWi...
Shipment extends AbstractJob { public Collection<TimeWindow> getDeliveryTimeWindows() { return deliveryTimeWindows.getTimeWindows(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWi...
@Test(expected = IllegalArgumentException.class) public void whenAddingMultipleOverlappingDeliveryTimeWindows_itShouldThrowException() { Shipment s = Shipment.Builder.newInstance("s").addDeliveryTimeWindow(1, 3).addDeliveryTimeWindow(2,5) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder....
public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
Shipment extends AbstractJob { public TimeWindow getDeliveryTimeWindow() { return deliveryTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); T...
@Test public void whenUsingAddPickupTimeWindow_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").addPickupTimeWindow(TimeWindow.newInstance(1, 2)) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(1.0, ...
public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
@Test public void whenReadingBelhaizaInstance_vehicleCapacitiesAreCorrect(){ VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new BelhaizaReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); for(Vehicle v : vrp.getVehicles()){ assertEquals(200,v.getType().get...
public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; if(counter == 2){ ...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
@Test public void whenUsingAddPickupTimeWindow2_itShouldBeDoneCorrectly() { Shipment s = Shipment.Builder.newInstance("s").addPickupTimeWindow(1, 2) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newInstance().setId("pickLoc").build()).build(); assertEquals(1.0, s.getPickupTimeWindow()...
public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
@Test public void whenAddingMultiplePickupTimeWindows_itShouldBeDoneCorrectly() { TimeWindow tw1 = TimeWindow.newInstance(1,2); TimeWindow tw2 = TimeWindow.newInstance(4,5); Shipment s = Shipment.Builder.newInstance("s").addPickupTimeWindow(tw1).addPickupTimeWindow(tw2) .setDeliveryLocation(TestUtils.loc("delLoc")).set...
public Collection<TimeWindow> getPickupTimeWindows() { return pickupTimeWindows.getTimeWindows(); }
Shipment extends AbstractJob { public Collection<TimeWindow> getPickupTimeWindows() { return pickupTimeWindows.getTimeWindows(); } }
Shipment extends AbstractJob { public Collection<TimeWindow> getPickupTimeWindows() { return pickupTimeWindows.getTimeWindows(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public Collection<TimeWindow> getPickupTimeWindows() { return pickupTimeWindows.getTimeWindows(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow...
Shipment extends AbstractJob { public Collection<TimeWindow> getPickupTimeWindows() { return pickupTimeWindows.getTimeWindows(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow...
@Test(expected = IllegalArgumentException.class) public void whenAddingMultipleOverlappingPickupTimeWindows_itShouldThrowException() { Shipment s = Shipment.Builder.newInstance("s").addPickupTimeWindow(1, 3).addPickupTimeWindow(2,5) .setDeliveryLocation(TestUtils.loc("delLoc")).setPickupLocation(Location.Builder.newIns...
public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); }
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
Shipment extends AbstractJob { public TimeWindow getPickupTimeWindow() { return pickupTimeWindows.getTimeWindows().iterator().next(); } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeW...
@Test public void whenAddingTwoCapDimension_nuOfDimsShouldBeTwo() { Shipment one = Shipment.Builder.newInstance("s").setPickupLocation(Location.Builder.newInstance().setId("foo").build()) .setDeliveryLocation(TestUtils.loc("foofoo")) .addSizeDimension(0, 2) .addSizeDimension(1, 4) .build(); assertEquals(2, one.getSize(...
@Override public Capacity getSize() { return capacity; }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
@Test public void whenShipmentIsBuiltWithoutSpecifyingCapacity_itShouldHvCapWithOneDimAndDimValOfZero() { Shipment one = Shipment.Builder.newInstance("s") .setPickupLocation(Location.Builder.newInstance().setId("foo").setCoordinate(Coordinate.newInstance(0, 0)).build()) .setDeliveryLocation(TestUtils.loc("foofoo")).bui...
@Override public Capacity getSize() { return capacity; }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
@Test public void whenShipmentIsBuiltWithConstructorWhereSizeIsSpecified_capacityShouldBeSetCorrectly() { Shipment one = Shipment.Builder.newInstance("s").addSizeDimension(0, 1) .setPickupLocation(Location.Builder.newInstance().setId("foo").setCoordinate(Coordinate.newInstance(0, 0)).build()) .setDeliveryLocation(TestU...
@Override public Capacity getSize() { return capacity; }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
Shipment extends AbstractJob { @Override public Capacity getSize() { return capacity; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWi...
@Test public void whenAddingSkills_theyShouldBeAddedCorrectly() { Shipment s = Shipment.Builder.newInstance("s").setPickupLocation(Location.Builder.newInstance().setId("loc").build()) .setDeliveryLocation(TestUtils.loc("delLoc")) .addRequiredSkill("drill").addRequiredSkill("screwdriver").build(); assertTrue(s.getRequir...
@Override public Skills getRequiredSkills() { return skills; }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<...
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<...
@Test public void whenAddingSkillsCaseSens_theyShouldBeAddedCorrectly() { Shipment s = Shipment.Builder.newInstance("s") .setPickupLocation(Location.Builder.newInstance().setId("pick").build()) .setDeliveryLocation(TestUtils.loc("del")) .addRequiredSkill("DriLl").addRequiredSkill("screwDriver").build(); assertTrue(s.ge...
@Override public Skills getRequiredSkills() { return skills; }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<...
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<...
@Test public void whenAddingSkillsCaseSensV2_theyShouldBeAddedCorrectly() { Shipment s = Shipment.Builder.newInstance("s").setPickupLocation(Location.Builder.newInstance().setId("loc").build()) .setDeliveryLocation(TestUtils.loc("del")) .addRequiredSkill("screwDriver").build(); assertFalse(s.getRequiredSkills().contain...
@Override public Skills getRequiredSkills() { return skills; }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<...
Shipment extends AbstractJob { @Override public Skills getRequiredSkills() { return skills; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<...
@Test public void nameShouldBeAssigned() { Shipment s = Shipment.Builder.newInstance("s").setPickupLocation(Location.Builder.newInstance().setId("loc").build()) .setDeliveryLocation(TestUtils.loc("del")) .setName("name").build(); assertEquals("name", s.getName()); }
@Override public String getName() { return name; }
Shipment extends AbstractJob { @Override public String getName() { return name; } }
Shipment extends AbstractJob { @Override public String getName() { return name; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public String getName() { return name; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWindow> ...
Shipment extends AbstractJob { @Override public String getName() { return name; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWindow> ...
@Test public void whenReadingBelhaizaInstance_vehicleLocationsAreCorrect_and_correspondToDepotLocation(){ VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance(); new BelhaizaReader(builder).read(getPath()); VehicleRoutingProblem vrp = builder.build(); for(Vehicle v : vrp.getVehicles()){ ass...
public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; if(counter == 2){ ...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
BelhaizaReader { public void read(String solomonFile){ vrpBuilder.setFleetSize(FleetSize.INFINITE); BufferedReader reader = getReader(solomonFile); int vehicleCapacity = 0; int counter = 0; String line; while((line = readLine(reader)) != null){ String[] tokens = line.replace("\r", "").trim().split("\\s+"); counter++; i...
@Test public void whenSettingPriorities_itShouldBeSetCorrectly(){ Shipment s = Shipment.Builder.newInstance("s").setPickupLocation(Location.newInstance("loc")) .setDeliveryLocation(Location.newInstance("loc")) .setPriority(1).build(); Assert.assertEquals(1, s.getPriority()); }
@Override public int getPriority() { return priority; }
Shipment extends AbstractJob { @Override public int getPriority() { return priority; } }
Shipment extends AbstractJob { @Override public int getPriority() { return priority; } Shipment(Builder builder); }
Shipment extends AbstractJob { @Override public int getPriority() { return priority; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWin...
Shipment extends AbstractJob { @Override public int getPriority() { return priority; } Shipment(Builder builder); @Override String getId(); Location getPickupLocation(); double getPickupServiceTime(); Location getDeliveryLocation(); double getDeliveryServiceTime(); TimeWindow getDeliveryTimeWindow(); Collection<TimeWin...