-
Notifications
You must be signed in to change notification settings - Fork 166
Description
The current approach to custom variables lets users define a method that will update the value of the variable based on other variables in the entity. However, it doesn't allow access to information on the solution.
This access is useful, so that static data don't need to be propagated to every entity, making cloning more expensive and overall code more complicated.
The proposed approach is to introduce an optional solution argument to the variable updater which the solver would fill, if the user declares the updater as such.
Therefore instead of:
public Employee updateEmployee() {
....
}
The user could optionally decide to declare the updater as such:
public Employee updateEmployee(EmployeeSchedule schedule) {
....
}
The intention is not to use any of the solution's fields as sources. The user must not modify the data on the solution and if they do, they are on their own with the score corruptions that will ensue.