d610f20 / random-activitygen-py Goto Github PK
View Code? Open in Web Editor NEWmethod for generating realistic scenarios for SUMO's ACTIVITYGEN
License: GNU General Public License v3.0
method for generating realistic scenarios for SUMO's ACTIVITYGEN
License: GNU General Public License v3.0
Use a non-linear function to scale school dots in the render, so that the dots will not cover too much of the image
As found in #9, a user may want or may not want existing streets to be overwritten with population and industry values from noisemap.
resolved. wrong cmd command
Perlin noise takes seed, scale, octaves, lucanarity, and persistence arguments. When testing or visualisation facilities are available they should be investigated as to which settings generate more realistic noisemaps.
This is a FIXME in logging_setup()
e.g. allowing stdout to print in INFO and file to output in DEBUG.
Ref: https://stackoverflow.com/questions/25187083/python-logging-to-multiple-handlers-at-different-log-levels
If image size is very large, dots are too small, and cannot be seen unless zooming in
The render only creates straight roads, meaning that busstops/schools looks like they are placed outside of edges
Running time python randomActivityGen.py -n in/aalborg_metro.net.xml -s in/aalborg_metro.stat.xml -o /out/aalborg_metro.stat.xml --verbose --display
on OSM downloaded map of Aalborg metropolitan area.
Traceback (most recent call last):
File "randomActivityGen.py", line 160, in <module>
main()
File "randomActivityGen.py", line 147, in main
setup_bus_stops(net, stats, int(args["--bus-stop.distance"]), int(args["--bus-stop.k"]))
File "randomActivityGen.py", line 92, in setup_bus_stops
for i, busstop in enumerate(bus_stop_generator(edges, min_distance, min_distance*2, k, seeds=seed_bus_stops)):
File "/home/user/projects/random-activitygen-py/bus.py", line 80, in bus_stop_generator
point = next(filter(
File "/home/user/projects/random-activitygen-py/utility.py", line 187, in firstn
yield next(gen)
File "/home/user/projects/random-activitygen-py/bus.py", line 24, in _road_point_generator
pos = position_on_edge(road, remaining)
File "/home/user/projects/random-activitygen-py/utility.py", line 126, in position_on_edge
for coord1, coord2 in (edge.getShape()[i:i + 2] for i in range(0, int(len(edge.getShape())), 2)):
ValueError: not enough values to unpack (expected 2, got 1)
Maybe allow user to choose to save the image or not.
Save only the latest image overwriting previous iamges, perhaps name it netFile-statsFile
so that it is easy to identify the files used to generate it.
Useful for users when they want to view a previously generated statistics file applied on a network.
Useful for developers when working with the display mechanism.
City gates are not overwritten, schools should be either.
For some reason the single school in Vejen is always placed on the same edge regardless of noise seed.
Instead of putting logs like the following:
logging.debug(f"Using begin_age: {begin_age}, end_age: {end_age} for school(s)")
We should categorise them, so it is easy to read through a long logfile and understand the context of each event:
logging.debug(f"[school] Using begin_age: {begin_age}, end_age: {end_age} for school(s)")
The above is just an idea but seems to work okay.
We currently assume that the user has a half-finished stats file. It case they don't we can probably automatically guestimate the number of inhabitants and number household etc. from the network's size. Other values can just be some default values to generate an average city.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.