Comments (16)
In module besides car and PT, do I have to put as "main mode" the drt too?
Just add the module like in the example and that's it!
Is it mandatory to especify the DVRP and OTFVIS module in the config file??
No. DVRP is automatically loaded and you can turn off OTFVIS.
In the plans file, should I also put the drt mode to the activitys of the agents?
No, simply give them "drt" as Leg mode.
I'm using the door2door DRT model, so in the vehiclesdrt.xml file how to choose which links should i
put in the <start_link?>? it can be a random link??
Exactly. You can chose any random link for this.
Here is a sample script to generate a vehicle file:
https://github.com/matsim-org/matsim/blob/master/contribs/av/src/main/java/org/matsim/contrib/av/robotaxi/vehicles/CreateTaxiVehicles.java
from matsim-code-examples.
Thank you so much for yout reply.
I did exactly what you've recomended, but i'm getting the error:
_2018-12-04 19:49:36,935 ERROR ParallelPersonAlgorithmUtils$ExceptionHandler:164 Thread PersonPrepareForSim.0 died with exception while handling events.
org.matsim.core.router.TripRouter$UnknownModeException: unregistered main mode |drt|: does not pertain to [egress_walk, pt, car, transit_walk, access_walk, ride, walk, bike, undefined]
at org.matsim.core.router.TripRouter.calcRoute(TripRouter.java:236).
2018-12-04 19:49:36,938 ERROR MatsimRuntimeModifications:63 Shutdown possibly caused by the following Exception:
java.lang.RuntimeException: Exception while processing persons. Cannot guarantee that all persons have been fully processed.
where do I have to specify the DRT so that it belongs to the simulated modes?
Follow my logfile attached.
logfile.log
Thanks a lot!!!!
from matsim-code-examples.
Are you using a script similar to this:
https://github.com/matsim-org/matsim-maas/blob/master/src/main/java/org/matsim/maas/drt/RunStopbasedDrtExample.java
to run your simulation?
from matsim-code-examples.
Actually i'm using the RunDoor2DoorExample: (https://github.com/matsim-org/matsim-maas/blob/master/src/main/java/org/matsim/maas/drt/RunDoorToDoorDrtExample.java).
But also, as I need to simulate my calibrated scenario, I'm using the DRT contribs along with the Cadyts contribs, so I had to modify the script RunDoor2DoorExample.java to the following below.
Am I doing something that wrong?
from matsim-code-examples.
Hi,
your scenario will not run like that, as in line 56, you immediately run the controler (this starts a simulation run).
` public static void run(Config config, boolean otfvis) {
DrtControlerCreator.createControler(config, otfvis).run();
System.out.println();
....
}
`
instead, do it like this:
` public static void run(Config config, boolean otfvis) {
Controler controler = DrtControlerCreator.createControler(scenario, otfvis);
.... all the other things, cadyts, etc.
controler.run;
.
}
`
from matsim-code-examples.
Hi
Thank you for your answer. It runs properly aftter I did what you've told me to do.
Just 2 more question about it,.
- Do you know why when I put the module:
module name = "dvrp"
param name = "networkMode" value = "drt"
param name = "travelTimeEstimationAlpha" value = "0.05"
I got these error below??
- Error in custom provider, java.lang.NullPointerException
at org.matsim.contrib.drt.run.DrtModule.install(DrtModule.java:50) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.drt.run.DrtModule)
ps: If i change the mode to "car", I don't get these error.
- Also, all my output files (e.g drt_customer_stats_drt.xlx drt_detailed_stats_drt.xls) there's, nothing filled in, are in blank. It's normal?
i'm attaching my config file for more information.
Thanks for beeing so kindly and answer all my questions.
from matsim-code-examples.
the NetworkMode DRT is most likely the problem. Do you have links in your network that have DRT as a mode? What happens if you set it to car?
from matsim-code-examples.
Dear Bischoff,
Part of the problem was on my side.. Now i'm runnig just a scenario using the DRT extension...
In short, I did what you've recommended about the network but even doing thihs i got an error linked to the passenger request that I don't know how to fix it. (follow logfile attached and also my configfile
Besides, do I need to specify anywhere that it's allowed to pree-book the passage?
config.txt
).
logfile.log
logfileWarningsErrors.log
I'm sharing with you all my input files, maybe could help. I really apreciate your help.
https://drive.google.com/open?id=1KGsWpC_1FV0r6FCPVIfSGNbw9SdJALJs
from matsim-code-examples.
DRT switched to a newer Route between Matsim 0.10. and 0.11.
Most likely there is a problem in your setup: What version of MATsim are you using?
from matsim-code-examples.
On a second look: Something looks strange with your plans as well: All car routes start and end at the same link. Most likely, there's a problem with the Coordinate Transformation you're using.
from matsim-code-examples.
I'm using the version 0.11.0-SNAPSHOT. Is that correct?
About the problem with Coordinate, i'm going to fix it and see whats happens.
many thanks, Mr. Bischoff.!!!
from matsim-code-examples.
Yes, using the Snapshot is good.
Once you have settled the coordinate problem, make also sure that you remove the routes from the drt legs in the plans file - they will need to be recomputed.
from matsim-code-examples.
#57 also has problems with coordinate system; maybe same scenario/same problem?
from matsim-code-examples.
So, i removed the routes from the drt legs in the plans,xml file, I fixed de coordinate system..The simulation runs properly withou drt.
However, when using the DRT extension, i'm still having issues.
Maybe something wrong in my config file? (attarched).
i'm using the verison 0.11.0-SNAPSHOT.
newconfigdrt.txt
Follow my error.
jan 17, 2019 11:45:44 PM com.google.inject.internal.MessageProcessor visit
INFORMAÇÕES: An exception was caught and reported. Message: java.lang.NullPointerException
java.lang.NullPointerException
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:986)
at org.matsim.core.controler.AbstractModule.install(AbstractModule.java:128)
at org.matsim.contrib.drt.run.DrtModule.install(DrtModule.java:46)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.util.Modules$CombinedModule.configure(Modules.java:128)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.util.Modules$CombinedModule.configure(Modules.java:128)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:232)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:236)
at org.matsim.core.controler.Injector.createInjector(Injector.java:74)
at org.matsim.core.controler.Controler.run(Controler.java:221)
at org.matsim.run.RunDoorToDoorDrtExample.run(RunDoorToDoorDrtExample.java:49)
at org.matsim.run.RunDoorToDoorDrtExample.main(RunDoorToDoorDrtExample.java:56)
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:
-
Explicit bindings are required and org.matsim.contrib.dvrp.data.Fleet annotated with @org.matsim.contrib.drt.run.Drt() is not explicitly bound.
while locating org.matsim.contrib.dvrp.data.Fleet annotated with @org.matsim.contrib.drt.run.Drt()
for the 3rd parameter of org.matsim.contrib.drt.analysis.DrtAnalysisControlerListener.(DrtAnalysisControlerListener.java:60)
at org.matsim.contrib.drt.analysis.DrtAnalysisModule.install(DrtAnalysisModule.java:38) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.drt.analysis.DrtAnalysisModule) -
Explicit bindings are required and org.matsim.contrib.dvrp.data.Fleet annotated with @org.matsim.contrib.drt.run.Drt() is not explicitly bound.
while locating org.matsim.contrib.dvrp.data.Fleet annotated with @org.matsim.contrib.drt.run.Drt()
for the 4th parameter of org.matsim.contrib.drt.analysis.DynModePassengerStats.(DynModePassengerStats.java:85)
at org.matsim.contrib.drt.analysis.DrtAnalysisModule.install(DrtAnalysisModule.java:36) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.drt.analysis.DrtAnalysisModule) -
Explicit bindings are required and org.matsim.contrib.dvrp.data.Fleet annotated with @org.matsim.contrib.drt.run.Drt() is not explicitly bound.
while locating org.matsim.contrib.dvrp.data.Fleet annotated with @org.matsim.contrib.drt.run.Drt()
for the 1st parameter of org.matsim.contrib.drt.util.stats.DrtVehicleOccupancyProfileWriter.(DrtVehicleOccupancyProfileWriter.java:51)
at org.matsim.contrib.drt.analysis.DrtAnalysisModule.install(DrtAnalysisModule.java:39) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.drt.analysis.DrtAnalysisModule) -
An exception was caught and reported. Message: null
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198)
4 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:232)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:236)
at org.matsim.core.controler.Injector.createInjector(Injector.java:74)
at org.matsim.core.controler.Controler.run(Controler.java:221)
at org.matsim.run.RunDoorToDoorDrtExample.run(RunDoorToDoorDrtExample.java:49)
at org.matsim.run.RunDoorToDoorDrtExample.main(RunDoorToDoorDrtExample.java:56)
Caused by: java.lang.NullPointerException
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:986)
at org.matsim.core.controler.AbstractModule.install(AbstractModule.java:128)
at org.matsim.contrib.drt.run.DrtModule.install(DrtModule.java:46)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at org.matsim.core.controler.AbstractModule$4.install(AbstractModule.java:250)
at org.matsim.core.controler.AbstractModule.configure(AbstractModule.java:118)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.util.Modules$CombinedModule.configure(Modules.java:128)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.util.Modules$CombinedModule.configure(Modules.java:128)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
... 6 more
from matsim-code-examples.
This is not the most recent snapshot version of matsim. Please update the snapshot(s).
from matsim-code-examples.
The beginning of this issue touches on an appropriate drt runner setup as based on the Rundoor2doorDrtExample.java. I'm also trying to figure out how to correctly position the contents of the main
and run
classes in the drt runner.
Could you clarify what needs to happen inside of main
and what happens inside of run
?
I have config settings that I previously set with code inside the main
in my matsim runner (specifically, establishing subpopulations and creating subpopulation specific strategies). If we take Rundoor2doorDrtExample.java as an example, do these java-based modifications to the config which require scenario and population objects need to happen inside main
after the config is loaded and passed into run
, or in run
directly?
from matsim-code-examples.
Related Issues (20)
- Strange long walking behaviour in multimodal scenario! HOT 8
- MATSIM Beginner user HOT 3
- Snapping distance /tolerance to edge from origin/destination location HOT 11
- Route through resticted/private roads HOT 3
- Problem with Car availability attribute
- Score function calculation HOT 3
- The steps to apply DVRP extensions
- Pedestrian modeling and simulation HOT 1
- Integrate traffic volumes after 24 hours
- Creating synthetic population on MATSim HOT 7
- Unreasonably high travel speeds in simulation results HOT 8
- Unexpected Agent Behavior in MATSim Simulation Across Iterations HOT 4
- Any references for why we chose values for maxTravelTimeAlpha and Beta in DRT?
- Any previouos studies about DRT sensitiveity analysis?
- Vulkaneifel scenario keep failing to compile. HOT 5
- How to fix the insuffiencent memory HOT 4
- Estimate the total travel time for all the vehicles HOT 3
- OTFVis in windows
- Different roadPricing for cars and SAVs HOT 2
- Query regarding the 1st Homework Task HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matsim-code-examples.