Two improved simulated annealing algorithms for solving large-range constraint satisfaction Problem 2.0

Source: Internet
Author: User
Tags new set

2 Two kinds of improved simulated annealing algorithms

simulated annealing algorithm (simulatedannealing Algorithm) is a general-purpose probabilistic algorithm whose idea stems from the solid annealing process: when solids are at a high temperature, the particles in the solids move out of order, and as the temperature gradually decreases, the particles gradually tend to move in an orderly manner. The simulated annealing algorithm is often used to solve the problem of the minimum value of the optimization problem, and the current assignment of the variable is constantly disturbed to generate a new assignment Value. If the new assignment makes the value of the target function smaller, the new assignment is accepted as the current Assignment. conversely, the probability 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/89/B3/wKioL1ganFjzjZGqAAADY9dqVCM800.png "title= "picture 2.png" alt= "wkiol1ganfjzjzgqaaady9dqvcm800.png"/> accept the new assignment, where T is the current temperature, 650) this.width =650; "src=" http://s1.51cto.com/wyfs02/M02/89/B6/wKiom1ganKLBfxbvAAABM-zyBDE460.png "title=" picture 1.png "alt=" Wkiom1ganklbfxbvaaabm-zybde460.png "/> is the new assignment target function value, 650) this.width=650;" src= "http://s3.51cto.com/wyfs02/M00/89/ B6/wkiom1ganpkseovcaaabmzq4ryi451.png "title=" image 3.png "alt=" wkiom1ganpkseovcaaabmzq4ryi451.png "/> is the value of the current assignment target function, Repeat the process until the annealing is complete or the target function value satisfies the optimization requirement.

For the RB model, the set is a set of fully assigned values that define the target function as the number of irreducible constraints, i.e.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/89/B6/wKiom1ganUGg6HSJAAADMTJ2B7Y070.png "title=" Picture 4.png "alt=" wkiom1ganugg6hsjaaadmtj2b7y070.png "/> (1)

which

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/89/B3/wKioL1ganVbjC6-XAAAGBIt9b_Q553.png "title=" Picture 5.png "alt=" wkiol1ganvbjc6-xaaagbit9b_q553.png "/> (2)

If present X makes 650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/89/B3/wKioL1ganaaR-XKfAAABzt0-Z_ C537.png "title=" picture 6.png "alt=" wkiol1ganaar-xkfaaabzt0-z_c537.png "/> The random instance generated by the RB model is satisfying, andX is a solution; conversely, is not satisfied,X is not a Solution.

The classical simulated annealing algorithm is very inefficient in solving the random instances of RB model, considering the characteristics of the RB model random examples and the limitations of the simulated annealing algorithm itself, we think that the following three reasons cause its inefficiency:

(1) in the process of solving the RB model is not the characteristics to take some comparison can significantly reduce the target function value of the perturbation strategy;

(2) the simulated annealing algorithm has not effectively utilized the optimal assignment which has been found in the process of solving.

(3) the simulated annealing algorithm has a certain dependence on the initial assignment of the RB model problem Solving.

For the first problem, this paper improves the perturbation strategy of simulated annealing algorithm, which is to randomly pick a constraint that is not satisfied by the current assignment, and then randomly picks a variable that appears in this constraint, and selects a set of assignments from the set of compatible assignments as the assignment of variables that occur in this Constraint. For the second problem, combining the characteristics of simulated annealing algorithm, We introduce the annealing idea into the perturbation operation of the current Assignment. specifically, in the early stage of the simulated annealing algorithm search solution, that is, when the temperature is very high, it is necessary to find a good assignment in a large range of assignment space, so the random perturbation strategy is adopted without purpose, and in the late stage of the algorithm, that is, when the temperature is getting lower, we need to find the good Assignment. therefore, the optimal assignment currently found is directly used as the current assignment, and then the perturbation strategy is Used. For the third problem, The genetic algorithm is used to optimize multiple sets of initial random assignment, and then the optimal assignment returned after the genetic algorithm is used as the initial assignment of the simulated annealing algorithm.

In this paper, two improved algorithms are proposed based on the simulated annealing algorithm for these three problems. One is to introduce the strategic disturbance into the simulated annealing algorithm, we call it the RSA algorithm, and the other is to optimize the initial assignment based on the RSA algorithm, which we call the GSA Algorithm. The RSA algorithm is an improved algorithm for problem one and problem two. The GSA algorithm further improves on the problem three.

To 650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/89/B3/wKioL1ganm-i4dqWAAABK2oKQPs065.png "title=" Picture 7.png "alt=" wkiol1ganm-i4dqwaaabk2okqps065.png "/>,RB model are all np-complete, so the following algorithm in the Two-yuan RB model (650) this.width=650;" src= "http ://s1.51cto.com/wyfs02/m00/89/b6/wkiom1gann-an0pdaaabeebh-ui101.png "title=" Image 8.png "alt=" Wkiom1gann-an0pdaaabeebh-ui101.png "/>" is executed on a random instance that is Generated.

2.1 RSA algorithm

