pyvroom icon indicating copy to clipboard operation
pyvroom copied to clipboard

Export the problem as a json file

Open OlofHarrysson opened this issue 2 years ago • 1 comments

Hello, I was wondering if it's possible to define the problem in pyvroom but export the problem as a json (without solving it).

>>> problem_instance = vroom.Input()

>>> problem_instance.add_vehicle([vroom.Vehicle(47, start=0, end=0),
...                               vroom.Vehicle(48, start=2, end=2)])

>>> problem_instance.add_job([vroom.Job(1414, location=0),
...                           vroom.Job(1515, location=1),
...                           vroom.Job(1616, location=2),
...                           vroom.Job(1717, location=3)])

>>> problem_instance.to_json() # Something like this

That would allow me to define multiple problems, serialize them and solve them at a later time.

OlofHarrysson avatar Sep 28 '23 10:09 OlofHarrysson

Topic brought up in https://github.com/VROOM-Project/pyvroom/issues/81#issuecomment-1621357809.

jcoupey avatar Sep 28 '23 10:09 jcoupey

Closing, as this will not be adressed unless feature is implemented upstream first.

jonathf avatar May 18 '24 19:05 jonathf