vrp
vrp copied to clipboard
Adjusted python-example to work with pydayntic 2 and fixed problem dataclass to expect a list of options
Fixes: #153
This pull request primarily cleans up the Python interop type definition files by removing all calls to __pydantic_model__.update_forward_refs() and fixes the structure of the objectives field in the Problem class.
Codebase cleanup and simplification:
- Removed all calls to
__pydantic_model__.update_forward_refs()fromconfig_types.pyandpragmatic_types.py, to comply with pydantic 2 and above
Type definition update:
- Changed the type of the
objectivesfield in theProblemclass fromOptional[List[List[Objective]]]toOptional[List[Objective]], fixing the data structure for objectives to work with the vrp_cli.solve_pragmatic method.