From 2cb32eb12c4db749119531984a7ca3a652e46761 Mon Sep 17 00:00:00 2001 From: Paul Heinrich Date: Thu, 2 May 2024 16:27:50 +0200 Subject: [PATCH] fix error --- .../mobsim/ownMobsimAgent/RunAddAgentSourceExample.java | 2 +- .../RunOwnMobsimAgentUsingRouterExample.java | 2 +- .../RunOwnMobsimAgentWithPerceptionExample.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgent/RunAddAgentSourceExample.java b/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgent/RunAddAgentSourceExample.java index f3fe04be..019b8e6a 100644 --- a/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgent/RunAddAgentSourceExample.java +++ b/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgent/RunAddAgentSourceExample.java @@ -78,7 +78,7 @@ public void insertAgentsIntoMobsim(){ qsim.insertAgentIntoMobsim( ag ); // insert vehicle: - final Vehicle vehicle = VehicleUtils.getFactory().createVehicle( Id.create( ag.getId(), Vehicle.class ), VehicleUtils.getDefaultVehicleType() ); + final Vehicle vehicle = VehicleUtils.getFactory().createVehicle( Id.create( ag.getId(), Vehicle.class ), VehicleUtils.createDefaultVehicleType() ); QVehicleImpl qVeh = new QVehicleImpl( vehicle ); qsim.addParkedVehicle( qVeh, ag.getCurrentLinkId() ); diff --git a/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentUsingRouter/RunOwnMobsimAgentUsingRouterExample.java b/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentUsingRouter/RunOwnMobsimAgentUsingRouterExample.java index 36187c22..2c7e5563 100644 --- a/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentUsingRouter/RunOwnMobsimAgentUsingRouterExample.java +++ b/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentUsingRouter/RunOwnMobsimAgentUsingRouterExample.java @@ -79,7 +79,7 @@ public void insertAgentsIntoMobsim() { qsim.insertAgentIntoMobsim(ag); // insert vehicle: - final Vehicle vehicle = VehicleUtils.getFactory().createVehicle(Id.create(ag.getId(), Vehicle.class), VehicleUtils.getDefaultVehicleType()); + final Vehicle vehicle = VehicleUtils.getFactory().createVehicle(Id.create(ag.getId(), Vehicle.class), VehicleUtils.createDefaultVehicleType()); final Id linkId4VehicleInsertion = Id.createLinkId(1); // qsim.createAndParkVehicleOnLink(vehicle, linkId4VehicleInsertion); final QVehicle qVeh = new QVehicleImpl( vehicle ) ; diff --git a/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentWithPerception/RunOwnMobsimAgentWithPerceptionExample.java b/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentWithPerception/RunOwnMobsimAgentWithPerceptionExample.java index 0d8c2da4..fa9bbdd4 100644 --- a/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentWithPerception/RunOwnMobsimAgentWithPerceptionExample.java +++ b/src/main/java/org/matsim/codeexamples/mobsim/ownMobsimAgentWithPerception/RunOwnMobsimAgentWithPerceptionExample.java @@ -103,7 +103,7 @@ public void insertAgentsIntoMobsim() { // insert vehicle: final Id vehId = Id.create("myVeh", Vehicle.class); - final VehicleType vehType = VehicleUtils.getDefaultVehicleType(); + final VehicleType vehType = VehicleUtils.createDefaultVehicleType(); final VehiclesFactory vehFactory = VehicleUtils.getFactory(); final Vehicle vehicle = vehFactory.createVehicle(vehId, vehType); // qsim.createAndParkVehicleOnLink(vehicle, startingLinkId);