optaplanner

Optaplanner 7.9.0 and Adding Multithreading: same planningId exception

社会主义新天地 提交于 2019-12-08 09:54:43
问题 I've had an optaplanner project working for a while now that is allocating jobs to a list of workers using various scoring properties all written in java. Happy with the way it was working I decided to update from 7.7.0 to 7.9.0 and turn on the new multithreading option and see if it works any faster. However, I now get the following error: Exception in thread "Thread-8" java.lang.IllegalStateException: The move thread with moveThreadIndex (0) has thrown an exception. Relayed here in the

The entity was never added to this scoreDirector exception during custom cloning

旧街凉风 提交于 2019-12-08 06:33:59
问题 I'm trying to implement custom cloning in my solution, i followed the instructions as in the documentation, and i encountered a roadblock in the form of this exception : The entity was never added to this ScoreDirector. Maybe that specific instance is not in the return values of the PlanningSolution's entity members . I know that this is not true because before the custom cloning, this exception wasn't thrown. My planningClone method is setup like this : @Override public Solution

Retrieve drools working memory from Optaplanner solution

北城以北 提交于 2019-12-08 06:24:04
问题 When drl file used while solving constraints one could use insertLogical() which insert facts in drools working memory only and may not be retracted till completion of solution(LHS stay true forever for that insertLogical() ). When we get solution from Optaplanner's solver.solve() , we receive our own solution classes option like NurseRoster, CloudBalance. But how could I retrieve facts which stayed in Drools working memory till my solution stayed so I can see what caused solution? I'm

optashift-employee-rostering build fails on openshift

陌路散爱 提交于 2019-12-08 05:57:38
问题 Trying to build the optashift-employee-rostering project I followed the instructions in the readme file to build the app from this repo, but it fails every time. When I try it locally on my Windows 10 with Docker and the "oc.exe" tool, it simply hangs and the oc fails to open even the openshift local console (the one on localhost). I've created an account on openshift (Starter: US East (Virginia) For individual learning and experimenting.) When I do it in openshift online, it fails the build

Nearby selection with subChainChangeMoveSelector or subChainSwapMoveSelector

喜夏-厌秋 提交于 2019-12-08 05:08:20
问题 Is there any way to enable nearby selection in Optaplanner for the subChainChangeMoveSelector or subChainSwapMoveSelector? I have successfully enabled it for the tail move selector as follows: <tailChainSwapMoveSelector> <entitySelector id="tcsm1"/> <valueSelector> <variableName>prevReq</variableName> <nearbySelection> <originEntitySelector mimicSelectorRef="tcsm1"/> <nearbyDistanceMeterClass>NearbyMeterTransportChain</nearbyDistanceMeterClass> </nearbySelection> </valueSelector> <

The entity was never added to this scoreDirector exception during custom cloning

跟風遠走 提交于 2019-12-08 04:54:29
I'm trying to implement custom cloning in my solution, i followed the instructions as in the documentation, and i encountered a roadblock in the form of this exception : The entity was never added to this ScoreDirector. Maybe that specific instance is not in the return values of the PlanningSolution's entity members . I know that this is not true because before the custom cloning, this exception wasn't thrown. My planningClone method is setup like this : @Override public Solution planningClone() { Solution clonedSolution = new Solution(); clonedSolution.id = id; clonedSolution.code = code;

Solving with multiple initial solutions in parallel

半腔热情 提交于 2019-12-08 00:49:25
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 Not out-of-the-box, but it's trivial too add (and I have done so in the past). Just start n threads, using their own Solver. At the end, take the solution of the

Nearby selection with subChainChangeMoveSelector or subChainSwapMoveSelector

◇◆丶佛笑我妖孽 提交于 2019-12-06 22:04:27
Is there any way to enable nearby selection in Optaplanner for the subChainChangeMoveSelector or subChainSwapMoveSelector? I have successfully enabled it for the tail move selector as follows: <tailChainSwapMoveSelector> <entitySelector id="tcsm1"/> <valueSelector> <variableName>prevReq</variableName> <nearbySelection> <originEntitySelector mimicSelectorRef="tcsm1"/> <nearbyDistanceMeterClass>NearbyMeterTransportChain</nearbyDistanceMeterClass> </nearbySelection> </valueSelector> </tailChainSwapMoveSelector> However, the same config for any of the two chained movemenents returns an XStream

Implementing Custom metaheuristic in OptaPlanner

自闭症网瘾萝莉.ら 提交于 2019-12-06 13:18:27
As of now Opta Planner planner provides support for: Tabu Search. Simulated Annealing. However if i need to implement any other algorithm like Genetic Algorithm with Opta Planner then where and how could it could be used. I have got the code of genetic algorithm, however i don't know how to integrate it with Opta planner. I found few places where it may be possible. Inside custom Score class. Inside custom Move class. Inside custom MoveFactory class. In the XML configuration file. Kindly guide where i need to do the modification. Thanks Actually, a student (Sam Van Malderen) already forked

OptaPlanner throwing IllegalStateException on CompositeMove created by CartesianProductMoveSelector

北战南征 提交于 2019-12-06 08:10:53
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.core.impl.domain.variable.inverserelation.SingletonInverseVariableListener.afterVariableChanged