Blaham17 people parcels share - after project - #66
Conversation
…anComputationRequests
…anComputationRequests
…anComputationRequests
… these vehicles. But the PeopleFreightVehicle doesn't work now
… - problem with OnDemandVehicle and genericity of 'V'
| @@ -0,0 +1,83 @@ | |||
| /* | |||
There was a problem hiding this comment.
What is the purpose of this class?
| // max distance in meters between vehicle and request for the vehicle to be considered to serve the request | ||
| // maxDistance = (double) config.ridesharing.maxProlongationInSeconds | ||
| // * agentpolisConfig.maxVehicleSpeedInMeters; | ||
|
|
||
| // the traveltime from vehicle to request cannot be greater than max prolongation in milliseconds for the | ||
| // vehicle to be considered to serve the request | ||
| // maxDelayTime = config.ridesharing.maxProlongationInSeconds * 1000; | ||
| } |
There was a problem hiding this comment.
You should not modify this!
| this.positionUtil = positionUtil; | ||
| this.tripIdGenerator = tripIdGenerator; | ||
|
|
||
| public class RideSharingOnDemandVehicle<V extends PhysicalTransportVehicle> extends OnDemandVehicle<V> |
There was a problem hiding this comment.
You have reformated the whole class here, so now I cannot see the diff. You have to convert the indent back to tabs and also change the settings in your IDE to use tabs.
| } | ||
| } | ||
|
|
||
| public class InsertionHeuristicSolver extends DARPSolver implements EventHandler |
There was a problem hiding this comment.
Same problem here with the space indent
| import cz.cvut.fel.aic.simod.entity.DemandAgent; | ||
| import cz.cvut.fel.aic.simod.traveltimecomputation.TravelTimeProvider; | ||
|
|
||
| public class PlanComputationRequestPeople extends DefaultPlanComputationRequest |
There was a problem hiding this comment.
You can use DefaultPlanComputationRequest instead of this class, as there are no extra members.
| /** | ||
| * returns sorted list of new taxi schedule (or null if the schedule is not feasible) and duration of this schedule | ||
| */ | ||
| private ScheduleWithDuration trySchedule(int taxiIndex, DefaultPlanComputationRequest newRequest) |
There was a problem hiding this comment.
This method seems very inefficient, but if it is implemented according to the article, I guess we can leave it for now.
| protected final List<T> transportedEntities; | ||
| private final int vehiclePassengerCapacity; |
There was a problem hiding this comment.
You should use the infrastructure from parent for this
| public void setPosition(SimulationNode position) | ||
| { | ||
| super.setPosition(position); | ||
| Iterator var2 = this.transportedEntities.iterator(); | ||
|
|
||
| while (var2.hasNext()) | ||
| { | ||
| T transportedEntity = (T) var2.next(); // originally was (TransportableEntity) | ||
| transportedEntity.setPosition(position); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| @Override | ||
| public List<T> getTransportedEntities() | ||
| { | ||
| return transportedEntities; | ||
| } |
| public boolean isHighlited() | ||
| { | ||
| return this.highlited; | ||
| } | ||
|
|
||
| public void setHighlited(boolean highlited) | ||
| { | ||
| this.highlited = highlited; | ||
| } |
…, all vehicles should be working now
…ported people and packages
Former-commit-id: c500c6d2c9a857356eaf411bdae6016ec8b93efb
Former-commit-id: 55f7a25f133ba2122d48e40d4ab866c9d6f71e9e
Former-commit-id: f64f09ab135adfd23eadcf33de6d79f0cfede783
Former-commit-id: 036a2f95c7f5c790fc3c7645e171ae1b966d8d4b
No description provided.