Как динамически выбирать, какие ограничения следует применять к задаче оптимизации на основе входных данных внешнего интJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Как динамически выбирать, какие ограничения следует применять к задаче оптимизации на основе входных данных внешнего инт

Сообщение Anonymous »


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
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»