Timefold Solver is an AI constraint solver for Python to optimize the Vehicle Routing Problem, Employee Rostering, Maintenance Scheduling, Task Assignment, School Timetabling, Cloud Optimization, Conference Scheduling, Job Shop Scheduling, Bin Packing and many more planning problems.
Currently,
timefold.solver
is doing a lot of extra work just to add annotations (see https://github.com/TimefoldAI/timefold-solver-python/blob/main/timefold-solver-python-core/src/main/java/ai/timefold/solver/python/PythonWrapperGenerator.java). Ideally, the entire class can be removed ifjpyinterpreter
allows adding annotations to fields and methods.Python supports annotations via
Annotated
: https://docs.python.org/3/library/typing.html#typing.Annotated , socan be replaced with
(where
PlanningVariable = lambda x: Annotated[x, JavaAnnotation(annotation_class=PlanningVariable.class)]
)