Skip to content

Commit

Permalink
small finishing touches
Browse files Browse the repository at this point in the history
  • Loading branch information
kainagel committed Jan 21, 2023
1 parent b96e942 commit 9189573
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

<properties>
<!--stable build based on weekly (e.g. 15.0-PR2344), PR-based (e.g. 15.0-2023w01) or official (e.g. 14.0) releases -->
<!-- <matsim.version>15.0-2023w02</matsim.version>-->
<matsim.version>15.0-2023w03</matsim.version>

<matsim.version>15.0-PR2369</matsim.version>
<!-- <matsim.version>15.0-PR2369</matsim.version>-->
<!-- <matsim.version>15.0-SNAPSHOT</matsim.version>-->
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,9 @@ public static void main ( String [] args ) {
config.qsim().setTrafficDynamics( QSimConfigGroup.TrafficDynamics.kinematicWaves );
config.qsim().setSnapshotStyle( QSimConfigGroup.SnapshotStyle.kinematicWaves );

// run only the zeroth iteration so that we do not have to worry about strategies:
// run only the zeroth iteration so that we do not have to worry about replanning strategies:
config.controler().setLastIteration( 0 );

// remove the teleported bike routing:
config.plansCalcRoute().removeTeleportedModeParams( BICYCLE );

// add bike routing as network routing:
config.plansCalcRoute().setNetworkModes( Arrays.asList( TransportMode.car, BICYCLE ) );

Expand Down Expand Up @@ -113,17 +110,15 @@ public static void main ( String [] args ) {

// now put hte mode vehicles into the vehicles data:
final VehiclesFactory vf = VehicleUtils.getFactory();
scenario.getVehicles().addVehicleType( vf.createVehicleType( Id.create(TransportMode.car, VehicleType.class) ).setMaximumVelocity( 100./3.6 ) );
scenario.getVehicles().addVehicleType( vf.createVehicleType( Id.create(BICYCLE, VehicleType.class) ).setNetworkMode( BICYCLE ).setMaximumVelocity(10./3.6 ) );
scenario.getVehicles().addVehicleType( vf.createVehicleType( Id.create(TransportMode.car, VehicleType.class) ).setMaximumVelocity( 100./3.6 ).setPcuEquivalents( 1. ) );
scenario.getVehicles().addVehicleType( vf.createVehicleType( Id.create(BICYCLE, VehicleType.class) ).setNetworkMode( BICYCLE ).setMaximumVelocity(10./3.6 ).setPcuEquivalents( 0.25 ) );

// ---

Controler controler = new Controler( scenario );

controler.addOverridingModule( new OTFVisLiveModule() );
OTFVisConfigGroup otfConfig = ConfigUtils.addOrGetModule( config, OTFVisConfigGroup.class );
otfConfig.setDrawNonMovingItems( true );
otfConfig.setAgentSize( 200 );
ConfigUtils.addOrGetModule( config, OTFVisConfigGroup.class ).setDrawNonMovingItems( true ).setAgentSize( 100 );

controler.addOverridingModule( new AbstractModule(){
// preparation: compute max speed given link speed limit and vehicle maximum speed:
Expand Down

0 comments on commit 9189573

Please sign in to comment.