[go: up one dir, main page]

CN105630608A - Method for achieving multiprocessor scheduling through combined cross entropy - Google Patents

Method for achieving multiprocessor scheduling through combined cross entropy Download PDF

Info

Publication number
CN105630608A
CN105630608A CN201511003552.9A CN201511003552A CN105630608A CN 105630608 A CN105630608 A CN 105630608A CN 201511003552 A CN201511003552 A CN 201511003552A CN 105630608 A CN105630608 A CN 105630608A
Authority
CN
China
Prior art keywords
processor
entropy
algorithm
objective function
multiprocessor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201511003552.9A
Other languages
Chinese (zh)
Inventor
边莉
张欣欣
崔保峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Ocean University
Original Assignee
Heilongjiang University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Heilongjiang University of Science and Technology filed Critical Heilongjiang University of Science and Technology
Priority to CN201511003552.9A priority Critical patent/CN105630608A/en
Publication of CN105630608A publication Critical patent/CN105630608A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种利用组合型交叉熵实现多处理机调度的方法,其步骤如下:步骤一:构建多处理机调度问题的数学模型,确立目标函数和约束条件;步骤二:利用组合型交叉熵算法,通过Matlab对多处理机调度问题确立的目标函数和约束条件进行编程、求解,得到目标函数最优解。本发明依据处理机与作业的约束关系,将处理机调度问题表示为使目标函数最小化的线性0-1整数规划问题,采用组合型交叉熵算法对该问题求最优解。本发明采用的组合型交叉熵算法在得出最优解的同时具有迭代次数少、稳定性高、运行时间短等优点,进一步证明了该算法在处理多处理机问题上的有效性和实用性。The invention discloses a method for realizing multi-processor scheduling by using combined cross-entropy. The steps are as follows: Step 1: Construct a mathematical model for multi-processor scheduling problems, and establish objective functions and constraint conditions; Step 2: Use combined cross-entropy The entropy algorithm is used to program and solve the objective function and constraint conditions established by the multiprocessor scheduling problem through Matlab, and obtain the optimal solution of the objective function. According to the constraint relationship between the processor and the job, the invention expresses the scheduling problem of the processor as a linear 0-1 integer programming problem which minimizes the objective function, and adopts a combined cross-entropy algorithm to obtain an optimal solution to the problem. The combined cross-entropy algorithm used in the present invention has the advantages of less iterations, high stability, and short running time while obtaining the optimal solution, which further proves the effectiveness and practicability of the algorithm in dealing with multiprocessor problems .

Description

利用组合型交叉熵实现多处理机调度的方法A Method of Realizing Multiprocessor Scheduling Using Combined Cross Entropy

技术领域technical field

本发明涉及一种多处理机调度方法,具体涉及一种利用组合型交叉熵实现多处理机调度的方法。The invention relates to a multi-processor scheduling method, in particular to a method for realizing multi-processor scheduling by using combined cross-entropy.

背景技术Background technique

当今世界发展的主要趋势是并行化、网络化、智能化,而并行分布式计算是这些发展的主要难题之一,也是当前科学邻域研究的热点问题之一。并行算法的设计、任务的划分、通信的协调和同步、多任务的调度是目前并行分布式计算需要解决的问题,而任务的调度会直接影响计算的效率,所以如何合理高效的进行多任务的调度与分配是目前急需解决的难题。于是多处理机调度问题的应用及理论方面的研究便得到了科学领域研究者极度关注。现实生活中,很多规划任务分配的问题都与多处理机调度问题密切相关。如与我们生活息息相关的工程技术、并行与分布式计算、工农业生产和交通运输等领域的具有组合优化性质的问题便可转化为多处理机调度问题来求解。多处理机调度问题实质上是NP完全问题,传统的线性规划无法解决,当前国内外多采用启发式算法如模拟退火算法、蚁群算法、量子粒子群算法近似求解。但这些算法大都存在收敛速度慢、效率较低等问题。The main trend of development in the world today is parallelization, networking, and intelligence, and parallel distributed computing is one of the main problems in these developments, and it is also one of the hot issues in the current scientific research field. Parallel algorithm design, task division, communication coordination and synchronization, and multi-task scheduling are the problems that need to be solved in parallel distributed computing at present, and task scheduling will directly affect the efficiency of computing, so how to carry out multi-task reasonably and efficiently Scheduling and allocation is a difficult problem that needs to be solved urgently. Therefore, the application and theoretical research of multiprocessor scheduling problem has been paid great attention by researchers in the field of science. In real life, many planning task allocation problems are closely related to multiprocessor scheduling problems. For example, problems with combinatorial optimization properties in the fields of engineering technology, parallel and distributed computing, industrial and agricultural production, and transportation, which are closely related to our lives, can be transformed into multiprocessor scheduling problems to solve. The multiprocessor scheduling problem is essentially an NP-complete problem, which cannot be solved by traditional linear programming. At present, heuristic algorithms such as simulated annealing algorithm, ant colony algorithm, and quantum particle swarm algorithm are used to approximate the solution. However, most of these algorithms have problems such as slow convergence speed and low efficiency.