In general, the RSA algorithm is divided into three steps. first, a set of initial assignments is randomly generated, and the set of assignments is randomly or strategically disturbed to generate new Assignments. With the gradual decrease of the temperature, the probability of choosing the strategic disturbance is increasing, in order to avoid the blindness of stochastic disturbance in the classical simulated annealing algorithm to reduce the efficiency of the Solution. next, determine whether to accept the new set of assignments based on the value of the target function and the current Temperature. finally, the above perturbation and acceptance process is repeated until the target function value satisfies the optimization condition, or the maximum number of repetitions is reached.

RSA algorithm Steps:

Input: two USD A random instance of the RB model, initial temperature 650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/89/B4/ Wkiol1gaojeydootaaaa-bubgks616.png "title=" picture 8-1.png "alt=" wkiol1gaojeydootaaaa-bubgks616.png "/>, termination temperature 650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/89/B6/wKiom1gaoKax4595AAAA4M2ezB0055.png "title=" picture 8-2.png " alt= "wkiom1gaokax4595aaaa4m2ezb0055.png"/> The maximum number of iterations at the same temperature 650) this.width=650; src= http://s4.51cto.com/wyfs02/ M00/89/b4/wkiol1gaomtsjmdxaaaawm_zrn4443.png "title=" picture 8-3.png "alt=" wkiol1gaomtsjmdxaaaawm_zrn4443.png "/>.

Output: the best assignment found and the minimum number of non-satisfied Constraints.

Step 1: to make the current temperature 650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/ 89/b6/wkiom1gaonpza6xzaaabaio-lwi918.png "title=" image 9.png "alt=" wkiom1gaonpza6xzaaabaio-lwi918.png "/> Randomly generate a set of assigned values 650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/89/B6/wKiom1gaoP-hHE3cAAABEiA9WyQ885.png "title = "picture 10.png" alt= "wkiom1gaop-hhe3caaabeia9wyq885.png"/>, calculate target function value 650) this.width=650; src= http://s2.51cto.com/ Wyfs02/m00/89/b4/wkiol1gaoroyr_fnaaab70749ay625.png "title=" image 11.png "alt=" wkiol1gaoroyr_fnaaab70749ay625.png "/ 650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/89/B6/wKiom1gaoSbB9zCQAAAB2D3MniI066.png " title= "picture 12.png" alt= "wkiom1gaosbb9zcqaaab2d3mnii066.png"/>, Minimum number of constraints not satisfied 650) this.width=650; "src=" http:/ S4.51cto.com/wyfs02/m02/89/b4/wkiol1gaoumj_fvxaaacyss0bsu637.png "title=" image 13.png "alt=" wkiol1gaoumj_ Fvxaaacyss0bsu637.png "/>;

Step 2 : while 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/89/B4/ Wkiol1gaowwbxpwuaaabka3gzkq704.png "title=" image 14.png "alt=" wkiol1gaowwbxpwuaaabka3gzkq704.png "/> to do Step 3~Step 8;

Step 3 : For650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/89/B6/wKiom1gaoaHg80p6AAAAzPsbEi8242.png " title= "picture 15.png" alt= "wkiom1gaoahg80p6aaaazpsbei8242.png"/> to L do Step 4~step 7 ;

Step 4 : if (650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/B6/wKiom1gaocPgew4RAAAB3FeE_HQ200.png "title=" Image 16.png "alt=" Wkiom1gaocpgew4raaab3fee_hq200.png "/>) { return optimal assignment 650) this.width=650;" src= "http:/ S1.51cto.com/wyfs02/m00/89/b7/wkiom1gaqlrdcnk9aaabpxy-fak161.png "title=" Image 17.png "alt=" Wkiom1gaqlrdcnk9aaabpxy-fak161.png "/>, and the minimum number of irreducible constraints 650) this.width=650; src= http://s1.51cto.com/wyfs02/M01/ 89/b7/wkiom1gaqm2izjfjaaabnt-6hwk567.png "title=" image 18.png "alt=" wkiom1gaqm2izjfjaaabnt-6hwk567.png "/>}

Else {to doStep 5} ;

Step 5 : Randomly take a real number from 0 to 1 650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/89/B4/ Wkiol1gaqorznoupaaabelukbhm755.png "title=" image 19.png "alt=" wkiol1gaqorznoupaaabelukbhm755.png "/>;

