uoa-ems-research / JEMSS.jl

Julia package for Emergency Medical Services Simulation
Apache License 2.0
13 stars 4 forks source link

Simulation Example fail #66

Open tsugiharu opened 1 year ago

tsugiharu commented 1 year ago

Hi all, I just fired up Julia for the first time. My goal is to use the JEMSS package for research purposes.

First of all,I could install and run JEMSS.

But,When I ran the Auckland City’s data with the file name unchanged but replaced it with data from a Japanese city, I got the following error.

julia> using JEMSS

julia> include(joinpath(JEMSS.jemssDir, “example/example.jl”))

Loading sim.

ERROR: LoadError: AssertionError: 1 <= ix && (ix <= grid.nx && (1 <= iy && iy <= grid.ny))

Stacktrace:

[1] locationToGridIndex(map::Map, grid::Grid, location::Location)

@ JEMSS C:\Users\natsuhikohara.julia\packages\JEMSS\3snbw\src\types\grid.jl:23

[2] findNearestNode(map::Map, grid::Grid, nodes::Vector{Node}, location::Location)

@ JEMSS C:\Users\natsuhikohara.julia\packages\JEMSS\3snbw\src\types\grid.jl:47

[3] initSim(configFilename::String; allowResim::Bool, createBackup::Bool, allowWriteOutput::Bool, doPrint::Bool)

@ JEMSS C:\Users\natsuhikohara.julia\packages\JEMSS\3snbw\src\run_config.jl:293

[4] initSim(configFilename::String)

@ JEMSS C:\Users\natsuhikohara.julia\packages\JEMSS\3snbw\src\run_config.jl:39

[5] top-level scope

@ C:\Users\natsuhikohara.julia\packages\JEMSS\3snbw\example\example.jl:4

[6] include(fname::String)

@ Base.MainInclude .\client.jl:451

[7] top-level scope

@ REPL[6]:1

in expression starting at C:\Users\natsuhikohara.julia\packages\JEMSS\3snbw\example\example.jl:4

Any help to fix this or to increase my understanding is highly appreciated.

tsugiharu commented 1 year ago

To be honest, I don’t know how to describe the details because I have too little programming knowledge.

The Auckland example could be run.

I think it could be that something is wrong with the configuration for Japanese cities, e.g. that some grid data couldn’t be loaded.

There is a CSV that specifies latitude and longitude, but I am guessing that this is not being entered properly.

https://github.com/uoa-ems-research/JEMSS.jl/blob/master/data/cities/auckland/models/1/maps/map_1.csv

I tried typing the following here and it did not work.
 xMin xMax yMin yMax xScale yScale
 141.142 141.494 42.936 43.219 88.99 111.32

samridler commented 1 year ago

Hi, the extent of the map may need to be increased to include all road network nodes, JEMSS doesn't crop the network to fit the map. Sorry that the assertion error was not clear, this was my first somewhat large software project.

-------- Original message -------- From: tsugiharu @.> Date: 17/8/22 9:30 am (GMT+12:00) To: "uoa-ems-research/JEMSS.jl" @.> Cc: Subscribed @.***> Subject: Re: [uoa-ems-research/JEMSS.jl] Simulation Example fail (Issue #66)

To be honest, I don’t know how to describe the details because I have too little programming knowledge.

The Auckland example could be run.

I think it could be that something is wrong with the configuration for Japanese cities, e.g. that some grid data couldn’t be loaded.

There is a CSV that specifies latitude and longitude, but I am guessing that this is not being entered properly.

https://github.com/uoa-ems-research/JEMSS.jl/blob/master/data/cities/auckland/models/1/maps/map_1.csv

I tried typing the following here and it did not work.
 xMin xMax yMin yMax xScale yScale
 141.142 141.494 42.936 43.219 88.99 111.32

— Reply to this email directly, view it on GitHubhttps://github.com/uoa-ems-research/JEMSS.jl/issues/66#issuecomment-1217185912, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEHVKDPUZBO4E72FBZGKKU3VZQB5VANCNFSM56XJVDBQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

samridler commented 1 year ago

The map also needs to be large enough to include all calls, hospitals, and stations. In your case the assertion error occurs when adding one of the hospitals.

tsugiharu commented 1 year ago

Dear Sam, I appreciate your quick reply and support. I will try again, taking into account the points you have taught me.

If possible, could you please tell me the procedure for applying this simulation package to other cities?

I'm a Japanese FireFighter and graduate student for Informatics at Kyoto University.

If we could add Japanese cities as well as Edmonton, Manhattan, and Utrecht, we believe we could prove the usefulness of the Medical Priority Dispatch System.

In Japan, the introduction of Medical Priority Dispatch System has not progressed due to fear of under-triage, and there is an urgent need to clarify the required accuracy of call triage through simulation.

Currently in Japan, the demand for ambulance has increased and is becoming a major problem, partly due to covid-19.

Your simulation package may help save the Japanese people and medical professionals.

Japan logs record cases of ambulances struggling to find hospitals | The Japan Times.pdf