Skip to content

Commit

Permalink
fixing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed Dec 5, 2023
1 parent c2bc9a4 commit e90b2d7
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import java.util.Optional;
import java.util.stream.Collectors;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.analysis.DefaultPersonAnalysisFilter;
import org.eqasim.core.analysis.DistanceUnit;
import org.eqasim.core.analysis.PersonAnalysisFilter;
Expand All @@ -28,7 +29,7 @@
import org.matsim.facilities.MatsimFacilitiesReader;

public class RunLegAnalysis {
private final static Logger logger = Logger.getLogger(RunLegAnalysis.class);
private final static Logger logger = LogManager.getLogger(RunLegAnalysis.class);

static public void main(String[] args) throws IOException, ConfigurationException {
CommandLine cmd = new CommandLine.Builder(args) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import java.util.Optional;
import java.util.stream.Collectors;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.analysis.DefaultPersonAnalysisFilter;
import org.eqasim.core.analysis.DistanceUnit;
import org.eqasim.core.analysis.PersonAnalysisFilter;
Expand All @@ -30,7 +31,7 @@
import org.matsim.facilities.MatsimFacilitiesReader;

public class RunTripAnalysis {
private final static Logger logger = Logger.getLogger(RunTripAnalysis.class);
private final static Logger logger = LogManager.getLogger(RunTripAnalysis.class);

static public void main(String[] args) throws IOException, ConfigurationException {
CommandLine cmd = new CommandLine.Builder(args) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import org.matsim.facilities.Facility;
import org.matsim.utils.objectattributes.attributable.Attributes;
import org.matsim.utils.objectattributes.attributable.AttributesImpl;
import org.matsim.utils.objectattributes.attributable.AttributesUtils;

import ch.sbb.matsim.routing.pt.raptor.RaptorRoute;
import ch.sbb.matsim.routing.pt.raptor.RaptorRoute.RoutePart;
Expand All @@ -26,7 +28,7 @@ public double calculateHeadway_min(Facility originFacility, Facility destination
double latestDepartureTime = departureTime + afterDepartureOffset;

List<RaptorRoute> routes = raptor.calcRoutes(originFacility, destinationFacilty, earliestDepartureTime,
departureTime, latestDepartureTime, null, new Attributes());
departureTime, latestDepartureTime, null, new AttributesImpl());

int numberOfPtRoutes = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.events.GenericEvent;
import org.matsim.api.core.v01.events.HasPersonId;
import org.matsim.api.core.v01.population.Person;
import org.matsim.core.api.internal.HasPersonId;
import org.matsim.pt.transitSchedule.api.TransitLine;
import org.matsim.pt.transitSchedule.api.TransitRoute;
import org.matsim.pt.transitSchedule.api.TransitStopFacility;
Expand Down
5 changes: 3 additions & 2 deletions core/src/main/java/org/eqasim/core/misc/ParallelProgress.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package org.eqasim.core.misc;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class ParallelProgress {
private final Logger logger = Logger.getLogger(ParallelProgress.class);
private final Logger logger = LogManager.getLogger(ParallelProgress.class);

private final Thread thread;
private final long totalCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import java.util.HashSet;
import java.util.Iterator;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.scenario.cutter.extent.ScenarioExtent;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.population.Activity;
Expand All @@ -16,7 +17,7 @@
import org.matsim.facilities.ActivityFacility;

public class FacilitiesCutter {
private final static Logger log = Logger.getLogger(FacilitiesCutter.class);
private final static Logger log = LogManager.getLogger(FacilitiesCutter.class);

private final ScenarioExtent extent;
private final Collection<Id<ActivityFacility>> usedFacilityIds = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import java.util.Optional;
import java.util.Set;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.scenario.cutter.extent.ScenarioExtent;
import org.eqasim.core.scenario.cutter.extent.ShapeScenarioExtent;
import org.matsim.api.core.v01.Id;
Expand Down Expand Up @@ -36,7 +37,7 @@
import org.matsim.pt.transitSchedule.api.TransitStopFacility;

public class NetworkCutter {
private final static Logger log = Logger.getLogger(NetworkCutter.class);
private final static Logger log = LogManager.getLogger(NetworkCutter.class);

private final ScenarioExtent extent;
private final MinimumNetworkFinder minimumNetworkFinder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import java.util.Set;
import java.util.stream.Collectors;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.scenario.cutter.extent.ScenarioExtent;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.network.Link;
Expand All @@ -25,7 +26,7 @@
import org.matsim.pt.transitSchedule.api.TransitStopFacility;

public class TransitScheduleCutter {
private final static Logger log = Logger.getLogger(TransitScheduleCutter.class);
private final static Logger log = LogManager.getLogger(TransitScheduleCutter.class);

private final ScenarioExtent extent;
private final StopSequenceCrossingPointFinder crossingPointFinder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import java.util.HashSet;
import java.util.Set;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.pt.transitSchedule.api.Departure;
import org.matsim.pt.transitSchedule.api.TransitLine;
import org.matsim.pt.transitSchedule.api.TransitRoute;
Expand All @@ -12,7 +13,7 @@
import org.matsim.vehicles.Vehicles;

public class TransitVehiclesCutter {
private final static Logger log = Logger.getLogger(TransitVehiclesCutter.class);
private final static Logger log = LogManager.getLogger(TransitVehiclesCutter.class);

private final TransitSchedule schedule;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package org.eqasim.core.scenario.preparation;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.api.core.v01.network.Link;
import org.matsim.api.core.v01.network.Network;
import org.matsim.core.utils.geometry.CoordUtils;

public class AdjustLinkLength {
private final Logger logger = Logger.getLogger(AdjustLinkLength.class);
private final Logger logger = LogManager.getLogger(AdjustLinkLength.class);

public void run(Network network) {
int infiniteSpeedCount = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.eqasim.core.scenario.validation;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.api.core.v01.Coord;
import org.matsim.api.core.v01.Scenario;
import org.matsim.api.core.v01.network.Link;
Expand All @@ -15,7 +16,7 @@
import org.matsim.facilities.ActivityFacility;

public class ScenarioValidator {
private final static Logger logger = Logger.getLogger(ScenarioValidator.class);
private final static Logger logger = LogManager.getLogger(ScenarioValidator.class);

public boolean checkSpatialConsistency(Scenario scenario) {
boolean errorsFound = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import java.io.OutputStreamWriter;
import java.nio.file.Files;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.analysis.trips.TripListener;
import org.eqasim.core.components.config.EqasimConfigGroup;
import org.matsim.core.config.groups.ControlerConfigGroup;
Expand All @@ -25,7 +26,7 @@

@Singleton
public class CalibrationOutputListener implements IterationEndsListener, ShutdownListener {
private final Logger logger = Logger.getLogger(CalibrationOutputListener.class);
private final Logger logger = LogManager.getLogger(CalibrationOutputListener.class);

private static final String OUTPUT_FILE_NAME_JSON = "calibration.json";
private static final String OUTPUT_FILE_NAME_HTML = "calibration.html";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.core.config.CommandLine;
import org.matsim.core.config.CommandLine.ConfigurationException;

Expand All @@ -16,7 +17,7 @@
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;

public interface ParameterDefinition {
final static Logger logger = Logger.getLogger(ParameterDefinition.class);
final static Logger logger = LogManager.getLogger(ParameterDefinition.class);

static public void applyCommandLine(String prefix, CommandLine cmd, ParameterDefinition parameterDefinition) {
Map<String, String> values = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import java.util.Set;

import org.apache.commons.lang3.tuple.Pair;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eqasim.core.components.headway.HeadwayCalculator;
import org.eqasim.core.components.headway.HeadwayImputerModule;
import org.eqasim.core.misc.InjectorBuilder;
Expand Down Expand Up @@ -50,7 +51,7 @@
import ch.sbb.matsim.config.SwissRailRaptorConfigGroup;

public class RunBatchPublicTransportRouter {
private final static Logger logger = Logger.getLogger(RunBatchPublicTransportRouter.class);
private final static Logger logger = LogManager.getLogger(RunBatchPublicTransportRouter.class);

static public void main(String[] args) throws ConfigurationException, JsonGenerationException, JsonMappingException,
IOException, InterruptedException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.matsim.core.router.RoutingRequest;
import org.matsim.core.scenario.ScenarioUtils;
import org.matsim.core.utils.timing.TimeInterpretationModule;
import org.matsim.utils.objectattributes.attributable.Attributes;
import org.matsim.utils.objectattributes.attributable.AttributesImpl;

import com.google.inject.Inject;
import com.google.inject.Injector;
Expand Down Expand Up @@ -188,7 +188,7 @@ static private void appendTrip(List<DiscreteModeChoiceTrip> trips, String preced
destinationActivity.setMaximumDuration(3600.0);

DiscreteModeChoiceTrip trip = new DiscreteModeChoiceTrip(originActivity, destinationActivity, "walk",
Collections.emptyList(), 0, trips.size(), trips.size(), new Attributes());
Collections.emptyList(), 0, trips.size(), trips.size(), new AttributesImpl());
trips.add(trip);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ static public void main(String[] args) throws ConfigurationException {
config.addModule(multiModeDrtConfig);

DrtConfigGroup drtConfig = new DrtConfigGroup();
drtConfig.setMode("drt");
drtConfig.setOperationalScheme(OperationalScheme.door2door);
drtConfig.setStopDuration(15.0);
drtConfig.setMaxWaitTime(600.0);
drtConfig.setMaxTravelTimeAlpha(1.5);
drtConfig.setMaxTravelTimeBeta(300.0);
drtConfig.setVehiclesFile(Resources.getResource("corsica_drt/drt_vehicles.xml").toString());
drtConfig.mode = "drt";
drtConfig.operationalScheme = OperationalScheme.door2door;
drtConfig.stopDuration = 15.0;
drtConfig.maxWaitTime = 600.0;
drtConfig.maxTravelTimeAlpha = 1.5;
drtConfig.maxTravelTimeBeta = 300.0;
drtConfig.vehiclesFile = Resources.getResource("corsica_drt/drt_vehicles.xml").toString();

DrtInsertionSearchParams searchParams = new SelectiveInsertionSearchParams();
drtConfig.addDrtInsertionSearchParams(searchParams);

multiModeDrtConfig.addDrtConfig(drtConfig);
multiModeDrtConfig.addParameterSet(drtConfig);
DrtConfigs.adjustMultiModeDrtConfig(multiModeDrtConfig, config.planCalcScore(), config.plansCalcRoute());

// Additional requirements
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</modules>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<matsim.version>14.0</matsim.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<matsim.version>15.0</matsim.version>
</properties>

<distributionManagement>
Expand Down

0 comments on commit e90b2d7

Please sign in to comment.