Can I pin only one planning variable but not all?

Skip to first unread message

Kent Zhang

Jan 31, 2023, 8:06:18 AMJan 31
to OptaPlanner development
Hello, teams,

There are more than one planning variables in the planning entity, I want to pin only one of them, but not all. Is there any way to impletement this case? In my opinon when I set the field that with @PlanningPin anotation to true, all the planning variables in this planning entity will be pin. Is it correct?

thank you a lot.
best regard!

Lukáš Petrovický

Feb 1, 2023, 7:12:28 AMFeb 1
Hey there,

as far as I know, you can only pin the entire entity, incl. all of its variables.
If you need more granularity, you could possibly implement your own selection filter, but that may bring issues of its own.

You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit


Lukáš Petrovický

OptaPlanner Project Lead

My work week is Monday to Thursday.
No need to respond outside of your working hours.

Kent Zhang

Feb 1, 2023, 3:31:28 PMFeb 1
to OptaPlanner development
Thank you ! Lukáš.

Yes, I pin one of the planning variable by implementing the PinningFilter interface now.
Reply all
Reply to author
0 new messages