Skip to content

Commit

Permalink
make some classes final
Browse files Browse the repository at this point in the history
  • Loading branch information
kainagel committed Oct 20, 2023
1 parent 2f79b3e commit 6ced39d
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* @author Michal Maciejewski (michalm)
*/
public class DischargingModule extends AbstractModule {
public final class DischargingModule extends AbstractModule {
@Override
public void install() {
bind(DriveEnergyConsumption.Factory.class).toInstance(ev -> new OhdeSlaskiDriveEnergyConsumption());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* @author Michal Maciejewski (michalm)
*/
public class DrivingEnergyConsumptionEvent extends AbstractEnergyConsumptionEvent {
public final class DrivingEnergyConsumptionEvent extends AbstractEnergyConsumptionEvent {
public static final String EVENT_TYPE = "drivingEnergyConsumption";

public DrivingEnergyConsumptionEvent(double time, Id<Vehicle> vehicleId, Id<Link> linkId, double energy, double endCharge) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* VehicleProvider is responsible to decide if AUX discharging applies to a given vehicle based on information from
* ActivityStartEvent.
*/
public class IdleDischargingHandler
public final class IdleDischargingHandler
implements MobsimAfterSimStepListener, ActivityStartEventHandler, ActivityEndEventHandler, MobsimScopeEventHandler {
public interface VehicleProvider {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* @author Michal Maciejewski (michalm)
*/
public class IdlingEnergyConsumptionEvent extends AbstractEnergyConsumptionEvent {
public final class IdlingEnergyConsumptionEvent extends AbstractEnergyConsumptionEvent {
public static final String EVENT_TYPE = "idlingEnergyConsumption";

public IdlingEnergyConsumptionEvent(double time, Id<Vehicle> vehicleId, Id<Link> linkId, double energy, double endCharge) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import com.google.common.primitives.Doubles;

public class LTHDriveEnergyConsumption implements DriveEnergyConsumption {
public final class LTHDriveEnergyConsumption implements DriveEnergyConsumption {

private final PiecewiseBicubicSplineInterpolatingFunction function;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.matsim.api.core.v01.network.Link;
import org.matsim.vehicles.Vehicle;

public class MissingEnergyEvent extends Event {
public final class MissingEnergyEvent extends Event {
public static final String EVENT_TYPE = "missing_energy";
public static final String ATTRIBUTE_VEHICLE = "vehicle";
public static final String ATTRIBUTE_ENERGY = "energy";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.google.common.base.Preconditions;
import com.google.inject.Inject;

public class OhdeSlaskiAuxEnergyConsumption implements AuxEnergyConsumption {
public final class OhdeSlaskiAuxEnergyConsumption implements AuxEnergyConsumption {
private static final double a = 1.3;// [W]
private static final double b = -63.4;// [W]
private static final double c = 1748.1;// [W]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* https://www.researchgate.net/profile/Michal-Maciejewski-3/publication/312393169_Statistical_analysis_of_real-world_urban_driving_cycles_for_modelling_energy_consumption_of_electric_vehicles/links/59b7a17faca2722453a5fc7f/Statistical-analysis-of-real-world-urban-driving-cycles-for-modelling-energy-consumption-of-electric-vehicles.pdf
* TODO Add (dis-)charging efficiency relative to SOC, temperature, etc...
*/
public class OhdeSlaskiDriveEnergyConsumption implements DriveEnergyConsumption {
public final class OhdeSlaskiDriveEnergyConsumption implements DriveEnergyConsumption {
private static final double g = 9.81; // g [m/s^2]
private static final double m = 1525; // vehicle mass [kg]
private static final double m_s = m + 100; // vehicle mass + extra mass [kg]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.matsim.contrib.ev.fleet.ElectricVehicle;
import org.matsim.vehicles.VehicleType;

public class VehicleTypeSpecificDriveEnergyConsumptionFactory implements DriveEnergyConsumption.Factory {
public final class VehicleTypeSpecificDriveEnergyConsumptionFactory implements DriveEnergyConsumption.Factory {

private final Map<Id<VehicleType>, DriveEnergyConsumption.Factory> consumptionMap = new HashMap<>();

Expand Down

0 comments on commit 6ced39d

Please sign in to comment.