optaplanner

Custom move implementation

若如初见. 提交于 2019-12-11 12:49:57
问题 When creating a custom move the methods “getPlanningEntities” , “getPlanningValues” need to be implemented. In these methods the entities and values need to be added in a list and returned. In my custom move I am changing multiple planning entity instances that belong to different planning entity classes. When turning on FULL_ASSERT everything is ok there are no errors. I just wanted to know should the order of the planning entities that are returned by “getPlanningEntities” be the same as

How to solve many to many relationship using OptaPlanner?

旧城冷巷雨未停 提交于 2019-12-11 08:22:55
问题 How do we solve many to many problems using OptaPlanner 6? For example, in cloud balancing example, what do we need to do if we want to put each process on multiple computers/threads? More like parallel execution of the process. 回答1: The same way as you solve it if you want to store a many2many relationship in a relational database: create an extra Class. For example: In cloud balancing, create a class Assignment that has a many2one relationship to Process and a many2one relationship to

How to map a planningId annotation in collections for rebase method?

两盒软妹~` 提交于 2019-12-11 03:21:38
问题 For multithread solving, I tried to map a planningId on the identificatication field or getter method. In our model, some planning entity has the collections of other planning entities or problem facts. public class User { @PlanningId private String username; ... } public class CloudComputer { @PlanningId private Long id; //Considering all conditions, possible user changes all over time //It works well in single thrad, but it does not work in multithread. private List<User> subtitueUsers =

Optaplanner 7.13.0 cant be executed from a jar file

假如想象 提交于 2019-12-11 03:19:29
问题 I am building a project using optaplanner jar to solve a vehicle routing problem. After building the jar, I am unable to invoke the main class and this is the error I get: 513 [main] INFO org.kie.api.internal.utils.ServiceDiscoveryImpl - Loading kie.conf from jar:file:/Users/meena/Documents/SourceCode/Comma_code/comma_code/sources/target/comma-1.0-SNAPSHOT-jar-with-dependencies.jar!/META-INF/kie.conf in classloader sun.misc.Launcher$AppClassLoader@55f96302 515 [main] INFO org.kie.api.internal

Returning multiple solutions to a scheduling issue with optaplanner

独自空忆成欢 提交于 2019-12-11 03:01:33
问题 strong text Hello Optaplanner experts, I am pretty new to OptaPlanner, so please pardon any naive or basic questions. I am using it to schedule a: set of jobs, A, B and C, which can be completed by 5 resources, say Will, Jane, Roy, Tom, Jeff. Each of these jobs can be done by any of the 5 resources. There will be some algorithm to calculate who is the best fit based on soft constraints, but I am not there yet. For now, I just need to come up with multiple solutions, say 1. Will - A, Roy - B

Does optaplanner out of box support VRP with multiple trips and no depot

杀马特。学长 韩版系。学妹 提交于 2019-12-11 01:19:50
问题 I am working on a VRP with the following characteristics: The vehicle can only pick up 1 customer at one time The vehicle picks up a customer at a location and drops off the customer at the destination After dropping off the customer the vehicle goes on to pick up another customer There is no depot that vehicle needs to go to in between the trips . The vehicle makes as many trips as it can in a day to pickup/drop-off customers At the end of day, the vehicle goes back to its designated parking

Convert Calendar date to LocalDate

不问归期 提交于 2019-12-10 18:45:49
问题 I decided to upgrade from 5.5 to Optaplanner 7.5 Nurseroster but have run into a number of silly issues. Below is one. The routine I previously used is below. Now however the new version requires LocalDate. I have an MySql database back-end and the users select the roster schedule planner via a calendar. Any suggestions will be appreciated. int shiftDateSize = maxDayIndex + 1; List<ShiftDate> shiftDateList = new ArrayList<ShiftDate>(shiftDateSize); //shiftDateMap = new HashMap<String,

Implementing Custom metaheuristic in OptaPlanner

帅比萌擦擦* 提交于 2019-12-10 10:54:07
问题 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

Is there a way to save all feasible scores found?

試著忘記壹切 提交于 2019-12-09 03:43:26
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 feasible solutions using the bestSolutionChanged event listener. The problem with this, is that once it finds

Optaplanner multithreading attempt yielded “missing rebase” on custom move

北慕城南 提交于 2019-12-08 10:00:23
问题 I updated from 7.5 to 7.9 Optaplanner libraries for use with a variant of the nurserostering code, and used the release notes (for example, some method names changed) to successfully rebuild and re-run. Then, I added the "moveThreadCount" xml line (for multithreading) to my solver config xml. <moveThreadCount>AUTO</moveThreadCount> Running then immediately threw an error: Caused by: java.lang.UnsupportedOperationException: The custom move class (class westgranite.staffrostering.solver.move