Questions tagged [optaplanner]

1

votes
1

answer
131

Views

Optaplanner shadow variable corruption check mechanism

I'm having score corruption exception with construction heuristic phase with FULL_ASSERT: java.lang.IllegalStateException: VariableListener corruption: the entity (Task{6661-30})'s shadow variable (Task.plannedDateTime)'s corrupted value (null) changed to uncorrupted value (2018-06-04T07:00) after a...
Sachin Verma
1

votes
0

answer
39

Views

score corruption with shadow variables

In my Optaplanner Model i have a WorkOrder (PlanningEntity) that i plan on different locations(PlanningVariable). Several WorkOrders are connected. It is not a pure chain. Several WorkOrders can connect to one and one can connect to several following. The orders have a start and stop variable and I...
Wolkenfels
1

votes
1

answer
143

Views

Optaplanner Execution Server employee rostering example: Time slot is not being filled in the best solution

I was following ad litteram the following tutorial on employee rostering from RedHat and everything is fine until the end when I am retrieving the best solution to the problem. The solution does not include the values for the endTime and startTime in the timeslot tag. Sample result below: : : speaki...
geo
1

votes
1

answer
70

Views

First Fit Decreasing Algorithm on CVRP in Optaplanner

I am using the FFD Algorithm in Optaplanner as a construction heuristic for my CVRP problem. I thought I understood the FFD-Alg from bin picking, but I don't understand the logic behind it when applied in OP on CVRP. So my thought was, it focuses on the demands (Sort cities in decreasing order, sta...
herrmonsieur
1

votes
0

answer
40

Views

Unexpected behavior from Drools' collectSet and difficulty effecting undo moves

What I actually wanted to do is to have a Drools rule as so: rule 'globalRequiredPredecessorAfterMe' when $rpAll: Set(size>1) from accumulate ( Customer(vehicle!= null, vehicle.vehicleTyp != VehicleTyp.DUMMY, $rpAfterMe: requiredPredecessorsAfterMe); collectSet($rpAfterMe) ) then scoreHolder.addMed...
Philip Harding
1

votes
0

answer
46

Views

Optaplanner 7.12.0 Vehicle routing CVRP shadow variable not updated

With optaplanner 7.12.0 multithreaded solving got a few fixes for working with chained variables. For me multithreaded solving works well with version 7.9.0 for vehicle routing but when upgrading to 7.12.0 I get the following error: The entity (Visit-25) has a variable (previousStandstill) with valu...
Jeroen.W
1

votes
1

answer
66

Views

Optaplanner config with moveThreadCount=1 not same as no moveThreadCount

I have upgraded to Optaplanner 7.12, and in hunting for a potential issue with multithreading mixed with VariableListeners, noticed an oddity in reproducible execution: if the configuration file has 1, the execution is NOT the same as when the moveThreadCount line is absent, which seems unexpected t...
timeNtrack
0

votes
0

answer
5

Views

Optaplanner Shadow variable

