0

I have a single entity and a sing planning value. The planning value is nullable. Hard/Medium/Soft score configuration.

All of the constraints are penalties/negative.

I'm trying to figure out if InitializingScoreTrend is applicable to over-constrained planning, and if it is, how I should configure it.

Upon startSolving, the Medium score will be very negative, hard score is 0, soft score is 0. As values are assigned, the medium score will move closer to 0. The soft score will generally move more negative, but can fluctuate. If one value is assigned, and another gets assigned, the soft score can move closer to zero.

Pezetter
  • 2,783
  • 2
  • 22
  • 40

1 Answers1

1

Initializing score trend isn't really related to over-constrained planning. The only thing that matters for the trend is the score.

There is no way for me to answer your question in a specific manner - I do not have insight on your scoring function. That said, if you say that hard score is always zero and therefore only the medium score matters, I'd argue you have to use InitializingScoreTrend.ANY (the default).

However, I question what would such a scoring function be for. Why even have a hard score, if it's always zero? (And if it's sometimes not zero, than hard score is the key factor for the trend, not the medium score.)

Even if I disregard that aspect, I would be very curious about the reasons why you're worried about InitializingScoreTrend at all. Yes, it can bring some performance benefits, but if you're running into such large construction heuristics performance issues, you'd be better off writing a custom initializer anyway.

Lukáš Petrovický
  • 3,945
  • 1
  • 11
  • 20
  • I'm more concerned with understanding score trend. The solution starts as entirely null. We use hard constraints to constrain physical reality. If a hard score exists, then the solution is infeasible. I imagine this works because of the null planning value? Any move that moves the medium score from negative to zero can also inflict a hard penalty. So, in that case, why would that move ever be chosen. That's been my assumption for over a year now. Medium constraint is used only to penalize entities w/ a null planning value. Soft constraints are preferences. – Pezetter Jul 11 '23 at 02:04
  • For the solver, a score is a score - imagine all scores on a single number line, where the position is dictated first by hard, then by medium, then by soft scores. On such a number line, the trend is the direction of movement from better to worse or vice versa. The construction heuristic is different than local search in that its only goal is to initialize the solution - and as it does so, it will pick the least bad score, even if hard constraints are broken. It is local search's job to get rid of the hard constraints, if it can. CH only generates the starting solution. – Lukáš Petrovický Jul 11 '23 at 06:36