pyvroom
pyvroom copied to clipboard
Export the problem as a json file
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.
Topic brought up in https://github.com/VROOM-Project/pyvroom/issues/81#issuecomment-1621357809.
Closing, as this will not be adressed unless feature is implemented upstream first.