Can I pin only one planning variable but not all?

28 views
Skip to first unread message

Kent Zhang

unread,
Jan 31, 2023, 8:06:18 AM1/31/23
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ý

unread,
Feb 1, 2023, 7:12:28 AM2/1/23
to optapla...@googlegroups.com
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 optaplanner-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/optaplanner-dev/7aae0d70-76af-46b0-989e-7446f94899b2n%40googlegroups.com.


--

Lukáš Petrovický

OptaPlanner Project Lead

lukas.pe...@redhat.com

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

Kent Zhang

unread,
Feb 1, 2023, 3:31:28 PM2/1/23
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
Forward
0 new messages