Skip to content

Commit

Permalink
revert some formatting and visibility changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed Nov 12, 2023
1 parent 2ea03a2 commit 657bd7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import org.matsim.contrib.drt.schedule.DrtTaskType;
import org.matsim.contrib.dvrp.fleet.DvrpVehicle;
import org.matsim.contrib.dvrp.path.VrpPathWithTravelData;
import org.matsim.contrib.ev.fleet.ElectricVehicle;
import org.matsim.contrib.ev.infrastructure.Charger;
import org.matsim.contrib.evrp.EvDvrpVehicle;
import org.matsim.contrib.evrp.VrpPathEnergyConsumptions;
import org.matsim.contrib.ev.fleet.ElectricVehicle;
import org.matsim.contrib.ev.infrastructure.Charger;

/**
* @author michalm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* @author Michal Maciejewski (michalm)
*/
public class InternalPassengerHandling {
class InternalPassengerHandling {
private static final Logger LOGGER = LogManager.getLogger(InternalPassengerHandling.class);

private final String mode;
Expand All @@ -50,20 +50,20 @@ public class InternalPassengerHandling {

private InternalInterface internalInterface;

public InternalPassengerHandling(String mode, EventsManager eventsManager) {
InternalPassengerHandling(String mode, EventsManager eventsManager) {
this.mode = mode;
this.eventsManager = eventsManager;
}

public void setInternalInterface(InternalInterface internalInterface) {
void setInternalInterface(InternalInterface internalInterface) {
this.internalInterface = internalInterface;
}

public Id<Request> createRequestId() {
Id<Request> createRequestId() {
return Id.create(mode + "_" + currentRequestId.incrementAndGet(), Request.class);
}

public boolean validateRequest(PassengerRequest request, PassengerRequestValidator requestValidator, double now) {
boolean validateRequest(PassengerRequest request, PassengerRequestValidator requestValidator, double now) {
Set<String> violations = requestValidator.validateRequest(request);
if (!violations.isEmpty()) {
String cause = String.join(", ", violations);
Expand All @@ -75,7 +75,7 @@ public boolean validateRequest(PassengerRequest request, PassengerRequestValidat
return violations.isEmpty();
}

public boolean tryPickUpPassenger(MobsimDriverAgent driver, MobsimPassengerAgent passenger, Id<Request> requestId,
boolean tryPickUpPassenger(MobsimDriverAgent driver, MobsimPassengerAgent passenger, Id<Request> requestId,
double now) {
if (internalInterface.unregisterAdditionalAgentOnLink(passenger.getId(), driver.getCurrentLinkId()) == null) {
//only possible with prebooking
Expand All @@ -92,7 +92,7 @@ public boolean tryPickUpPassenger(MobsimDriverAgent driver, MobsimPassengerAgent
return true;
}

public void dropOffPassenger(MobsimDriverAgent driver, MobsimPassengerAgent passenger, Id<Request> requestId, double now) {
void dropOffPassenger(MobsimDriverAgent driver, MobsimPassengerAgent passenger, Id<Request> requestId, double now) {
MobsimVehicle mobVehicle = driver.getVehicle();
mobVehicle.removePassenger(passenger);
passenger.setVehicle(null);
Expand Down

0 comments on commit 657bd7e

Please sign in to comment.