Comments (15)
Hello, could you please provide a bit more detail. If one does not know maven, the starting point presumably is
- downloading the newest release zip ([matsim.org/downloads], 0.10.1?),
- unzip that,
- double-click on the jar, which should start the matsim gui.
- From there, it should be possible to run one of the example scenarios that were also in the zipfile.
- Then one has to figure out how to look at results; in general, we recommend the commercial software VIA which is free up to 500 agents and usually free for student projects (ask the maintainer).
Only after these steps have been successfully taken does it make sense to consider one's own scenario. This is, however, not an easy exercise; it also depends on one's training. Converting an osm network (using the matsim plugin in josm) should be relatively straightforward. Generating a handful of vehicles that drive around on that network should also be relatively straighforward. Beyond that, it is no longer straightforward.
So, please, provide more detail.
from matsim-code-examples.
Thankyou for your reply.
I have gone through all of these steps but whenever i run an example on gui it gives me different errors for different examples. one of the example showed following error.
10 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
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:73)
at org.matsim.core.controler.Controler.run(Controler.java:189)
at org.matsim.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
The simulation did not run properly. Error/Exit code: 1
but all of them are giving errors. I also added files to check on VIA but it does not run me a proper simulation like when time is running slowly it shows only the network but when i select the the time to +150 it just blips some lights on the network for one time in one clock cycle.
I converted my own OSM data that i built to matsim layer and then converted it to shape file because i wanted to use my own network in VIA but in VIA that shape file gave only dotted paths and not the proper street and road network. maybe i have done something wrong.
I also searched a lot about the files ( network, plans, config, events etc... ) , actually i do not know how to build these files for ones own scenario.
I cloned a matsim project from jithub to eclipse and followed all the steps and it gave a huge number of files which was very confusing.
I wanted to know how to build all the required matsim files for my own scenario.
I hope i have provided all the detail.
from matsim-code-examples.
You have three options to solve this issue:
-
In your scenario runner class (assuming you have an "Config" object) you can add one of these lines:
config.controler().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists);
config.controler().setOverwriteFileSetting(OverwriteFileSetting.overwriteExistingFiles);
-
Manually delete the output directory.
-
Changing the parameter manually in your "config.xml" file under:
<module name="controler" >
<!-- Possible values: failIfDirectoryExists, overwriteExistingFiles, deleteDirectoryIfExists -->
<param name="overwriteFiles" value="failIfDirectoryExists" />
</module>
from matsim-code-examples.
MATsim is able to route agents within-day . This allows you to change the agents' behavior while en-route.
As a starting point, see the relevant book chapters about the topic. There are also some code examples in this repository to start with.
from matsim-code-examples.
Can someone help me with above case. It will be highly appreciated.
from matsim-code-examples.
can you provide a full log file where the error is shown? the above error message is not enough to figure out what's going wrong.
from matsim-code-examples.
Berlin.docx
i am attaching this file because when i click on the output it open a folder which has a log file but has not these errors. the errors which occured are in the berlin file.
from matsim-code-examples.
Here is the relevant part of the log:
Error injecting constructor, java.lang.RuntimeException: The output directory ./output/berlin already exists and is not empty! Please either delete or empty the directory or configure the services via setOverwriteFileSetting() or the "overwriteFiles" parameter of the "services" config group.
This is also the reason why you could not find the error message in the log file: MATSim stoped before writing anything in the directory, because by default, it is configured not to change anything in an existing directory.
When you get errors from com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist
, it is usually necessary to scroll down to see what actually was the problem. This is actually the case for a lot of exceptions ("errors"): exceptions can be thrown when intercepting other exceptions, and then usually report their cause as well, lower in the log. For this reason:
- always try to look at all errors messages until the end of the log file, to see if you find one message that might put you on track for finding the problem
- if you need help understanding the messages, always join the full log file. The first line(s) of the error message are often no enough to pin down a problem.
from matsim-code-examples.
Thankyou very much for your reply. Can you kindly guide me step by step how can I correct this?
from matsim-code-examples.
Thanks @tduberne now its working as i deleted the output directory and started MATSim so it created a new output file which was working fine in the visualizer (VIA).
Now i wanted to know that i am working on a very small area (OSM) in which i have done editions like made nodes as bus stops and streets but it is a small area. I imported that area in JOSM and wanted to convert that into a MATSim network. Actually can you kindly guide me step by step how can i create the necessary files (network file, Vehicles file, Events file, etc) for MATSim for my area.
This is my first time on this type of project so my questions are at basic level.
Thanks.
from matsim-code-examples.
Thanks @golanbendor i just deleted the output directory and then everything was smooth.
Can you kindly guide me step by step how can i create the necessary files (network file, Vehicles file, Events file, etc) for MATSim for my area which is a small OSM area which i have edited in JOSM for routing.
from matsim-code-examples.
Hi @nnuk .
-
Regarding the network, there is a chapter in the MATSim book about JOSM (here is the link ) you can use it as a starting point for converting your network to MATSim's specifications.
-
Creating a real population/vehicles is a more cumbersome process. You can use the following RunPOnePersonPopulationGenerator class as a starting point for creating a pseudo-demand and the RunMobsimWithMultipleModeVehiclesExample class for creating different vehicle types.
-
Events are created during the simulation processes. Thus there is no need to create them (unless you want to add your own custom events).
from matsim-code-examples.
Thankyou very much @golanbendor. I will follow all these steps and if there is any problem i will ask later.
from matsim-code-examples.
Hi,
I had a query that as I am working on a small map and I want that the cars should run on the paths with defined speed and should return their GPS coordinates after every 30 seconds so that if i wanted to change the path of the car midway. Is it possible with MATSim or is there other software for it?
Thanks.
from matsim-code-examples.
Hi,
Can anyone help me with above query it will be highly appreciated.
Thanks.
from matsim-code-examples.
Related Issues (20)
- Effect of car ownership , having drivers license or car availability
- Use case of income attribute HOT 2
- Visualize the output files in MATSim 15.0 HOT 1
- How to get the real-time vehicle's location data๏ผ
- MATSim over AWS/Azure HOT 2
- VolumesAnalyzer for count the vehicles leave links HOT 1
- plans file HOT 1
- Issue with the GUI HOT 1
- switch from one drt mode to another one during the same trip HOT 4
- Error while running code in MATSim HOT 4
- Trouble with the simulation
- Help with Obtaining Real Origin-Destination Data HOT 4
- 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
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.