LocalSearchOperator* RoutingModel::GetNeighborhoodOperators

129 views
Skip to first unread message

junc...@gmail.com

unread,
Sep 1, 2021, 3:00:38 PM9/1/21
to or-tools-discuss
Hello,

In this function, it defined several groups of operators:

EX:  comments before 2nd and 3rd group:

// Second local search loop: LNS-like operators

// Third local search loop: Expensive LNS operators.


What role does each group play in the routing model?


J

junc...@gmail.com

unread,
Sep 8, 2021, 1:50:00 PM9/8/21
to or-tools-discuss
Anyone can help with this question? Thanks!

J

blind.line

unread,
Sep 8, 2021, 5:22:40 PM9/8/21
to or-tools...@googlegroups.com
I for one have no idea what you are asking here, or in your original question. 

Please restate your question and explain your context more completely. I still will probably not answer, but if you state your question more clearly, perhaps somebody else may know the answer. 

James

On Sep 8, 2021, at 10:50, junc...@gmail.com <junc...@gmail.com> wrote:

Anyone can help with this question? Thanks!
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/dfd5fd9c-c2e5-42b4-b764-554e3e9fdbcen%40googlegroups.com.

junc...@gmail.com

unread,
Sep 9, 2021, 2:39:42 PM9/9/21
to or-tools-discuss
Ok,  so in this function:  LocalSearchOperator* RoutingModel::GetNeighborhoodOperators

there is this object defined:      std::vector<LocalSearchOperator*> operator_groups;

And in the construction of  operator_groups,  it seems to consist 3 parts, shown as follows, with 3  .push_back(...):  


...a lot of codes omitted here

operator_groups.push_back(ConcatenateOperators(search_parameters, operators));

// Second local search loop: LNS-like operators.   

...a lot of code omitted here

operator_groups.push_back(ConcatenateOperators(search_parameters, operators));

// Third local search loop: Expensive LNS operators.

...a lot of code omitted here

operator_groups.push_back(ConcatenateOperators(search_parameters, operators));



My question is what is the function of each of the 3 parts of operator_groups?


J




Laurent Perron

unread,
Sep 9, 2021, 2:52:09 PM9/9/21
to or-tools-discuss
Different operators grouped by how expensive they are.
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



junc...@gmail.com

unread,
Sep 9, 2021, 3:41:16 PM9/9/21
to or-tools-discuss
Are they all used in local search for neighbors? 
If so, is each operator called according to its place in the vector? So it starts with the least expensive operator ,and then next operator, until a feasible neighbor is found? 

junc...@gmail.com

unread,
Sep 15, 2021, 2:59:26 PM9/15/21
to or-tools-discuss
Can anyone answer this follow-up question? Let me know if it is unclear, I will try to make it clearer.  Thanks!

Laurent Perron

unread,
Sep 15, 2021, 3:02:42 PM9/15/21
to or-tools-discuss
yes. In the future, the order could be dynamic.

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


junc...@gmail.com

unread,
Sep 15, 2021, 3:39:40 PM9/15/21
to or-tools-discuss
Thanks!

Vincent Furnon

unread,
Sep 16, 2021, 4:05:25 AM9/16/21
to or-tools...@googlegroups.com
We actually recently added dynamic ordering of operators using armed bandits. It's still experimental but initial results are promising.
To activate it use MultiArmedBanditConcatenateOperators instead of ConcatenateOperators. You can also activate it in the routing solver by setting use_multi_armed_bandit_concatenate_operators to true (along with multi_armed_bandit_compound_operator_memory_coefficient and multi_armed_bandit_compound_operator_exploration_coefficient) in RoutingSearchParameters.

junc...@gmail.com

unread,
Sep 16, 2021, 3:12:54 PM9/16/21
to or-tools-discuss
Interesting, will check it out, thanks!
Reply all
Reply to author
Forward
0 new messages