自适应演化软件是近年来软件工程领域的研究热点,而以体系结构为中心的自适应演化尤其受到重视.针对当前演化中对非功能性约束关注的不足,着重对面向体系结构的自适应演化框架中构件的分派优化问题进行研究.首先详细描述了基于体系结构模型的构件分派问题,并建立能够满足嵌入式软件构造机制中非功能性约束的分派模型,接着证明该分派问题为NP完全问题,最后提出一种启发式分派算法找出近似最优解,实验表明,与贪婪和整线性规划算法相比,该算法具有多目标均衡的优势;而与整线性规划算法相比,虽然不能保证找到最优解,但具有较大的计算时间优势.
The research on self-adaptive evolution software is one of the new focuses in the field of software engineering, and the online evolution that makes software adapt to the changing environment according to the architecture meta information attracts most people's attention. But due to the insufficient consideration in non-function requirements of software evolution, we focus on the optimal component assignment problem in self-adaptive software which is continuously meeting system's constraints based on architecture information during runtime. In this paper, the component assignment based architecture model is firstly described in detail, and a component assignment model is set up for this problem and proved to be NP (non-deterministic polynomial). And then we propose a heuristic algorithm to find a solution for this problem. Finally, the experimental results show that compared with the algorithm of greedy and ILP, the proposed algorithm has many advantages such as multi-object balance and time performance, and compared with ILP alone, the algorithm has better time performance. So it testifies that the heuristic algorithm proposed in this paper is effective for online evolution decision.