简体   繁体   English

Minizinc:具有共享索引的部分搜索策略

[英]Minizinc: partial search strategy with sharing indexes

Given 3 vectors variables of the same length (let's say A, B, and C), is there a way in Minizinc to apply a search strategy on one of them(let's say B), and at each variable of B instantiated, the search goes to the variables in the same position in A and C?给定 3 个相同长度的向量变量(假设 A、B 和 C),Minizinc 中是否有一种方法可以对其中一个(假设 B)应用搜索策略,并且在实例化的 B 的每个变量上,搜索转到 A 和 C 中相同位置的变量?

Eg: A =[a1,a2,a3], B=[b1,b2,b3], C=[c1,c2,c3]例如: A =[a1,a2,a3], B=[b1,b2,b3], C=[c1,c2,c3]

I want a search like this:我想要这样的搜索:

  1. search on B with some criteria (eg: first fail, to be sure that we're not going in order)使用某些条件搜索 B(例如:首先失败,以确保我们没有按顺序进行)
  2. find the next variable to assign (b2)找到下一个要赋值的变量 (b2)
  3. assign values to a2 and c2 (same position/same index of b2)为 a2 和 c2 赋值(b2 的相同位置/相同索引)
  4. continue the search on B etc...继续搜索 B 等...

Complex search heuristics are generally not supported in MiniZinc in general. MiniZinc 通常不支持复杂的搜索启发式算法。 However, your description of the search might be close to priority search: a search mechanism published for the Chuffed solver.但是,您对搜索的描述可能接近于优先搜索:为 Chuffed 求解器发布的搜索机制。 You can find a description of priority search in the following workshop paper: https://ozgurakgun.github.io/ModRef2017/files/ModRef2017_PrioritySearchWithMiniZinc.pdf您可以在以下研讨会论文中找到优先搜索的描述: https : //ozgurakgun.github.io/ModRef2017/files/ModRef2017_PrioritySearchWithMiniZinc.pdf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM