Giter Club home page Giter Club logo

Comments (5)

samridler avatar samridler commented on August 16, 2024

Hi Elias,

I've made an attempt at updating the code, can you try the run.jl script (along with convert_osm_network.jl and graph_tools.jl in the same folder) from this zip file convert_osm_network.zip.
Please let me know if there are errors, if not I'll then use this code to update the package.

from jemss.jl.

elgloli avatar elgloli commented on August 16, 2024

Hey Sam, thanks for the fast reply.

I got this error now:
Dividing arcs ... done.
Checking which nodes (of 140138) are inside border
ERROR: UndefVarError: linearrings not defined

I have another general question..:
I got for hamburg the same data and put it in the same folder structure as the other cities in the data folder. Next step is to create a road file with run.jl and if I don't have my own data for calls, I use the call configuration file. Are there any other steps to take?

I appreciate your help and thank you for your work and the code you provided.

from jemss.jl.

samridler avatar samridler commented on August 16, 2024

Ah, I see I changed a variable name at the last moment causing the linearrings not defined error, here's the fixed script convert_osm_network.zip.

Once you have all the data and files set up like in a data/cities/[city]/models folder then copy one of the sim_config.xml files like in the example/input folder and make sure the <inputPath> and <simFiles> point to your data (though ignore <rNetTravels> as that will be generated). Then try load and run the simulation and if that doesn't work let me know.

from jemss.jl.

elgloli avatar elgloli commented on August 16, 2024

Hey Sam, fyi your script is working perfectly now..

I tried to run the simulation for hamburg, but I think my grid for the population density is not correct.
I got this error:
Loading sim.
ERROR: AssertionError: 1 <= ix && (ix <= grid.nx && (1 <= iy && iy <= grid.ny))
Stacktrace:
[1] locationToGridIndex(map::Map, grid::Grid, location::Location)
@ JEMSS ~/.julia/packages/JEMSS/M2vZd/src/types/grid.jl:27
[2] findNearestNode(map::Map, grid::Grid, nodes::Vector{Node}, location::Location)
@ JEMSS ~/.julia/packages/JEMSS/M2vZd/src/types/grid.jl:51
[3] initCalls!(sim::Simulation, calls::Vector{Call})
@ JEMSS ~/.julia/packages/JEMSS/M2vZd/src/types/call.jl:97
[4] setSimReps!(sim::Simulation, callSets::Vector{Vector{Call}})
@ JEMSS ~/.julia/packages/JEMSS/M2vZd/src/replication.jl:23
[5] initSim(configFilename::String; allowResim::Bool, createBackup::Bool, allowWriteOutput::Bool, doPrint::Bool)
@ JEMSS ~/.julia/packages/JEMSS/M2vZd/src/run_config.jl:201
[6] initSim(configFilename::String)
@ JEMSS ~/.julia/packages/JEMSS/M2vZd/src/run_config.jl:35

How and with which programm (QGIS?) did you create such a grid?

from jemss.jl.

samridler avatar samridler commented on August 16, 2024

Hey Elias,
It could be the population density file or maybe the map.csv file, if the map file you linked before is what you are currently using then it needs to be changed as that was for New York, see here for how to set the contents of the map file.
As for the population density file, I used QGIS to create them, first saving the shapefile with population density information in the WGS84 format then using rasterize functionality to create the raster file.

from jemss.jl.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.