交叉熵算法(CrossEntropyAlgorithm,CE)是以信息论中的交叉熵理论为基础提出的一种全局随机优化算法,该算法利用参数化的概率密度分布产生随机样本,使每次迭代使用的候选样本都发生变化,因此优化过程不易陷入局部最优解。目前,国内外学者已将该算法应用到解决多种组合优化问题中,并取得了一些进展与成果。Cross-entropy algorithm (CrossEntropyAlgorithm, CE) is a global stochastic optimization algorithm based on the cross-entropy theory in information theory. Therefore, the optimization process is not easy to fall into a local optimal solution. At present, scholars at home and abroad have applied this algorithm to solve a variety of combinatorial optimization problems, and have made some progress and results.

发明内容Contents of the invention

为了快速可靠的解决多处理机调度问题,本发明提供了一种利用组合型交叉熵实现多处理机调度的方法,该方法具有迭代次数少、稳定性高、运行时间短等优点。In order to quickly and reliably solve the problem of multiprocessor scheduling, the invention provides a method for realizing multiprocessor scheduling by using combined cross-entropy. The method has the advantages of less number of iterations, high stability, and short running time.

本发明的目的是通过以下技术方案实现的:The purpose of the present invention is achieved through the following technical solutions:

一种利用组合型交叉熵实现多处理机调度的方法,包括如下步骤:A method for utilizing combined cross-entropy to realize multiprocessor scheduling, comprising the steps of:

步骤一:构建多处理机调度问题的数学模型,确立目标函数和约束条件,其中,多处理机调度问题的数学模型如下:Step 1: Construct the mathematical model of the multiprocessor scheduling problem, and establish the objective function and constraint conditions. Among them, the mathematical model of the multiprocessor scheduling problem is as follows:

zz == maxmax 11 ≤≤ nno ≤≤ cc ΣΣ mm == 11 dd ythe y nno mm tt mm

sthe s .. tt .. ΣΣ nno == 11 cc ythe y nno mm == 11

ynm=0,1(m=1,2,...,d;n=1,2,...,c);y nm =0,1(m=1,2,...,d; n=1,2,...,c);

式中,z表示完成d项作业所需要的时间,即目标函数;ynm=1表示作业Tm在处理机Hn上处理;表示处理机Hn完工的时间;tm表示处理机完成作业Tm的时间;处理机表示作业Tm在一个处理机上完成,即约束条件;In the formula, z represents the time required to complete d tasks, that is, the objective function; y nm =1 means that the task T m is processed on the processor H n ; Indicates the time when processor H n completes work; t m indicates the time when processor completes job T m ; processor Indicates that the job T m is completed on one processor, that is, the constraint condition;

步骤二:利用组合型交叉熵算法,通过Matlab对多处理机调度问题确立的目标函数和约束条件进行编程、求解,得到目标函数最优解。Step 2: Use the combined cross-entropy algorithm to program and solve the objective function and constraint conditions established for the multiprocessor scheduling problem through Matlab, and obtain the optimal solution of the objective function.

本发明具有如下优点:The present invention has the following advantages:

1、本发明依据处理机与作业的约束关系,将处理机调度问题表示为使目标函数最小化的线性0-1整数规划问题,采用组合型交叉熵算法对该问题求最优解,并给出组合型交叉熵算法的具体步骤。采用组合型交叉熵算法对多处理机问题的具体事例进行测试,并通过与模拟退火算法和蚁群算法的测试结果对比分析,得出本发明采用的组合型交叉熵算法在得出最优解的同时具有迭代次数少、稳定性高、运行时间短等优点,进一步证明了该算法在处理多处理机问题上的有效性和实用性。1. The present invention expresses the processor scheduling problem as a linear 0-1 integer programming problem that minimizes the objective function according to the constraint relationship between the processor and the job, adopts the combined cross-entropy algorithm to find the optimal solution to this problem, and gives The specific steps of the combined cross-entropy algorithm are presented. Adopt combined type cross-entropy algorithm to test the concrete example of multiprocessor problem, and by comparing and analyzing with the test result of simulated annealing algorithm and ant colony algorithm, draw the combined type cross-entropy algorithm that the present invention adopts in drawing optimal solution At the same time, it has the advantages of less iterations, high stability, and short running time, which further proves the effectiveness and practicability of the algorithm in dealing with multiprocessor problems.

2、本发明将组合型交叉熵算法应用到多处理机调度问题中,通过对该算法和多处理机调度问题的介绍、建模和仿真,并与其他启发式算法比较分析,得出该算法对解决多处理机调度问题的有效性与准确性。2. The present invention applies the combined cross-entropy algorithm to the multiprocessor scheduling problem, and through the introduction, modeling and simulation of the algorithm and the multiprocessor scheduling problem, and comparative analysis with other heuristic algorithms, the algorithm is obtained Effectiveness and accuracy for solving multiprocessor scheduling problems.

