File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -288,6 +288,8 @@ class rzSim extends theoryClass<theory> {
288288 bhRewindNorm : number ;
289289 bhRewindDeriv : number ;
290290
291+ bhProcessCounter : number = 0 ;
292+
291293 getBuyingConditions ( ) : conditionFunction [ ] {
292294 const activeStrat = [
293295 ( ) => {
@@ -437,6 +439,10 @@ class rzSim extends theoryClass<theory> {
437439
438440 bhProcess ( zResult : ComplexValue | null = null , tmpZ : ComplexValue | null = null ) {
439441 this . offGrid = true ;
442+ if ( this . strat != "RZdBHRewind" ) this . bhProcessCounter ++ ;
443+
444+ // This is a method to prevent the non-convergence of the algorithm
445+ const bhLockPreventionCoeff = this . bhProcessCounter < 1000 ? 1 : Math . E ** ( - 0.002 * ( this . bhProcessCounter - 1000 ) ) ;
440446
441447 if ( zResult === null ) {
442448 zResult = zeta ( this . t_var , this . ticks , this . offGrid , lookups . zetaLookup ) ;
@@ -451,11 +457,11 @@ class rzSim extends theoryClass<theory> {
451457 if ( this . bhSearchingRewind && this . t_var > 14.5 && bhdt > 0 )
452458 {
453459 let srdt = - Math . min ( 0.125 / bhdt , 0.125 ) ;
454- this . t_var += srdt ;
460+ this . t_var += srdt * bhLockPreventionCoeff ;
455461 }
456462 else
457463 {
458- this . t_var += bhdt ;
464+ this . t_var += bhdt * bhLockPreventionCoeff ;
459465 this . bhSearchingRewind = false ;
460466 if ( Math . abs ( bhdt ) < 1e-9 )
461467 {
Original file line number Diff line number Diff line change 5151 148190.29 ,
5252 175030.58 ,
5353 210283.59 ,
54- 321842.6
54+ 321842.6 ,
55+ 454350.9 ,
56+ 757720.12 ,
57+ 833464.81 ,
58+ 964594.73
5559 ],
5660 "longZeros" : [
5761 7623.42 ,
120124 "toRho" : 2300 , "from" : 50000 , "to" : 150000
121125 },
122126 {
123- "toRho" : 2500 , "from" : 90000 , "to" : 999999999
127+ "toRho" : 2500 , "from" : 90000 , "to" : 400000
124128 },
125129 {
126130 "toRho" : 999999 , "from" : 200000 , "to" : 999999999
155159 "toRho" : 2300 , "from" : 50000 , "to" : 150000
156160 },
157161 {
158- "toRho" : 2500 , "from" : 90000 , "to" : 999999999
162+ "toRho" : 2500 , "from" : 90000 , "to" : 400000
159163 },
160164 {
161165 "toRho" : 999999 , "from" : 200000 , "to" : 999999999
You can’t perform that action at this time.
0 commit comments