Skip to content

Commit

Permalink
Merge branch 'master' into evMaintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
kainagel authored Oct 23, 2023
2 parents 9c47c82 + be45159 commit 4cbbf73
Show file tree
Hide file tree
Showing 32 changed files with 1,632 additions and 480 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static CarrierShipmentDeliveryEndEvent convert(GenericEvent event) {
Id<Link> shipmentTo = Id.createLinkId(attributes.get(ATTRIBUTE_LINK));
int size = Integer.parseInt(attributes.get(CarrierEventAttributes.ATTRIBUTE_CAPACITYDEMAND));
CarrierShipment shipment = CarrierShipment.Builder.newInstance(shipmentId, null, shipmentTo, size)
.setDeliveryServiceTime(Double.parseDouble(attributes.get(CarrierEventAttributes.ATTRIBUTE_SERVICE_DURATION)))
.setDeliveryServiceTime(Double.parseDouble(attributes.get(CarrierEventAttributes.ATTRIBUTE_DROPOFF_DURATION)))
.build();
Id<Vehicle> vehicleId = Id.createVehicleId(attributes.get(ATTRIBUTE_VEHICLE));
return new CarrierShipmentDeliveryEndEvent(time, carrierId, shipment, vehicleId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static CarrierShipmentDeliveryStartEvent convert(GenericEvent event) {
Id<Link> shipmentTo = Id.createLinkId(attributes.get(ATTRIBUTE_LINK));
int size = Integer.parseInt(attributes.get(ATTRIBUTE_CAPACITYDEMAND));
CarrierShipment shipment = CarrierShipment.Builder.newInstance(shipmentId, null, shipmentTo, size)
.setDeliveryServiceTime(Double.parseDouble(attributes.get(ATTRIBUTE_SERVICE_DURATION)))
.setDeliveryServiceTime(Double.parseDouble(attributes.get(ATTRIBUTE_DROPOFF_DURATION)))
.build();
Id<Vehicle> vehicleId = Id.createVehicleId(attributes.get(ATTRIBUTE_VEHICLE));
return new CarrierShipmentDeliveryStartEvent(time, carrierId, shipment, vehicleId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.matsim.core.events.handler.EventHandler;
import org.matsim.freight.carriers.events.CarrierServiceEndEvent;

public interface FreightServiceEndEventHandler extends EventHandler{
public interface CarrierServiceEndEventHandler extends EventHandler{

void handleEvent( CarrierServiceEndEvent event );
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.matsim.freight.carriers.events.CarrierServiceStartEvent;


public interface FreightServiceStartEventHandler extends EventHandler {
public interface CarrierServiceStartEventHandler extends EventHandler {

void handleEvent( CarrierServiceStartEvent event );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author sschroeder
*
*/
public interface FreightShipmentDeliveryEventHandler extends EventHandler {
public interface CarrierShipmentDeliveryEndEventHandler extends EventHandler {

void handleEvent(CarrierShipmentDeliveryEndEvent event);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* *********************************************************************** *
* project: org.matsim.*
* *********************************************************************** *
* *
* copyright : (C) by the members listed in the COPYING, *
* LICENSE and WARRANTY file. *
* email : info at matsim dot org *
* *
* *********************************************************************** *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* See also COPYING, LICENSE and WARRANTY file *
* *
* ***********************************************************************
*
*/

package org.matsim.freight.carriers.events.eventhandler;

import org.matsim.core.events.handler.EventHandler;
import org.matsim.freight.carriers.events.CarrierShipmentDeliveryStartEvent;

/**
* Interface to listen to shipmentDeliveredEvents.
*
* @author sschroeder
*
*/
public interface CarrierShipmentDeliveryStartEventHandler extends EventHandler {

void handleEvent(CarrierShipmentDeliveryStartEvent event);

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
* @author sschroeder
*
*/
public interface FreightShipmentPickupEventHandler extends EventHandler {
public interface CarrierShipmentPickupEndEventHandler extends EventHandler {
void handleEvent(CarrierShipmentPickupEndEvent event);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* *********************************************************************** *
* project: org.matsim.*
* *********************************************************************** *
* *
* copyright : (C) by the members listed in the COPYING, *
* LICENSE and WARRANTY file. *
* email : info at matsim dot org *
* *
* *********************************************************************** *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* See also COPYING, LICENSE and WARRANTY file *
* *
* ***********************************************************************
*
*/

package org.matsim.freight.carriers.events.eventhandler;

import org.matsim.core.events.handler.EventHandler;
import org.matsim.freight.carriers.events.CarrierShipmentPickupStartEvent;

/**
* Interface to listen to shipmentPickedUpEvents.
*
* @author sschroeder
*
*/
public interface CarrierShipmentPickupStartEventHandler extends EventHandler {
void handleEvent(CarrierShipmentPickupStartEvent event);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.matsim.freight.carriers.events.CarrierTourEndEvent;


public interface FreightTourEndEventHandler extends EventHandler {
public interface CarrierTourEndEventHandler extends EventHandler {

void handleEvent( CarrierTourEndEvent event );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.matsim.freight.carriers.events.CarrierTourStartEvent;


public interface FreightTourStartEventHandler extends EventHandler {
public interface CarrierTourStartEventHandler extends EventHandler {

void handleEvent( CarrierTourStartEvent event );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* @author kturner
*/
public final class Vehicle2CarrierEventHandler implements FreightTourStartEventHandler, FreightTourEndEventHandler {
public final class Vehicle2CarrierEventHandler implements CarrierTourStartEventHandler, CarrierTourEndEventHandler {


// Comment from Janek (in https://github.com/matsim-org/matsim-libs/pull/2128)
Expand Down
Loading

0 comments on commit 4cbbf73

Please sign in to comment.