3、本发明对于可转化为类似多处理机问题模型的解决方案提供了一种全新的思路。3. The present invention provides a brand-new idea for a solution that can be transformed into a problem model similar to a multiprocessor.

附图说明Description of drawings

图1为CCE算法的计算过程;Figure 1 is the calculation process of the CCE algorithm;

图2为模拟退火算法的计算过程;Fig. 2 is the calculation process of the simulated annealing algorithm;

图3为蚁群算法的计算过程。Figure 3 shows the calculation process of the ant colony algorithm.

具体实施方式detailed description

下面结合附图对本发明的技术方案作进一步的说明,但并不局限于此,凡是对本发明技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,均应涵盖在本发明的保护范围中。The technical solution of the present invention will be further described below in conjunction with the accompanying drawings, but it is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be covered by the present invention. within the scope of protection.

本发明提供了一种利用组合型交叉熵实现多处理机调度的方法,具体实施步骤如下:The invention provides a method for utilizing combined cross-entropy to realize multiprocessor scheduling, and the specific implementation steps are as follows:

1、多处理机调度问题模型1. Multiprocessor scheduling problem model

多处理机调度问题是指有c台相同的处理机H1,H2,…,Hc,d项相互独立的作业T1,T2,…,Td,作业以互不相关的方式工作,而且任意作业都可以在任何处理机上工作,但是未完成的作业不允许中断。d项相互独立的作业不能拆分为更小的子作业。调度的目的是给出一种合理优越的调度方案,使c台处理机以尽量短的时间完成d项作业。多处理机调度问题的目标是指在满足一定性能指标和约束条件的前提下,将可并行的任务按适当的分配策略确定一种分派和执行顺序,合理分配到各处理机上有序执行,以达到减少总的执行时间的目标。因此多处理机调度问题的数学模型如式(1)所示:The multiprocessor scheduling problem is that there are c identical processors H 1 , H 2 ,..., H c , and d items of independent jobs T 1 , T 2 ,..., T d , and the jobs work in a mutually independent manner , and any job can work on any processor, but unfinished jobs are not allowed to be interrupted. Jobs that are independent of each other in item d cannot be split into smaller sub-jobs. The purpose of scheduling is to provide a reasonable and superior scheduling scheme, so that c processors can complete d tasks in the shortest possible time. The goal of the multiprocessor scheduling problem is to determine a dispatch and execution sequence of parallel tasks according to an appropriate allocation strategy on the premise of satisfying certain performance indicators and constraints, and reasonably allocate them to each processor for orderly execution, so as to Reach the goal of reducing the total execution time. Therefore, the mathematical model of the multiprocessor scheduling problem is shown in formula (1):

zz == maxmax 11 ≤≤ nno ≤≤ cc ΣΣ mm == 11 dd ythe y nno mm tt mm

sthe s .. tt .. ΣΣ nno == 11 cc ythe y nno mm == 11

ynm=0,1(m=1,2,...,d;n=1,2,...,c)(1)。y nm =0,1 (m=1,2,...,d; n=1,2,...,c) (1).

式中z表示完成d项作业所需要的时间;ynm=1表示作业Tm在处理机Hn上处理;表示处理机Hn完工的时间;tm表示处理机完成作业Tm的时间;处理机表示作业Tm在一个处理机上完成,多处理机调度问题的目的即求z的最小值。In the formula, z represents the time required to complete d items of operations; y nm =1 means that the operation T m is processed on the processor H n ; Indicates the time when processor H n completes work; t m indicates the time when processor completes job T m ; processor It means that the job T m is completed on one processor, and the purpose of the multiprocessor scheduling problem is to find the minimum value of z.

根据多处理机调度问题的特点和模型可知多处理机调度问题属于离散优化问题,本发明应用CE对多处理机问题进行优化求解,即通过交叉熵算法求出z的最小值。因为ynm的取值为0或1,所以多处理机调度问题是0-1整数规划问题。According to the characteristics and models of the multiprocessor scheduling problem, it can be seen that the multiprocessor scheduling problem belongs to the discrete optimization problem. The present invention uses CE to optimize and solve the multiprocessor problem, that is, find the minimum value of z through the cross-entropy algorithm. Since the value of y nm is 0 or 1, the multiprocessor scheduling problem is a 0-1 integer programming problem.

2、交叉熵算法2. Cross entropy algorithm

CE算法最早是由Rubinstein教授在信息论的基础上提出的一种全局随机优化算法,近些年来交叉熵算法被应用到故障诊断、预测等大型复杂、优化问题中。该算法的基本特征是在优化过程中根据参数化概率密度分布,使每次迭代使用的候选样本都发生变化。因此CE算法优化过程中的关键是迭代,具体的实现过程可分为两步:The CE algorithm was originally a global stochastic optimization algorithm proposed by Professor Rubinstein on the basis of information theory. In recent years, the cross-entropy algorithm has been applied to large-scale, complex and optimization problems such as fault diagnosis and prediction. The basic feature of the algorithm is that the candidate samples used in each iteration are changed according to the parameterized probability density distribution in the optimization process. Therefore, the key to the CE algorithm optimization process is iteration, and the specific implementation process can be divided into two steps:

