Hi Karan, Unfortunately, I don't have the time bandwidth to do peer reviews on code zips in a community question. (I do those for BRMS customers only)
But I think you might be suffering from a score corruption, which could explain what you're seeing. To verify that that's the problem, simply enable <environmentMode>FAST_ASSERT/FULL_ASSERT (more info in docs). On 04-03-14 01:30, moltenice wrote: > Hi Ge0ffrey, thanks for your quick reply. > > Actually I'm quite sure it's my code, I just used brute force to enable > completeness on my small problem. I've attached my problem this time just > using a first fit heuristic. > > If you run my code you will see that the solver hits a 0hard/0soft score > which is valid, but since it searches for better solutions afterwards it > seems to replace the best solution with the last solution it received. > > I think the TimetableSlot objects' Lecturer planning variable is modified > when planner is running and since a new instance isn't made of the objects > they are just replaced by the latest value (and I'm guessing wherever the > best solution is stored its instances are replaced too since they refer to > the same point in memory). I feel I haven't implemented the > Solution/Planning Entities and variables correctly so do take a look at > those. > > I think the best way to understand the problem is to just run the main > method. It should work out of the box as long as libraries are included! > > Thanks a lot and awaiting your reply. > > Karan > > Timetabler.zip > <http://drools.46999.n3.nabble.com/file/n4028475/Timetabler.zip> > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Best-Solution-found-but-latest-solution-does-not-work-tp4028442p4028475.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