if (650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/89/B7/ Wkiom1gaqp7auicfaaaca_7qe5c337.png "title=" image 20.png "alt=" wkiom1gaqp7auicfaaaca_7qe5c337.png "/>" {

else { 650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/89/B7/wKiom1gaqy-BDtdVAAAB1_X4N08967.png "title=" Picture 23.png "alt=" wkiom1gaqy-bdtdvaaab1_x4n08967.png "/>, randomly selected 650) this.width=650;" src= "http://s5.51cto.com/wyfs02 /m01/89/b5/wkiol1gaq0ugpdulaaabeia9wyq850.png "title=" image 24.png "alt=" wkiol1gaq0ugpdulaaabeia9wyq850.png "/> An irreducible constraint, randomly selecting a set of assignments from a set of compatible assignments, assigning a variable in this set of constraints, and thus obtaining the assignment 650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/89/B5/ Wkiol1gaq2hwkvziaaab1fn7qna709.png "title=" image 25.png "alt=" wkiol1gaq2hwkvziaaab1fn7qna709.png "/>};

Step 6 : Calculation 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/89/B5/wKioL1gaq3KxLBJVAAADKViPNw8437.png "title= "picture 26.png" alt= "wkiol1gaq3kxlbjvaaadkvipnw8437.png"/>

if (650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/89/B5/wKioL1gaq4OSyJYSAAABgs-jnPk536.png "title=" Picture 27.png "alt=" wkiol1gaq4osyjysaaabgs-jnpk536.png "/>) { 650) this.width=650;" src= "http://s4.51cto.com /wyfs02/m00/89/b7/wkiom1gaq76xlrq-aaab6qpmcp8144.png "title=" image 28.png "alt=" wkiom1gaq76xlrq-aaab6qpmcp8144.png "/ }

Else { randomly take a real number from 0 to 1 650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/89/B5/ Wkiol1gaq9dslcpdaaabcgm5clo412.png "title=" image 29.png "alt=" wkiol1gaq9dslcpdaaabcgm5clo412.png "/>;

if (650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/89/B5/wKioL1gaq_DCqOxFAAADXvgHBxY708.png "title=" Picture 30.png "alt=" wkiol1gaq_dcqoxfaaadxvghbxy708.png "/>) { 650) this.width=650;" src= "http://s2.51cto.com /wyfs02/m00/89/b7/wkiom1gaq_6sgka8aaab6qpmcp8842.png "title=" image 31.png "alt=" wkiom1gaq_6sgka8aaab6qpmcp8842.png "/ }

else

Step 7 :if(650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/89/B7/wKiom1garESBTdGRAAACiJ_ Xq5s161.png "title=" image 32.png "alt=" wkiom1garesbtdgraaacij_xq5s161.png "/>" {650) this.width=650; "src="/http// S1.51cto.com/wyfs02/m00/89/b7/wkiom1garieietljaaab2d3mnii454.png "title=" Image 33.png "alt=" Wkiom1garieietljaaab2d3mnii454.png "/>,650) this.width=650;" src= "http://s3.51cto.com/wyfs02/M01/89/B5/ Wkiol1garjmygq0oaaacyss0bsu967.png "title=" picture 34.png "alt=" wkiol1garjmygq0oaaacyss0bsu967.png "/>, to doStep 3 }

Else {to doStep 3} ;

Step 8 : Make 650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/89/B5/wKioL1garNOx1r5kAAABCb3K0W4857.png "title=" Picture 35.png "alt=" wkiol1garnox1r5kaaabcb3k0w4857.png "/> to doStep 2;

Step 9 :return650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/89/B7/ Wkiom1garoeshtmaaaabpxy-fak503.png "title=" image 36.png "alt=" wkiom1garoeshtmaaaabpxy-fak503.png "/>,650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/89/B5/wKioL1garPDTI4UKAAABnt-6hwk984.png "title=" picture 37.png " alt= "wkiol1garpdti4ukaaabnt-6hwk984.png"/>.

about

RSA the algorithm is based on the classical simulated annealing algorithm to improve the first problem and the second One. At the beginning of the algorithm, the temperature is very high, the value of the objective function is very large, and the probability of accepting the new assignment after the variable assignment is Greater. At this point, the variable assignment is randomly disturbed in a wide range of assignment Spaces. With the decrease of temperature, it is necessary to make a targeted strategic disturbance to the variable Assignment. specifically, It is in step 5, with 650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/89/B7/ Wkiol1ga0flyoq5daaabxm-0vrq433.png "title=" image 42.png "alt=" wkiol1ga0flyoq5daaabxm-0vrq433.png "/> as the choice probability for different perturbation schemes, When the temperature value is large, random disturbances are selected at a larger Probability. however, with the decrease of the temperature T , it is necessary to select the strategic disturbance in order to find the solution or the optimal solution of the ALGORITHM.

RSA the algorithm adopts the above-mentioned temperature-related strategic disturbance, on the one hand it avoids the local optimal solution of the algorithm, and avoids the meaningless new assignment due to the blindness of random disturbance, thus improving the efficiency of solving the RB Model. In addition, after the algorithm runs, the RSA algorithm will be more targeted to the current optimal assignment perturbation, further accelerate the convergence of the algorithm, to obtain a more effective new assignment.

RSA the algorithm is aimed at problem one and problem two, but the initial assignment is randomly generated, which will directly affect the efficiency of the RSA algorithm to find the Solution. therefore, We consider first using the genetic algorithm incorporating annealing thought to get the solution or approximate optimal solution as initial assignment, and then using the simulated annealing algorithm to obtain the solution or the optimal solution, and then put forward the following GSA Algorithm.


Two improved simulated annealing algorithms for solving large-range constraint satisfaction Problem 2.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.