(1)由给定的概率密度函数生成一组随机样本;(1) Generate a set of random samples from a given probability density function;

(2)根据产生的随机样本更新概率密度函数,进而为下一步迭代产生更优的样本数据。(2) Update the probability density function according to the generated random samples, and then generate better sample data for the next iteration.

2.1交叉熵算法的基本原理2.1 The basic principle of cross entropy algorithm

针对优化问题:For optimization problems:

SS (( xx ** )) == γγ ** == minmin xx ∈∈ χχ SS (( xx )) -- -- -- (( 22 )) ,,

式中,S是以χ为定义域的实值函数;γ*为S的最小值;x*为最优解;χ为有限集。设概率密度函数族为{f(·;u),u∈U},u为密度函数的参数,对于给定的概率密度函数f(·;v),v∈U,v为给定的概率密度函数的参数,式(2)可转化为:In the formula, S is a real-valued function with χ as the domain of definition; γ * is the minimum value of S; x * is the optimal solution; χ is a finite set. Let the probability density function family be {f(·;u), u∈U}, u is the parameter of the density function, for a given probability density function f(·;v), v∈U, v is the given probability The parameters of the density function, formula (2) can be transformed into:

ll (( γγ )) == PP vv (( SS (( Xx )) ≤≤ γγ )) == ΣΣ xx ∈∈ χχ II {{ SS (( Xx )) ≤≤ γγ }} ff (( xx ;; vv )) == EE. vv II {{ SS (( Xx )) ≤≤ γγ }} -- -- -- (( 33 )) ..

式中,γ表示给定实数;l表示S(X)比给定实数γ小的概率;I{S(X)≤γ}为指示函数集合;X是由f(·;v)产生的随机样本;Ev表示相应的期望值。In the formula, γ represents a given real number; l represents the probability that S(X) is smaller than the given real number γ; I {S(X)≤γ} is a set of indicator functions; X is a random sample; E v represents the corresponding expected value.

当γ接近γ*时,l值将会越来越小,因此为了有意义,l值不能太小,则γ和v的选取至关重要。为了解决此问题,采用多级别算法,构造分布参数序列{ut,t>0}和级别序列{γt,t>0}(t为迭代次数)。然后将vt和γt更新迭代,直到某次迭代后分布参数序列中对应元素改变量的最大值小于某一规定的参数btol,迭代结束。When γ is close to γ * , the value of l will become smaller and smaller, so in order to be meaningful, the value of l should not be too small, so the selection of γ and v is very important. In order to solve this problem, a multi-level algorithm is used to construct a distribution parameter sequence {u t , t>0} and a level sequence {γ t ,t>0} (t is the number of iterations). Then v t and γ t are updated and iterated until the maximum value of the change of the corresponding element in the distribution parameter sequence after a certain iteration is less than a specified parameter b tol , and the iteration ends.

2.2组合型交叉熵算法2.2 Combined cross-entropy algorithm

CE算法分为连续型交叉熵算法和组合型交叉熵算法(CCE),两者之间的区别在于概率密度函数的选择,针对组合优化问题组合型交叉熵算法的概率密度函数为Berboulli分布。设成功概率为p,则CCE算法的概率密度函数为:The CE algorithm is divided into a continuous cross-entropy algorithm and a combined cross-entropy algorithm (CCE). The difference between the two lies in the selection of the probability density function. The probability density function of the combined cross-entropy algorithm for combinatorial optimization problems is Berboulli distribution. Assuming that the probability of success is p, the probability density function of the CCE algorithm is:

f(x;p)=px(1-p)1-x(4)。f(x; p)=p x (1-p) 1-x (4).

(4)式中,当x=1时,f(x;p)=p;当x=0时,f(x;p)=1-p。In formula (4), when x=1, f(x; p)=p; when x=0, f(x; p)=1-p.

CCE算法的步骤为:The steps of the CCE algorithm are:

第一步:设概率向量初始值为p(0)(k为p(0)的维数),分位数系数ρ,样本数M,平滑系数α,迭代次数t=0,终止参数btolThe first step: set the initial value of the probability vector p (0) (k is the dimension of p (0) ), the quantile coefficient ρ, the number of samples M, the smoothing coefficient α, the number of iterations t=0, and the termination parameter b tol .

第二步:令t=t+1,pt-1以Bernoulli分布产生M×k的样本矩阵Xt=[x1(t),x2(t),...,xM(t)]T,其中xa(t)=(xa(t),1,xa(t),2,...xa(t),k),1≤a≤M,M为随机样本的个数;k为每个随机样本向量的维数。The second step: Let t=t+1, p t-1 generate M×k sample matrix X t =[x 1(t) ,x 2(t) ,...,x M(t) with Bernoulli distribution ] T , where x a(t) = (x a(t),1 ,x a(t),2 ,...x a(t),k ), 1≤a≤M, M is the random sample number; k is the dimension of each random sample vector.

