optaplanner

Optaplanner shadow variable with more than one source

◇◆丶佛笑我妖孽 提交于 2019-12-23 18:06:36
问题 Optaplanner allows for a shadow variable to have more than one source (sources = {}) but only one variableListsnerClass. In my implementation i have a planning entity with shadow variables that should be able to change by two listsners, but this is not supported it seems or am i wrong? is there a way to have two listeners affect one shadow variable? I have the following planning entities: PlannerActivity, PlannerTask and PlannerTaskResourceAllocation. Any change on a PlannerActivity

Does OptaPlanner support optimizations and constraints on continuous variables?

喜你入骨 提交于 2019-12-23 10:26:14
问题 I'm reading contradictory things in the documentation. On one hand, this passage seems to indicate that continuous planning variables are possible: A planning value range is the set of possible planning values for a planning variable. This set can be a discrete (for example row 1, 2, 3 or 4) or continuous (for example any double between 0.0 and 1.0). On the other hand, when defining a Planning Variable, you must specify a ValueRangeProvider annotation on a field to use for the value set: The

Fresh Eclipse / optaplanner 7.12 examples “new project via Maven” fails

自作多情 提交于 2019-12-23 05:13:46
问题 With a fresh install of Eclipse 4.9.0 (2018-09), and m2e installed in Eclipse, I downloaded Optaplanner release 7.12.0, extracted the zip, and followed the first steps of the documentation instructions toward building the examples ("Open the file examples/sources/pom.xml as a new project, the maven integration will take care of the rest.") via: 1) File / Open Projects from File System... / Show other specialized import wizards / Maven / Existing Maven Projects 2) Selected the optaplanner

Solving with multiple initial solutions in parallel

最后都变了- 提交于 2019-12-23 01:59:04
问题 I just started using Optaplanner. Usually in local search metaheuristics, it is common to start from multiple initial solutions in the search space and try to improve them in parallel. That way we decrease the risk of falling in a local optimum and we choose the final solution with the best score. Is there a similar feature in Optaplanner where I could say, for example, start solving using those 100 initial solutions? Thanks, Antoine 回答1: Not out-of-the-box, but it's trivial too add (and I

Exception Child services have no parent when starting Optaplanner application

旧时模样 提交于 2019-12-22 18:14:14
问题 I have a test program that uses optaplanner. There is no direct use of KIE API's but it looks like they are being invoked behind the scenes. This may be related to the fact that I am using DROOLS for the score calculation. The program works from the IDE or through maven, but I want to create a standalone jar that will not require maven. I used the maven assembly plugin to build a fat jar with all dependencies included to be run standalone. When I run java -jar target/OptaPlannerTest-1.4

OptaPlanner throwing IllegalStateException on CompositeMove created by CartesianProductMoveSelector

大兔子大兔子 提交于 2019-12-22 12:40:24
问题 so basically my problem is, that OptaPlanner is throwing this: java.lang.IllegalStateException: The entity (...) has a variable (previousEntry) with value (...) which has a sourceVariableName variable (nextEntry) with a value (...) which is not null. Verify the consistency of your input problem for that sourceVariableName variable. at org.optaplanner.core.impl.domain.variable.inverserelation.SingletonInverseVariableListener.insert(SingletonInverseVariableListener.java:72) at org.optaplanner

Incremental score calculation bug?

♀尐吖头ヾ 提交于 2019-12-21 06:18:59
问题 I've been dealing with a score corruption error for few days with no apparent reason. The error appears only on FULL_ASSERT mode and it is not related to the constraints defined on the drools file. Following is the error : 014-07-02 14:51:49,037 [SwingWorker-pool-1-thread-4] TRACE Move index (0), score (-4/-2450/-240/-170), accepted (false) for move (EMP4@START => EMP2). java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Score corruption: the workingScore (-3/-1890/-640

OptaPlanner's Drools rules don't fire with Spring Boot's devtools on the classpath so the score is zero

江枫思渺然 提交于 2019-12-21 05:30:09
问题 I got optaplanner working correctly with drools rules. "Suddenly", after some change I did, Optaplanner does not put my facts in the drools kSession anymore. I put some logging, and I see that optaplanner calls the getProblemFacts() method on my Solution, and this method returns a list with size > 0. I wrote a DRL rule to simply count the facts and log these counts (This rule is unit tested, and works well when I put the objects in the ksession myself). I am also convinced that optaplanner

OptaPlanner : ValueSelector can not use ValueRangeType.FROM_PLANNING_ENTITY_PROPERTY

≡放荡痞女 提交于 2019-12-20 06:57:41
问题 I am using MoveSelector configuration in the ConstructionHeuristic Phase. It works fine with configuring filterClass and comparatorClass in EntitySelector. However, in ValueSelector session, I am not able to use "ValueRangeType.FROM_PLANNING_ENTITY_PROPERTY" planning variable. It throws this exception: java.lang.IllegalArgumentException : The valueSelectorConfig (ValueSelectorConfig(row)) with resolvedCacheType (PHASE) and resolvedSelectionOrder (SORTED) needs to be based on a

Solution Cloning happening at steps that produce a “new best score” in a row

半腔热情 提交于 2019-12-20 05:11:25
问题 Something that recently caught my attention was a step being slower than others when a "new best score" is produced. This is definitely the solution cloning that is happening at every step that produces a "new best score". So this is okay if the "new best score" steps are not in a row. If for example we have 50 steps in a row the solution cloning process will be executed 50 times. A smarter way would be to do the cloning process at the end of the sequence(only once). Is this something that