optaplanner

Integrate Optaplanner in Jira plugin

那年仲夏 提交于 2020-01-06 08:06:08
问题 I'm trying to integrate optaplanner into my jira plugin. I first want to get optaplanner running, using the following solverConfig.xml <?xml version="1.0" encoding="UTF-8"?> <solver> <solutionClass>com.mycompany.planner.domain.VersionPlanning</solutionClass> <entityClass>com.mycompany.planner.domain.PlanningIssue</entityClass> <scoreDirectorFactory> <scoreDrl>planner/solver/scoreRules.drl</scoreDrl> </scoreDirectorFactory> <termination> <secondsSpentLimit>290</secondsSpentLimit> </termination

Optaplanner: Iterate over list variable in drools rule file

守給你的承諾、 提交于 2020-01-06 04:49:26
问题 I am solving a problem similar to employee rostering. I have an additional constraint. The employees have a "type" value assigned to them. It's a hard constraint that atleast 1 employee of each "type" be there everyday. I have modelled it as follows: rule "All employee types must be covered" when $type: Constants.EmployeeType() from Constants.EmployeeType.values() not Shift(employeeId != null, $employee: getEmployee(), $employee.getType() == $type.getValue()) then scoreHolder

Implementing a SolutionIO Interface for Benchmarking

一世执手 提交于 2020-01-06 03:06:15
问题 I'm trying to implement a benchmark configuration in my project, and whatever I do, I seem to encounter some sort of error. After a few reads from the Documentation I discovered that I need to implement a SolutionIO interface to read the input and make it into a solution. This is my configuration without the solver: <benchmarkDirectory>local/data/nurserostering/folder</benchmarkDirectory> <inheritedSolverBenchmark> <problemBenchmarks> ----> <problemIOClass>org.optaplanner.examples

Implementing a SolutionIO Interface for Benchmarking

走远了吗. 提交于 2020-01-06 03:06:11
问题 I'm trying to implement a benchmark configuration in my project, and whatever I do, I seem to encounter some sort of error. After a few reads from the Documentation I discovered that I need to implement a SolutionIO interface to read the input and make it into a solution. This is my configuration without the solver: <benchmarkDirectory>local/data/nurserostering/folder</benchmarkDirectory> <inheritedSolverBenchmark> <problemBenchmarks> ----> <problemIOClass>org.optaplanner.examples

OptaPlanner: Make planning entities chained and nullable

隐身守侯 提交于 2020-01-05 03:56:07
问题 Dear OptaPlanner community For a specific use case of the OptaPlanner framework, I would like to use the chained data structure, as it is used in the Vehicle Routing example. The problem in our case is that there are a lot of customers, and not all of them can be served in a specific planning cycle. For that reason, I thought using nullable planning variables could be useful, so not all tasks need to be assigned, while still having valid chains of Suppliers. My questions is, how could I solve

Optaplanner: extending the vrp example to tackle multi trip case

天大地大妈咪最大 提交于 2020-01-04 05:26:17
问题 At my company we are currently using optaplanner to solve a vehicle routing problem with great results, we built a web app to manage vehicles, clientes, locations, depots and to show a graphic representation of the solution (including showing the locations in a map). We wrapped the solver in a spring java app with a rest interface to receive request and solve the problem. We are using Google maps to get distance-time data. Now we need to implement multirip.... To tackle the multitrip part I

Is there a way to save all feasible scores found?

喜夏-厌秋 提交于 2020-01-03 02:27:06
问题 I'm building a student schedule generator and I need a way of producing more than one solution. Is there some way to save off feasible scores or scores of Xhard/Ysoft? I need to be able to output more than one potential schedule, that way the student will have a choice for one schedule over the other if for whatever reason they don't want the "best" schedule (maybe they don't like one of the professors, maybe they don't want an 8am class, whatever) My original idea was to save off all

Optaplanner - availability of Vehicles

爱⌒轻易说出口 提交于 2020-01-02 10:27:08
问题 I am working on a VRPTW problem where vehicles have availablity constraints. This means that they might not be available the entire period of a day - basically a time windows for vehicles. Is there a way to build this in optaplanner? Thank you and Brgds, Paul 回答1: This following should work: add 2 fields (start and end) on (TimeWindowed)Vehicle in ArrivalTimeUpdatingVariableListener use at least the vehicle's start time before it leaves a depot add a hard constraint that the vehicle should be

Exhaustive Search in OptaPlanner does not work on very simple example

旧巷老猫 提交于 2020-01-01 18:59:09
问题 We are trying to create a simple example to test the capabilities of OptaPlanner. In the following we show what we came up with. The problem with our example is that when we are selecting an exhaustive search algorithm for solving the problem, OptaPlanner terminates quickly with the wrong answer, which is always zero, even if zero is not a possible solution available from the ValueRangeProvider. Furthermore the PlanningVariable is not set during solving, as opposed to when local search is

VariableListener corruption

依然范特西╮ 提交于 2019-12-31 03:59:03
问题 I was playing around with the custom shadow variables and custom variable listeners. I found that the "Exam timetabling" example uses custom shadow variables to update "Following exams" when the "Leading Exam" changes. So what i did to assert asking in this question was true Custom VariableListener updating more than one shadow variables i added a second shadow variable in the Following Exam class which references the variable "period" , and then in the variable listener of the LeadingExam