optaplanner

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

本小妞迷上赌 提交于 2019-12-20 05:11:07
问题 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

Using real distances between points in optaplanner

倖福魔咒の 提交于 2019-12-17 19:56:08
问题 Hello I am new to optaplanner. I am trying to use the vrp (tw) example. I'll like to set real distances (route distances) in order to get a real solution. I have real distances between all points in a double NXN matrix (distance(a,b)<>distance(b,a)), so, how can I use the matrix in the .xml (.vrp) input file to solve vrp problem ? Note : my matrix is about from 2X10X10 to 2X100X100. Thanks in advance. opp 回答1: Here is the way I went. There might be much better solutions than this - I have to

Wrong Manifest.mf in IntelliJ IDEA created .jar

大憨熊 提交于 2019-12-13 05:59:12
问题 I'm trying to package a project using OptaPlanner 6.0.1 libraries into a .jar through IntelliJ IDEA's jar artifact but instead of my manifest.mf containing the standard Manifest-Version: 1.0 Main-Class: a.b.c.app the jar uses the one supplied in ecj-3.7.2.jar, one of OptaPlanner's supporting libraries: Manifest-Version: 1.0 Build-Jdk: 1.6.0_26 Built-By: ibrandt Created-By: Apache Maven Archiver-Version: Plexus Archiver Because of this, a "no main manifest attribute, in appname.jar" error

how to keep track of planning variable assignment in optaplanner

江枫思渺然 提交于 2019-12-13 04:27:40
问题 Is there a way to access planning variable's assignment during planning? In my use case, I want to assign a planning variable with certain status only one time only during planning. After that I don't want to use that planning variable. I know that in optaplanner, a planning variable/problem fact can not change, so i can not change its status. Is there a way to get list of planning variable assignment during planning so that in java code or drools file, i can avoid re-assignment if it has

Optaplanner - NullPointerException when creating jar file

好久不见. 提交于 2019-12-13 02:28:02
问题 My program works fine from my IDE (IntelliJ) but for some reason, when I try to create a jar file I get following error when I run the program from a terminal: Exception in thread "main" java.lang.NullPointerException at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildDroolsScoreDirectorFactory(ScoreDirectorFactoryConfig.java:461) org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildScoreDirectorFactory(ScoreDirectorFactoryConfig.java:331) org

OptaPlanner: java.lang.IllegalArgumentException

孤街浪徒 提交于 2019-12-13 01:58:31
问题 currently i am implementing my second project in OptaPlanner. I am retrieving the following error: Exception in thread "main" java.lang.IllegalArgumentException: A planning entity is an instance of a entitySubclass (class com.company.Assignment) that is not configured as a planning entity. If that class (Assignment) (or superclass thereof) is not a entityClass ([class com.company.Car]), check your Solution implementation's annotated methods. If it is, check your solver configuration. My

Task scheduling gets stuck

限于喜欢 提交于 2019-12-13 00:19:23
问题 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 example and work my way up from there: I have tasks with a duration and one defined predecessor. The planning entity is the time each task starts. I have a hard score that punishes tasks starting

How to know Optaplanner solving has ended?

心已入冬 提交于 2019-12-12 22:27:19
问题 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 terminated early). I would like to know when the solver has finished, whichever way it ended. Here's my current code for listening for best solution changes solver.addEventListener(new

OptaPlanner benchmarking without XML inputSolutionFile

青春壹個敷衍的年華 提交于 2019-12-12 22:03:24
问题 I have developed a working solver, which generates the unsolved solution directly from database(without and XML file). Now I am starting to develop it's benchmarker. Since all the example benchmarkers utilizes inputSolutionFile(xml files), I am trying to get the unsolved solution I generated into the PlannerBenchmarkFactory. Am I able to bypass creating the xml inputSolutionFile? If not, how would I serialize the unsolved solution into an acceptable inputSolutionFile? 回答1: One way that should

OptaPlanner vehicle routing and relations between customer visits

被刻印的时光 ゝ 提交于 2019-12-12 20:52:26
问题 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 visit. A visit must start 2 hours after another visit finishes. A visit must be allocated to the same vehicle allocated to another visit. The challenge is: How to allow moves of the visits without