reinterpretcat / vrp

A Vehicle Routing Problem solver
https://reinterpretcat.github.io/vrp/
Apache License 2.0
331 stars 68 forks source link

wasm geo-json #85

Closed tumbleDryCode closed 11 months ago

tumbleDryCode commented 1 year ago

is there no way to return geo-json solution when using wasm? https://reinterpretcat.github.io/vrp/examples/interop/javascript.html i've tried looking over configuration etc. but find nothing.

reinterpretcat commented 1 year ago

no, this was not implemented

tumbleDryCode commented 1 year ago

i am not sure if this is of any help, and have not tested it, but you might be able to send command line arguments as an alternative. https://www.secondstate.io/articles/wasi-access-system-resources/ see the (Arguments and environment variables) section. Also: https://stackoverflow.com/questions/67498446/how-to-pass-command-line-arguments-to-c-code-with-webassembly-and-js I also used php as an alternative to run exec with command line arguments, file saving etc. Ultimately, since the application/UI/frontend is web hosted server based, and the increase in users would more than likely make server side CPU usage unviable, i am now using java/javafx to run the hosted web based front end and communicate with the local executables.

reinterpretcat commented 11 months ago

a new version (1.22.0) should support this when a specific option is set in the config. See https://reinterpretcat.github.io/vrp/getting-started/solver.html#geojson for more details