Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Aug 7, 2024
1 parent ddd8c28 commit 034b2fe
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@
*/
class EventBasedCarrierScorer4MultipleChains implements CarrierScoringFunctionFactory {



@Inject private Network network;

@Inject private Scenario scenario;

private double toll;
private List<String> tolledVehicleTypes = new ArrayList<>();
private List<String> tolledLinks = new ArrayList<>();


public ScoringFunction createScoringFunction(Carrier carrier) {
SumScoringFunction sf = new SumScoringFunction();
sf.addScoringFunction(new EventBasedScoring());
Expand Down Expand Up @@ -119,7 +115,7 @@ private void handleEvent(CarrierTourStartEvent event) {
tourStartTime.put(event.getTourId(), event.getTime());
}

// Fix costs for vehicle usage
// scores fix costs for vehicle usage and variable costs per time
private void handleEvent(CarrierTourEndEvent event) {
// Fix costs for vehicle usage
final VehicleType vehicleType =
Expand All @@ -134,6 +130,7 @@ private void handleEvent(CarrierTourEndEvent event) {
score = score - (tourDuration * vehicleType.getCostInformation().getCostsPerSecond());
}

// scores variable costs per distance
private void handleEvent(LinkEnterEvent event) {
final double distance = network.getLinks().get(event.getLinkId()).getLength();
final double costPerMeter =
Expand Down

0 comments on commit 034b2fe

Please sign in to comment.