📄 flimflamsacontrol.cpp
字号:
#include "flimflamSAControl.h"bool flimflamControl::setSAOrOptParameters(){ //---------- SIMULATED ANNEALING IN LOCAL SEARCH ----------------- int sa = 6; div_t r; int rateTempLengthInd, iniTempFactorInd, idle_length_reheatingInd; if (sa >11 || sa <0) exit(1); alfa = 0.98; if (sa == 11) { initTempFactor = 0; rateTempLength = INT_MAX; idle_length_reheating = INT_MAX; } else { int val=sa; r = div(val,2); rateTempLengthInd = r.rem + 1; switch (rateTempLengthInd) { case 1: rateTempLength = 1; break; case 2: rateTempLength = 10; break; default: (*os)<<"Error in neigh. configuration!"<<endl; exit(1); } r = div(r.quot,2); iniTempFactorInd = r.rem + 1; switch (iniTempFactorInd) { case 1: initTempFactor = 0.01; break; case 2: initTempFactor = 0.05; break; default: (*os)<<"Error in TempScvInd configuration!"<<endl; exit(1); } idle_length_reheatingInd = r.quot + 1; switch (idle_length_reheatingInd) { case 1: idle_length_reheating = 5; break; case 2: idle_length_reheating = 20; break; case 3: idle_length_reheating = 40; break; default: (*os)<<"Error in rejectedLimScv configuration!"<<endl; exit(1); } }// (*os)<<"rateNeighbourhood "<<rateTempLength<<"\n";// (*os)<<"iniTempFactorScv "<<initTempFactor<<"\n";// (*os)<<"alfa "<<alfa<<"\n"; // (*os)<<"rejectedLimScv "<<idle_length_reheating<<"\n"; return true;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -