Equation-based modelling is a powerful approach to tame the complexity of large-scale simulation problems. Equation-based tools automatically translate models into imperative languages. When confronted with nowadays' problems, however, well assessed model translation techniques exhibit scalability issues, that are particularly severe when models contain very large arrays. In fact, such models can be made very compact by enclosing equations into looping constructs, but reflecting the same compactness into the translated imperative code is not trivial. In this paper, we face this issue by concentrating on a key step of equations-to-code translation, the equation/variable matching. We first show that an efficient translation of models with (large) arrays needs awareness of their presence, by defining a figure of merit to measure how much the looping constructs are preserved along the translation. We then show that the said figure of merit allows to define an optimal array-aware matching, and as our main result, that the so stated optimal array-aware matching problem is NP-complete. As an additional result, we propose a heuristic algorithm capable of performing array-aware matching in polynomial time. The proposed algorithm can be proficiently used by model translator developers in the implementation of efficient tools for large-scale system simulation.
翻译:以赤道为基础的建模是一种强大的方法,可以驯服大规模模拟问题的复杂性。以赤道为基础的工具将模型自动翻译成需要的语言。但是,在面对当今的问题时,经过充分评估的模型翻译技术显示出可缩放性的问题,当模型包含非常庞大的阵列时,这些问题就特别严重。事实上,这些模型可以通过将方程式插入环形结构而变得非常紧凑,但将同样的紧凑性反映到被翻译的绝对代码中并不是微不足道的。在本文中,我们面对这一问题的办法是集中关注方程式到代码翻译的关键步骤,即方程式/可变配对。我们首先表明,具有(大)阵列的模型的有效翻译需要了解其存在,方法是确定一个能测量在翻译过程中多少环形结构的优点数字。我们然后表明,上述优点数字可以用来确定最佳的阵列感匹配,而我们的主要结果是,所谓的最优阵列对称的最佳阵列匹配问题是NPP-完成的。作为额外的结果,我们提议一种超自然算法,能够进行阵列阵阵阵阵阵式对阵式对阵式的多式阵列时间进行匹配。拟议的大规模模拟工具,用于大规模模拟模拟工具。