Как динамически выбирать, какие ограничения следует применять к задаче оптимизации на основе входных данных внешнего инт ⇐ JAVA
Как динамически выбирать, какие ограничения следует применять к задаче оптимизации на основе входных данных внешнего инт
Let's assume that we have a fullstack application that has a page in the frontend side where we can select the constraints that we should apply to a specific problem. The list of those constraints will be sent to the backend side when we run the Timefold Solver for that specific problem.
How can I make sure that the Timefold Solver will apply just the constraints I chose from the frontend side? How can I modify the TimetableConstraintProvider (for example) to achieve the mentioned functionality.
public class TimetableConstraintProvider implements ConstraintProvider { @Override public Constraint[] defineConstraints(ConstraintFactory constraintFactory) { return new Constraint[] { // Hard constraints roomConflict(constraintFactory), teacherConflict(constraintFactory), studentGroupConflict(constraintFactory), // Soft constraints teacherRoomStability(constraintFactory), teacherTimeEfficiency(constraintFactory), studentGroupSubjectVariety(constraintFactory) }; } //implementation of the constraints } I assume that, first, we should have an POST/GET endpoints for the selected constraints. After that what are the next steps? Any help is welcomed. Thank you!
Источник: https://stackoverflow.com/questions/780 ... ptimizatio
Let's assume that we have a fullstack application that has a page in the frontend side where we can select the constraints that we should apply to a specific problem. The list of those constraints will be sent to the backend side when we run the Timefold Solver for that specific problem.
How can I make sure that the Timefold Solver will apply just the constraints I chose from the frontend side? How can I modify the TimetableConstraintProvider (for example) to achieve the mentioned functionality.
public class TimetableConstraintProvider implements ConstraintProvider { @Override public Constraint[] defineConstraints(ConstraintFactory constraintFactory) { return new Constraint[] { // Hard constraints roomConflict(constraintFactory), teacherConflict(constraintFactory), studentGroupConflict(constraintFactory), // Soft constraints teacherRoomStability(constraintFactory), teacherTimeEfficiency(constraintFactory), studentGroupSubjectVariety(constraintFactory) }; } //implementation of the constraints } I assume that, first, we should have an POST/GET endpoints for the selected constraints. After that what are the next steps? Any help is welcomed. Thank you!
Источник: https://stackoverflow.com/questions/780 ... ptimizatio
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Аналогично задаче размена монеты, но с повторениями «монет» и другой целью оптимизации.
Anonymous » » в форуме Python - 0 Ответы
- 49 Просмотры
-
Последнее сообщение Anonymous
-