Reputation: 73
I've red the optaplanner documentation and @PlanningPin usage is very simple. My PlanningEntity is:
@PlanningEntity()
public class CrewGroupAssignment extends AbstractPersistable {
I've used PlanningPin inside PlanningEntity like this:
@PlanningPin
private Boolean pinned = true;
public Boolean getPinned() {
return pinned;
}
public void setPinned(Boolean pinned) {
this.pinned = pinned;
}
If this.pinned is false there is no problem, algorithm works perfectly, however, when it is true (PlanningVariable inside this class set with a value, it is not empty) it gives error:
[FilteringEntitySelector] WARN - Bailing out of neverEnding selector (Filtering(FromSolutionEntitySelector(CrewGroupAssignment))) to avoid infinite loop.
If PlanningVariable inside this class not set with a value, then it doesn't work also. Why it gives this error for this reason?
Thanks!
Upvotes: 0
Views: 366
Reputation: 27312
We've seen this before. It's because all your entities are pinned. There's a jira to improve OptaPlanner's behavior: it should simply end solving immediatly when starting from a dataset with no movable entities (either they are are none or the are all immovable (for example because they are pinned)).
Upvotes: 1