Comments (6)
Hi,
I just took the time to document a bit my minimal experimentation (create a simple scenario with 10 empty plans and run it) and put it on GitHub: https://github.com/tduberne/matsim-python-experiments/blob/master/simple-run.ipynb
I am pretty sure there will be corner cases where it fails, but it seems to work extremely well for what I envision as the main use of Python for MATSim (data preparation or analysis), with virtually no boilerplate.
Closing this issue, as
- the question in the title is clearly answered
- a viable alternative seems to exist
from matsim-code-examples.
Thanks for the accolades. Re python API: We have discussed this multiple times, but someone would need to write it. Please let us know if you want to undertake that; we would happily give you a corresponding project within matsim-org and help if you get stuck somewhere. All the best ...
from matsim-code-examples.
I think what Kai mentioned was not a lack of skills, but rather interest/capacity: we ourselves do not need the feature, and do not have capacity to develop it for others, but would be very happy to provide feedback if someone did start this independently.
That being said, I did consider using JPype myself in teaching, to avoid overwhelming students with yet another language (we use Python for data preparation and analysis). I did not have the time to experiment with it for this term, but as far as I understand, it should allow you to use any class from your Java classpath from Python (almost) as if they were Python classes, allowing you to prepare data, start a simulation, and analyze the results with one single Python script, with all MATSim data structures at your disposal. Maybe that is enough for your usecase?
In any case, if you experiment with anything, I would be very happy to hear back from you!
from matsim-code-examples.
@kainagel Wow, I wrote Python extension for C++ with Boost.Python before and it indeed gained more than 10 times speedup for Python codes. I don't know what skills your teams need to write Python APIs for Java codes.
from matsim-code-examples.
@tduberne That's good, thank you for your suggestion. MATSim is a good simulator for traffic flow. And I am considering using it in my research. I will use Python to write my algorithm models. And I will do some research on libraries(including JPype) that can successfully and easily connect Python and Java. Thank you.
from matsim-code-examples.
@tduberne thank you for your example code.
from matsim-code-examples.
Related Issues (20)
- 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
- 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
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.