I am using 'chained through time pattern' for our optimization project where following the example TaskAssignment but for the shadow variable instead of using Integer start time, using TimeGrain (from meeting example). The Domain Problem is: for each Schedule (within a day) one or more Service (Pla...
kathik
1

votes
1

answer
33

Views

Nearby selection with subChainChangeMoveSelector or subChainSwapMoveSelector

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: prevReq NearbyMeterTransportChain However, the same config for any of the two chained movemenents returns a...
Raul
1

votes
1

answer
32

Views

No entityClass, and because there are multiple in the entityClassSet, it can not be deduced automatically

I'm trying to implement a solution with multiple entity classes, and it fails with the following error message: no entityClass (null) configured and because there are multiple in the entityClassSet ([class com.myspace.wla.JobA, class com.myspace.wla.JobB]), it can not be deduced automatically This i...
eliezerb
1

votes
1

answer
19

Views

Solution Partitioning failing

I have implemented a solution partitioner for my planning problem. But when I now run the optimizer, it returns the following error: Exception in thread 'main' java.lang.IllegalStateException: The partition child thread with partIndex (1) has thrown an exception. Relayed here in the parent thread. a...
wasperen
1

votes
0

answer
52

Views

OptaPlanner throwing IllegalStateException on CompositeMove created by CartesianProductMoveSelector

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...
JohnnyAW
1

votes
1

answer
33

Views

Why appear this error when run optaplanner .jar?

I have an optaplanner aplication, and i want to export it as a runnable jar, but when i run the jar, appear a error and I don't know why. I'm using the Vehicle Routing example, and i want to use the GUI interface without eclipse. Exception in thread 'main' java.lang.NullPointerException at org.kie.i...
Mini Nihat
1

votes
1

answer
25

Views

What if I set the constraint weight to zero in OptaPlanner?

If I set the weight of a constraint to zero, does that mean that this constraint does not take effect? look like below: @ConstraintWeight('Speaker conflict') private HardMediumSoftScore speakerConflict = HardMediumSoftScore.ofHard(0);
Kent Zhang
1

votes
2

answer
1.4k

Views

A good “hello world” program for drools planner

I am trying to implement Drools Planner for allocating timetables. At the moment, my proficiency in Java and JavaBean design pattern is low and I need something simple to practice on. Is there an AI optimization problem that known to be solved very well with 'X' algorithm the data model lends itself...
Jesvin Jose
1

votes
1

answer
162

Views

Drools Planner set minimalAcceptedSelection at runtime

I can set the minimalAcceptedSelection editing SampleDroolsConfig.xml ... 1000 7 200 Is it possibile to set this parameter at runtime?
Tommaso Taruffi
1

votes
2

answer
777

Views

Implementing Custom metaheuristic in OptaPlanner

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 integrat...
Rajeev Singh
1

votes
1

answer
1.3k

Views

OptaPlanner VRP edge weights need to use actual GPS data instead of Euclidean distance

I am new to optaplanner. I am trying to modify the vrp example [whether the CVRP or the VRPTW] to supports more than just the Euclidean distance as the edge weight between nodes. I am using the newest release optaplanner 6.0.0.CR5. Any advice on how I can change the edge weights between nodes will b...
user2832455
1

votes
1

answer
921

Views

OptaPlanner vehicle routing and relations between customer visits

I am using OptaPlanner to optimize a vehicle routing problem very similar to the provided example. I am faced with the following challenge and will appreciate some ideas. Some of the visits to customers have relations to other visits, for example: A visit must start at the same time with another vis...
Shatz
1

votes
1

answer
127

Views

Trying to add a value to the score in Optaplanner (using Drools)

I have a very simple (possible too simple) rule I want to enforce in Drools to allow a value to be added to my Hard score in Optaplanner. Basically, in my solution class TaskAssignment, I am generating a taskConflictList, which adds to a taskConflictLog each time there is a conflict: public List cal...
user3441584
1

votes
1

answer
279

Views

Integrate jBPM with Optaplanner

how can I integrate jBPM with OptaPlanner. I have solved a problem using OptaPlanner, where there are a number of requests which are optimally assigned to particular employees, based on certain constraints. Now I want to create a dispatcher in jBPM, where certain employees(actors) can solve certain...
user3586442
1

votes
1

answer
306

Views

Task scheduling gets stuck

I am currently trying to get my grip on OptaPlanner as it seems to be the perfect solution for a problem I have. Basically the Project job scheduling example is what I am going for, but as I only know my Java basics this is way to complex to start with. So I am trying to start with a very limited ex...
kraftner
1

votes
1

answer
188

Views

What's the purpose of “hardLevel” in “addHardConstraintMatch”

For my problem, I'm using the BendableScoreHolder cause I need 3 hard constraints and 2 soft constraints. I'm wondering what's the purpose of the second parameter 'hardlevel' of the method addHardConstraintMatch though.
Jack Kass
1

votes
1

answer
171

Views

Drools rule for processes belonging to services (inverse optaplanner tutorial assignment)

I would like to implement a simple (?) rule in drools connected with the cloudbalancing example in optaplanner: Instead of having processes of a particular service on different computers ('2.1.8: Beyond this tutorial'), there should be a cost involved for a first process of any given service on any...
Philip Harding
1

votes
2

answer
1.6k

Views

Nurse rostering implementation with very “hard” hard constraints

I'm a Informatics Nurse trying to develop a machine-assisted process for nursing rostering. Half the staff works elsewhere so our main constraint is their schedule in the other institution where they work. We get this information the 20th. of every month so we have 10 days to plan ahead. The hard co...
ceciliasp
1

votes
1

answer
328

Views

How to know Optaplanner solving has ended?

I have initialized and started a solver, I have registered a listener for the best solution change but I would also like to know when solving has ended. I have configured the logger and it correctly shows when the solver has stopped solving (when the termination condition is met or when it is termin...
1

votes
1

answer
116

Views

Not able to get the score logs for all possible solution using optaplanner in grails app

Not able to get the score related logs in a problem solved by optaplanner getting the score logs in Java Application. Also made changes in Config.groovy for logging but still not able to get the logs. Here is the code snippet for config file. // log4j configuration log4j = { // Example of changing t...
Harish Garg
1

votes
1

answer
325

Views

How can I easily customize the XML input files of the Curriculum Course example of OptaPlanner?

I'm quite a beginner for not only OptaPlanner but also Java, which I started to learn two weeks ago. I am considering to start with modifying an example accompanied with the source program to make a scheduler for my present project. Target The XML input file of the “Curriculum Course” example o...
takugo
1

votes
1

answer
588

Views

Multiple Planning Variables in OptaPlanner

I have solved a problem using optaPlanner using incremental java in which one planning variable and one planning Entity, But now in our project there is requirement in which many planning variables like we have to find the best Room(capacity, isAC etc etc) , Car(totalSeatsLeft , isAC etc etc ) and w...
1

votes
1

answer
491

Views

OptaPlanner Scalability

I need to decrease the latency of obtaining results from Optaplanner. Is it possible to run an job across multiple instances (and/or machines) in a cluster? I couldn't seem to find any information/attempt on achieving this.
Sheepy
1

votes
1

answer
274

Views

Optaplanner - timewindow is not fulfilled

I am using OptaPlanner for a business related optimization. Concerning 6.1.0. Final version: When I modify the optimization problem, so that a vehicle has to arrive inside of a time window (with earliest possible and latest possible arrival time, punished by hardscores when too early or too late) an...
len
1

votes
2

answer
200

Views

optaplanner custom implementation of ScoreHolder

My main question is, if I can use in OptaPlanner custom implementation of ScoreHolder in drools score calculation? And if yes, how I can do it, as the scoreHolder object is injected implicitly to global variable? Below you can find details, why I would like to use custom implementation of ScoreHolde...
Rem
1

votes
1

answer
445

Views

How to use OptaPlanner ValueRange from planning entity?

I'm attempting to limit the planning variables that can be associated with a particular entity. In the OptaPlanner manual in section 4.3.4.2.2, an example is shown, but it isn't clear how the list of variables should be generated. What should the list contain? Are these planning variables themsel...
user2952819
1

votes
2

answer
282

Views

Eclipse can't find class DefaultSolver of OptaPlanner and throws ClassNotFoundException

Hi I'm building a program using optaplanner, and everything seems to be imported and working fine, but when I run and debug the code, I get a ClassNotFoundException 'org.optaplanner.core.impl.solver.DefaultSolver'. I believe I've imported all the jar files correctly, but just to be sure, what jar fi...
Patrick
1

votes
1

answer
476

Views

optaplanner immovable planning entities

I'm working with Optaplanner to solve a problem similar to the patient admission scheduling example. I'm facing two problems. Firstly when one of the planning entities (similar to bedDesignation of the example) is positioned by someone (not optaplanner), this planning entity is scored like the other...
Bibou3618
1

votes
1

answer
150

Views

Optaplanner: how efficiently enforce one-to-many constraint?

I prepare example with easyScoreCalculatorClass and incrementalScoreCalculatorClass (Java score counting) to solve problem with power consumers and power suppliers (phones and chargers, where voltage must be equal and consumer required ampere must be not greater then supplier provided ampere, and ea...
gavenkoa
1

votes
2

answer
71

Views

Optaplanner :Error when displaying constraints scores

I use OtpaPlanner to optimize a vehicles routing extension. I have got hard and soft scores but when i try to display constraints Match details i got this message: Exception in thread 'AWT-EventQueue-0' java.lang.NullPointerException at org.optaplanner.core.impl.score.director.drools.DroolsScor...
Latifa
1

votes
1

answer
176

Views

Looking for ways to make Drools / Optaplanner faster

I am working on a capstone project using Optaplanner 6.2.0.CR4 and Drools to incrementally score the solution. The problem is pretty similar to Optaplanner's Nurse Rostering example, with a little added complexity. I was wondering if there were any common pitfalls that can slow down Drools tha...
Patrick
1

votes
1

answer
664

Views

Vehicle Routing with Optaplanner and Google Maps

I currently building an application that similar to Optaplanner Vehicle Routing Examples. The difference is: it is web based and the visualization & distance calculation will be using GWT Google Maps V3 direction service. Just like the optaplanner blog post at here: Visualizing Vehicle Routing with...
the.wizard
1

votes
1

answer
144

Views

OptaPlanner HashCode violation: the hashCode of tabu (entity) probably changed since it was inserted in the tabu Map or Set

I'm getting a HashCode violation. The solver works for about a minute, and then results in this error. The entity is Vehicle. Using default constructor. No custom moves. All scoring rules are drools. Any ideas are appreciated. Exception in thread 'main' java.lang.IllegalStateException: HashCode...
user2952819

View additional questions