Describe the bug
In the Neighbourhoods section, in section 4, the example defineNeighbourhood function obtains a variable metamodel via:
var timeslotVariable = builder.getSolutionMetaModel().entity(Lesson.class).variable("timeslot", Timeslot.class);
.. and passes it to the constructor of the TimeslotChangeMoveProvider listed in section 3.1.
However, in the actual API, this returns a variable of type VariableMetaModel, rather than the PlanningVariableMetaModel which is required by the TimeslotChangeMoveProvider constructor.
Expected behavior
The example should compile.
Actual behavior
The example fails with a type error.
Additional Information
The correct call appears to be builder.getSolutionMetaModel().genuineEntity(Lesson.class).basicVariable<Timeslot>("timeslot").
Describe the bug
In the Neighbourhoods section, in section 4, the example
defineNeighbourhoodfunction obtains a variable metamodel via:.. and passes it to the constructor of the
TimeslotChangeMoveProviderlisted in section 3.1.However, in the actual API, this returns a variable of type
VariableMetaModel, rather than thePlanningVariableMetaModelwhich is required by theTimeslotChangeMoveProviderconstructor.Expected behavior
The example should compile.
Actual behavior
The example fails with a type error.
Additional Information
The correct call appears to be
builder.getSolutionMetaModel().genuineEntity(Lesson.class).basicVariable<Timeslot>("timeslot").