0

I am generally new to optaplanner with a few months experience on the tool. The version we are using is 5.5.0 final.

Previously with the following line:

insertLogical(new IntConstraintOccurrence("rule1", ConstraintType.NEGATIVE_HARD, 50, $someViolatingEntity));

I was assuming that I can somehow associate violation penalty with a declared violating entity, and influence Optaplanner to pick a Move related to the Entity in the next Move.

I only happen to realize today that this assumption is wrong. $someViolatingEntity seems to be an identifier for a violation.

So I will like to find out if there is away to achieve the kind of capability in Optaplanner? Based on score calculated, derive or favor a particular Move, so that a better solution can be achieved sooner.

Kymerlion
  • 1
  • 2
  • Version 5.5? **[Upgrade to 6.4 yesterday!](http://www.optaplanner.org/download/upgradeRecipe/)** (just follow that upgrade recipe). – Geoffrey De Smet Aug 10 '16 at 12:16
  • Hi I have been also testing out 6.4 for a separate project, and have tried to complain. I think that is some concept I am not clear about. Score calculation does help to indicate a particular entity is incurring score penalty. But does it help optaplanner to focus on the moves associated with that entity? Is [Probabilistic Selection](http://docs.jboss.org/optaplanner/release/6.4.0.Final/optaplanner-docs/html_single/index.html#probabilisticSelection) the only option? – Kymerlion Aug 11 '16 at 01:49
  • You're looking for Guided Local Search. Although we have probabilistic selection and filtered selection, which allows you to do similar things, a true easy-to-use Guided LS option isn't implemented yet, although much of the plumbing is already there. The ConstraintMatchTotal instance which it can get from the ScoreDirector are key indeed to get that working... – Geoffrey De Smet Aug 11 '16 at 06:45
  • Thanks. I noticed I have quite a few typos in my previous comment. Sorry about that. – Kymerlion Aug 11 '16 at 06:59

1 Answers1

0

IntConstraintOccurrence is a big pain and was replaced years ago, in version 6 by a much better system. Upgrade first.

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120