第三步:求出目标函数矩阵S(t)=[S1(t),S2(t),...,SM(t)]T,将S(t)进行排序(升序或降序),排序后的矩阵记为并计算的(1-ρ)分位数,如式(5)所示:Step 3: Calculate the objective function matrix S (t) = [S 1(t) ,S 2(t) ,...,S M(t) ] T , sort S (t) (in ascending order or descending order ), the sorted matrix is denoted as and calculate (1-ρ) quantile of , as shown in formula (5):

γ(t)=S[(1-ρ)M](5);γ (t) = S [(1-ρ)M] (5);

式中,γt的(1-ρ)分位数;S为目标函数。In the formula, γ t is The (1-ρ) quantile of ; S is the objective function.

第四步:利用(6)式更新参数p=(p1,...,pk);Step 4: update parameter p=(p 1 ,...,p k ) by formula (6);

pp jj == ΣΣ ii == 11 Mm II {{ SS (( Xx ii )) ≤≤ γγ }} Xx ii jj ΣΣ ii == 11 Mm II {{ SS (( Xx ii )) ≤≤ γγ }} ,, (( jj == 11 ,, 22 ,, ...... kk )) -- -- -- (( 66 )) ;;

式中,I{S(Xi)≤γ}为指示函数集合;Xij表示样本矩阵的第i行第j个元素;pj为更新参数p的第j个元素(j=1,...,k)。In the formula, I {S(Xi)≤γ} is a set of indicator functions; X ij represents the jth element of the i-th row of the sample matrix; p j is the jth element of the update parameter p (j=1,... ,k).

第五步:利用平滑参数α,对pj处理,如(7)式所示;Step 5: Use the smoothing parameter α to process p j , as shown in formula (7);

pj(t)=αpj(t)+(1-α)pj(t-1)(7);p j(t) = αp j(t) +(1-α)p j(t-1) (7);

式中,pj(t)为第t次迭代后参数序列中的第j个元素(j=1,...,k)。In the formula, p j(t) is the jth element (j=1,...,k) in the parameter sequence after the tth iteration.

第六步:若相邻两次迭代产生的参数矩阵满足(8)式则停止迭代,否则从第二步开始重新迭代。Step 6: If the parameter matrix generated by two adjacent iterations satisfies the formula (8), then stop the iteration, otherwise start from the second step to iterate again.

max(|pj(t)-pj(t-1)|)<btol(8)。max(|p j(t) -p j(t-1) |)<b tol (8).

程序执行结束后输出最优解最优值γ*=S(X*)=zminOutput the optimal solution after program execution Optimum value γ * = S(X * ) = z min .

3、算例分析3. Case analysis

c=3台相同的处理机和d=9项作业,每项作业需要运行的时间tm=(81,40,26,4,65,98,53,71,15),下面解决如何使9项作业在尽可能短的时间内由3台处理机完成的NP完全问题。设Ynm为作业Tm分配到处理机Hn上所有的处理方案,则多处理机调度问题的数学模型又可表示为式(9):c=3 identical processors and d=9 jobs, each job requires running time t m =(81,40,26,4,65,98,53,71,15), how to make 9 An NP-complete problem in which a job can be completed by three processors in the shortest possible time. Let Ynm be all the processing schemes assigned to the processor Hn by the job Tm , then the mathematical model of the multiprocessor scheduling problem can be expressed as formula (9):

zz == maxmax {{ YY nno mm &times;&times; tt mm TT }} == mm aa xx {{ ythe y 1111 ythe y 1212 ...... ythe y 1919 ythe y 21twenty one ythe y 22twenty two ...... ythe y 2929 ythe y 3131 ythe y 3232 ...... ythe y 3939 &times;&times; tt 11 tt 22 ...... tt 99 TT }}

sthe s .. tt .. &Sigma;&Sigma; nno == 11 cc ythe y nno mm == 11

ynm=0,1(m=1,2,...,9;n=1,2,3)(9)。y nm =0,1 (m=1,2,...,9; n=1,2,3) (9).

3.1多处理机调度问题的CCE算法3.1 CCE Algorithm for Multiprocessor Scheduling Problem

根据多处理机调度问题的数学模型可得CCE算法的目标函数(式(9)所示)为z,z中的变量ynm的取值为0和1,因此ynm服从Bernoulli分布,因此该算法可以解决多处理机调度问题。为了得到目标函数的最小值,利用CCE算法优化目标函数z,选取初始为p(0)=(0.5,0.5,...,0.5)(p0的维数为k),ρ=0.85,M=60,α=0.9,btol=1.0e-4。用Matlab对该问题编程,程序运行10次,结果如表1所示。According to the mathematical model of the multiprocessor scheduling problem, the objective function of the CCE algorithm (shown in formula (9)) is z, and the variable y nm in z takes the values of 0 and 1, so y nm obeys the Bernoulli distribution, so the Algorithms can solve multiprocessor scheduling problems. In order to obtain the minimum value of the objective function, the objective function z is optimized using the CCE algorithm, and the initial selection is p (0) = (0.5,0.5,...,0.5) (the dimension of p 0 is k), ρ = 0.85, M =60, α=0.9, b tol =1.0e-4. Use Matlab to program this problem, run the program 10 times, and the results are shown in Table 1.

