Giter Site home page Giter Site logo

Comments (7)

jcoupey avatar jcoupey commented on July 18, 2024

For 1: if you want to store an optimization run, you have to keep both input and output in a single file. You can indeed use this comment (except as you noticed replacing output with solution), then you have a single file that you can upload to the frontend to display both input and solution, without generating a new solving request.

For 2: if you want to provide the task ordering in input, then you should indeed use plan mode. If you want to plot that, then you're back at 1, you just need to append the result to the solution key and upload. For plain loading, it does not really matter if you're doing the solving from inside the frontend or outside.

from vroom-frontend.

Guillo667 avatar Guillo667 commented on July 18, 2024

For 1: I use 01_intentar_salida.json I don't know what is missing because when I load to the frontend the file doesn't change.

For 2: I use 01_steps.json I manage to get the steps. Is there a way to force taking a specific street or pass to certain point that isn't a job or a start, end?

Other thing is that I change the config.yml file to get acces to the plan mode. The "options":{"c":true} in the json file doesn't work I have this in the yml file

cliArgs:
geometry: false # retrieve geometry (-g)
planmode: true # run vroom in plan mode (-c) if set to true
threads: 4 # number of threads to use (-t)
explore: 5 # exploration level to use (0..5) (-x)
limit: '2mb' # max request size
logdir: '/..' # the path for the logs relative to ./src
logsize: '100M' # max log file size for rotation
maxlocations: 2000 # max number of jobs/shipments locations
maxvehicles: 100 # max number of vehicles
override: true # allow cli options override (-c, -g, -t and -x)
path: '' # VROOM path (if not in $PATH)
port: 3000 # expressjs port
router: 'osrm' # routing backend (osrm, libosrm or ors)
timeout: 300000 # milli-seconds
baseurl: '/' #base url for api

01_intentar_salida.json

{
"vehicles": [
{
"id": 47,
"start": [-78.507064, -0.220673],
"end": [-78.507064, -0.220673]
}
],
"jobs": [
{"id":1001,"location":[-78.512056, -0.220656]},
{"id":1002,"location":[-78.513083, -0.2204802]},
{"id":1003,"location":[-78.509149, -0.218778]},
{"id":1004,"location":[-78.509802, -0.219078]},
{"id":1005,"location":[-78.509699, -0.219141]},
],
"solution":{}
}

01_steps.json

{
"vehicles": [
{
"id": 47,
"start": [-78.507064, -0.220673],
"end": [-78.507064, -0.220673],
"steps":[{"type":"start"},{"type":"job","id":1001},{"type":"job","id":1002},{"type":"job","id":1003},{"type": "end"}]
}
],
"jobs": [
{"id":1001,"location":[-78.512056, -0.220656]},
{"id":1002,"location":[-78.513083, -0.2204802]},
{"id":1003,"location":[-78.509149, -0.218778]},
{"id":1004,"location":[-78.509802, -0.219078]},
{"id":1005,"location":[-78.509699, -0.219141]}
]
}

Sorry for the text I couldn't load the files and is the first time using github.How did you put the arrow of unroll here.
#39 (comment)

By the way thanks for the answer.

from vroom-frontend.

jcoupey avatar jcoupey commented on July 18, 2024

In your example, the value for the solution key is empty so no solution can be loaded. You have to fill this with the actual solution you get when solving. Again see example provided in the comment from #39.

You can inspect the solution that the frontend receives using your browser dev tools (spot solving request in "network" and check the response) and/or log it by adjusting the frontend code.

from vroom-frontend.

Guillo667 avatar Guillo667 commented on July 18, 2024

In the example I was trying to get the solution in the file not loading the (empty) solution.

Ok I'm going to try the dev tools.

from vroom-frontend.

Guillo667 avatar Guillo667 commented on July 18, 2024

Hi again, thanks the dev tools worked. There I could find the output.

The plot also worked and as said I used the "solution" key instead of the "output" key.

The last inconvenient tha I got is that "options":{"c":true} isn't working. In the frontend files I didn't find any part that looks for the "options" key. Any idea of what is happening? (the override in config yml of the vroom is set to true)

from vroom-frontend.

jcoupey avatar jcoupey commented on July 18, 2024

Yes, "options":{"c":true} is meant to be interpreted by vroom-express. The frontend code has been written way before the plan mode was a thing so it is not handled at all. If you want to use plan mode, I'd suggest you do this outside the frontend, then plot the result afterward. If you have an input.json file describing a problem with vehicles steps:

  1. Solve in plan mode (use the command-line vroom -c -g -i input.json -o solution.json or send the input with "options":{"c":true} directly to vroom-express, e.g. using curl)
  2. Stitch input and output together (the content of solution.json should be added as the value of the solution key in input.json)
  3. Upload to the frontend

from vroom-frontend.

Guillo667 avatar Guillo667 commented on July 18, 2024

Thanks for the answers.

from vroom-frontend.

Related Issues (20)

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.