uoa-ems-research / JEMSS.jl

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

Example not running (Windows) #71

Closed DefectiveUnit closed 1 year ago

DefectiveUnit commented 1 year ago

Hi

Upon installing and trying to run the example, this error appears in the 'loading sim' step

ERROR: LoadError: at row 0, column 0 : ArgumentError("number of rows in dims must be > 0, got 0")

Same error appears for any of the other examples. I've checked and the path to the config seems correct. Any ideas?

samridler commented 1 year ago

Can you check the file contents? I think that error message means a csv file is empty. Possibly the zip files for the city models were not unzipped, which is meant to happen automatically when JEMSS is installed. Try running build JEMSS from the Pkg REPL, this will unzip the files.

DefectiveUnit commented 1 year ago

Thanks for the quick response!

I see the problem. I had to drop binary provider from the dependencies as it won't install on Windows in Julia 1.8, but it is needed for the unzipping. Looks like it hasn't been updated in a while and isn't supported any more.

I'll take a crack tomorrow with Julia 1.6

https://github.com/JuliaPackaging/BinaryProvider.jl/issues/211 https://discourse.julialang.org/t/unable-to-open-libllvm-error-trying-to-create-sysimage-in-1-8-0/86144

DefectiveUnit commented 1 year ago

Problem has been resolved! Steps below in case anyone else is struggling to get it up and running

  1. I've installed Julia 1.6.7 rather than the latest release (as BinaryProvider won't work with latest release)
  2. Installed JEMSS, and implemented this fix to resolve some build issues within BinaryProvider (https://discourse.julialang.org/t/installation-of-some-packages-fail/80413). Note you may need to install Gurobi on your machine separately before installing the JEMSS as well.
  3. The arcs and nodes files within auckland/models/1/travel/roads are empty. Running build JEMSS fills these files

I tried some work arounds as well with a funky version of BinaryProvider and Julia 1.8, but couldn't get the files to build

Awesome package Sam!

samridler commented 1 year ago

Thanks for letting me know that BinaryProvider was the problem, I've now switched to use the ZipFile package instead in JEMSS 1.3.5.

I guess that build JEMSS worked fine on my computer with Julia 1.8 because I also have Julia 1.6 which has BinaryProvider.

DefectiveUnit commented 1 year ago

Have tested on another computer that only has Julia 1.8 with the updated JEMSS version, and it is working out of the box. Great fix :)