表1CCE算法10次运行结果Table 1 Results of 10 runs of CCE algorithm

次数frequency 运行时间(秒)run time (seconds) 得到最优解的迭代次数The number of iterations to get the optimal solution 最优解Optimal solution 11 0.0847180.084718 1212 162162 22 0.0848750.084875 1313 163163 33 0.0741490.074149 1111 158158 44 0.0798630.079863 1212 152152 55 0.0853060.085306 1414 151151 66 0.0821220.082122 1212 158158 77 0.0896650.089665 66 163163 88 0.0470690.047069 66 152152 99 0.0852450.085245 88 162162 1010 0.0794400.079440 1010 169169

由表1可得,计算结果平均在第10次收敛,选取10次计算结果中最好解,目标函数与迭代次数的关系如图1所示。It can be seen from Table 1 that the calculation results converge at the 10th time on average, and the best solution among the 10 calculation results is selected. The relationship between the objective function and the number of iterations is shown in Figure 1.

由图1可知CCE算法在第7次时已经寻找到了目标函数的最小值即最优值,z=151,此时对应的最优解为 y = 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 , 对应的调度方案为H1(65,71,15),H2(98,53),H3(81,40,26,4),调度时间为151。It can be seen from Figure 1 that the CCE algorithm has found the minimum value of the objective function, that is, the optimal value, at the seventh time, z=151, and the corresponding optimal solution at this time is the y = 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 , The corresponding scheduling schemes are H 1 (65,71,15), H 2 (98,53), H 3 (81,40,26,4), and the scheduling time is 151.

3.2算法比较分析3.2 Algorithm comparison analysis

本发明针对多处理机调度问题采用模拟退火算法和蚁群算法与CCE算法进行对比分析。模拟退火算法中起始温度20000度,终止温度1度,退火速度α=0.95,最好解的测试结果如图2所示;蚁群算法中信息素持久性系数ρ=0.8,信息素总量Q=100,最好解的测试结果如图3所示。The invention adopts simulated annealing algorithm, ant colony algorithm and CCE algorithm for comparative analysis aiming at multi-processor scheduling problem. In the simulated annealing algorithm, the initial temperature is 20,000 degrees, the termination temperature is 1 degree, and the annealing speed α=0.95. The test results of the best solution are shown in Figure 2; the pheromone persistence coefficient ρ=0.8 in the ant colony algorithm Q=100, the test result of the best solution is shown in Figure 3.

将图2和图3与图1进行比较得三种算法都可以得到最优解151,但是各个算法的性能有较大差距。通过用模拟退火算法和蚁群算法对该问题进行多次测试得到表2。Comparing Figure 2 and Figure 3 with Figure 1, the three algorithms can all get the optimal solution 151, but the performance of each algorithm has a large gap. Table 2 is obtained by using simulated annealing algorithm and ant colony algorithm to test this problem several times.

表2三种算法结果比较Table 2 Comparison of the results of the three algorithms

综合以上三种算法对多处理机调度问题的测试结果得出CCE算法比模拟退火算法和蚁群算法具有运行时间短,收敛速度快,稳定性高的优点。Combining the test results of the above three algorithms on the multiprocessor scheduling problem, it is concluded that the CCE algorithm has the advantages of shorter running time, faster convergence speed and higher stability than simulated annealing algorithm and ant colony algorithm.

Claims (3)

1.一种利用组合型交叉熵实现多处理机调度的方法,其特征在于所述方法步骤如下:1. a method utilizing combined cross-entropy to realize multiprocessor scheduling is characterized in that the method steps are as follows: 步骤一:构建多处理机调度问题的数学模型,确立目标函数和约束条件;Step 1: Construct the mathematical model of the multiprocessor scheduling problem, and establish the objective function and constraints; 步骤二:利用组合型交叉熵算法,通过Matlab对多处理机调度问题确立的目标函数和约束条件进行编程、求解,得到目标函数最优解。Step 2: Use the combined cross-entropy algorithm to program and solve the objective function and constraint conditions established for the multiprocessor scheduling problem through Matlab, and obtain the optimal solution of the objective function. 2.根据权利要求1所述的利用组合型交叉熵实现多处理机调度的方法,其特征在于所述多处理机调度问题的数学模型如下:2. the method utilizing combined type cross-entropy to realize multiprocessor scheduling according to claim 1, is characterized in that the mathematical model of described multiprocessor scheduling problem is as follows: zz == mm aa xx 11 &le;&le; nno &le;&le; cc &Sigma;&Sigma; mm == 11 dd ythe y nno mm tt mm sthe s .. tt .. &Sigma;&Sigma; nno == 11 cc ythe y nno mm == 11 ynm=0,1(m=1,2,...,d;n=1,2,...,c);y nm =0,1(m=1,2,...,d; n=1,2,...,c); 式中,z表示完成d项作业所需要的时间,即目标函数;ynm=1表示作业Tm在处理机Hn上处理;表示处理机Hn完工的时间;tm表示处理机完成作业Tm的时间;处理机表示作业Tm在一个处理机上完成,即约束条件。In the formula, z represents the time required to complete d tasks, that is, the objective function; y nm =1 means that the task T m is processed on the processor H n ; Indicates the time when processor H n completes work; t m indicates the time when processor completes job T m ; processor Indicates that the job T m is completed on one processor, which is the constraint condition. 3.根据权利要求1所述的利用组合型交叉熵实现多处理机调度的方法,其特征在于所述步骤二的具体步骤如下:3. the method utilizing combined type cross-entropy to realize multiprocessor scheduling according to claim 1, is characterized in that the concrete steps of described step 2 are as follows: 第一步:设概率向量初始值为p(0),分位数系数ρ,样本数M,平滑系数α,迭代次数t=0,终止参数btolThe first step: set the initial value of the probability vector p (0) , the quantile coefficient ρ, the number of samples M, the smoothing coefficient α, the number of iterations t=0, and the termination parameter b tol ; 第二步:令t=t+1,pt-1以Bernoulli分布产生M×k的样本矩阵Xt=[x1(t),x2(t),...,xM(t)]T,其中xa(t)=(xa(t),1,xa(t),2,...xa(t),k),1≤a≤M,M为随机样本的个数;k为每个随机样本向量的维数;The second step: Let t=t+1, p t-1 generate M×k sample matrix X t =[x 1(t) ,x 2(t) ,...,x M(t) with Bernoulli distribution ] T , where x a(t) = (x a(t),1 ,x a(t),2 ,...x a(t),k ), 1≤a≤M, M is the random sample number; k is the dimension of each random sample vector; 第三步:求出目标函数矩阵S(t)=[S1(t),S2(t),...,SM(t)]T,将S(t)进行排序,排序后的矩阵记为并计算的(1-ρ)分位数:Step 3: Calculate the objective function matrix S (t) = [S 1(t) ,S 2(t) ,...,S M(t) ] T , sort S (t) , and the sorted The matrix is denoted as and calculate The (1-ρ) quantile of: γ(t)=S[(1-ρ)M]γ (t) = S [(1-ρ)M] ; 式中,γt的(1-ρ)分位数;S为目标函数;In the formula, γ t is The (1-ρ) quantile of ; S is the objective function; 第四步:利用下式更新参数p=(p1,...,pk):Step 4: update the parameter p=(p 1 ,...,p k ) using the following formula: pp jj == &Sigma;&Sigma; ii == 11 Mm II {{ SS (( Xx ii )) &le;&le; &gamma;&gamma; }} Xx ii jj &Sigma;&Sigma; ii == 11 Mm II {{ SS (( Xx ii )) &le;&le; &gamma;&gamma; }} ,, (( jj == 11 ,, 22 ,, ...... kk )) ;; 式中,为指示函数集合;Xij表示样本矩阵的第i行第j个元素;pj为更新参数p的第j个元素;In the formula, is the set of indicator functions; X ij represents the j-th element of the i-th row of the sample matrix; p j is the j-th element of the update parameter p; 第五步:利用平滑参数α,对pj处理:Step 5: Use the smoothing parameter α to process p j : pj(t)=αpj(t)+(1-α)pj(t-1)p j(t) = αp j(t) +(1-α)p j(t-1) ; 式中,pj(t)为第t次迭代后参数序列中的第j个元素,j=1,...,k;In the formula, p j(t) is the jth element in the parameter sequence after the tth iteration, j=1,...,k; 第六步:若相邻两次迭代产生的参数矩阵满足下式则停止迭代,否则从第二步开始重新迭代;Step 6: If the parameter matrix generated by two adjacent iterations satisfies the following formula, stop the iteration, otherwise start from the second step to iterate again; max(|pj(t)-pj(t-1)|)<btolmax(|p j(t) -p j(t-1) |)<b tol ; 程序执行结束后输出最优解X*,最优值γ*=S(X*)=zminAfter the execution of the program, the optimal solution X * is output, and the optimal value γ * = S(X * ) = z min .
CN201511003552.9A 2015-12-28 2015-12-28 Method for achieving multiprocessor scheduling through combined cross entropy Pending CN105630608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511003552.9A CN105630608A (en) 2015-12-28 2015-12-28 Method for achieving multiprocessor scheduling through combined cross entropy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511003552.9A CN105630608A (en) 2015-12-28 2015-12-28 Method for achieving multiprocessor scheduling through combined cross entropy

