Procedure TSPSA: begin init-of-T { T为初始温度} S={1,……,n} {S为初始值} termination=false while termination=false begin for i=1 to L do begin generate(S′form S) { 从当前回路S产生新回路S′} Δt:=f(S′))-f(S) {f(S)为路径总长} IF(Δt<0) OR (EXP(-Δt/T)>Random-of-[0,1]) S=S′ IF the-halt-condition-is-TRUE THEN termination=true End T_lower End End