Publications (1)

Publication Number Publication Date
CN105630608A true CN105630608A (en) 2016-06-01

Family

ID=56045585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511003552.9A Pending CN105630608A (en) 2015-12-28 2015-12-28 Method for achieving multiprocessor scheduling through combined cross entropy

Country Status (1)

Country Link
CN (1) CN105630608A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848519A (en) * 2018-05-25 2018-11-20 东南大学 A kind of heterogeneous network user access method based on cross entropy study
CN116679639A (en) * 2023-05-26 2023-09-01 广州市博煌节能科技有限公司 Optimization method and system of metal product production control system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6397205B1 (en) * 1998-11-24 2002-05-28 Duquesne University Of The Holy Ghost Document categorization and evaluation via cross-entrophy
CN103344881A (en) * 2013-06-27 2013-10-09 黑龙江科技大学 Grid fault diagnosing method based on combined type cross entropy algorithm

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6397205B1 (en) * 1998-11-24 2002-05-28 Duquesne University Of The Holy Ghost Document categorization and evaluation via cross-entrophy
CN103344881A (en) * 2013-06-27 2013-10-09 黑龙江科技大学 Grid fault diagnosing method based on combined type cross entropy algorithm

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
丁海军等: "求解最大割问题的交叉熵算法", 《计算机工程与应用》 *
卢长先等: "求解0-1背包问题的交叉熵方法", 《计算机仿真》 *
曹杰先等: "求解多处理机调度问题的近似算法", 《计算机工程与设计》 *
车向前等: "利用组合型交叉熵实现多处理机调度的算法", 《黑龙江科技大学学报》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848519A (en) * 2018-05-25 2018-11-20 东南大学 A kind of heterogeneous network user access method based on cross entropy study
CN108848519B (en) * 2018-05-25 2021-05-18 东南大学 Heterogeneous network user access method based on cross entropy learning
CN116679639A (en) * 2023-05-26 2023-09-01 广州市博煌节能科技有限公司 Optimization method and system of metal product production control system
CN116679639B (en) * 2023-05-26 2024-01-05 广州市博煌节能科技有限公司 Optimization method and system of metal product production control system

Similar Documents

Publication Publication Date Title
Goodwin et al. Real-time digital twin-based optimization with predictive simulation learning
CN113792924B (en) A single-piece job shop scheduling method based on Deep Q-network deep reinforcement learning
CN102508708B (en) Heterogeneous multi-core energy-saving task scheduling method based on improved genetic algorithm
CN110379463A (en) Marine algae genetic analysis and concentration prediction method and system based on machine learning
CN104636479A (en) Industrial big data driven total completion time prediction method
CN102508640B (en) Distributed radio frequency identification device (RFID) complex event detection method based on task decomposition
CN107133088A (en) A kind of multiple nucleus system method for scheduling task based on particle cluster algorithm
CN105740953A (en) Irregular layout method based on real-coded quantum evolutionary algorithm
CN107578121A (en) Prediction method of substation project cost based on improved firefly algorithm to optimize SVM
CN102789599A (en) Operation shop bottleneck recognition method based on cluster analysis and multiple attribute decision making
CN102982389A (en) Method for solving combination and optimization problems using ant colony optimization technology based on Map Reduce
Zheng et al. Ant colony optimisation algorithms for two-stage permutation flow shop with batch processing machines and nonidentical job sizes
CN107273197A (en) Hadoop method for scheduling task based on the improved spectral clustering genetic algorithm of orthogonal experiment
CN107729241A (en) A kind of software mutation testing data evolution generation method based on variant packet
CN105023071A (en) Water quality prediction method based on Gaussian cloud transformation and fuzzy time sequence
CN104573331B (en) A kind of k nearest neighbor data predication method based on MapReduce
CN108549939A (en) A kind of real-time rule-based reasoning method and apparatus of distribution towards magnanimity stream data
Tian Particle swarm optimization with chaotic maps and Gaussian mutation for function optimization
CN111596622B (en) Flexible Job Shop Scheduling Method Based on ECM Rule Distribution Estimation Algorithm
CN106780067A (en) It is a kind of to consider the sign prediction method that node locally marks characteristic
CN105630608A (en) Method for achieving multiprocessor scheduling through combined cross entropy
Wang et al. A time series is worth five experts: Heterogeneous mixture of experts for traffic flow prediction
CN104318306B (en) Self adaptation based on Non-negative Matrix Factorization and evolution algorithm Optimal Parameters overlaps community detection method
Lin et al. A swarm-based approach to mine high-utility itemsets
CN119310947A (en) Permutation flow shop scheduling method and system based on multi-view graph neural network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20191025

Address after: 524000 Guangdong city of Zhanjiang province sea Mazhang District Road No. 1

Applicant after: Guangdong Ocean University

Address before: 150027, 2468, Pu Yuan Road, Harbin, Heilongjiang, Songbei

Applicant before: Heilongjiang University of Science and Technology

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160601