Remove stop condition fix

This commit is contained in:
Leonardo Bautista-Gomez 2023-03-30 13:52:40 +02:00
parent 98423d29c0
commit 4b7bf81cee
2 changed files with 4 additions and 9 deletions

View File

@ -273,13 +273,11 @@ class Simulator:
})
if missingSamples == oldMissingSamples:
if len(missingVector) > self.config.steps4StopCondition:
if missingSamples == missingVector[len(missingVector)-1-self.config.steps4StopCondition]:
self.logger.debug("The block cannot be recovered, failure rate %d!" % self.shape.failureRate, extra=self.format)
if self.config.diagnostics:
self.printDiagnostics()
break
self.logger.debug("The block cannot be recovered, failure rate %d!" % self.shape.failureRate, extra=self.format)
if self.config.diagnostics:
self.printDiagnostics()
missingVector.append(missingSamples)
break
elif missingSamples == 0:
#self.logger.info("The entire block is available at step %d, with failure rate %d !" % (steps, self.shape.failureRate), extra=self.format)
missingVector.append(missingSamples)

View File

@ -77,9 +77,6 @@ randomSeed = "DAS"
# If True, print diagnostics when the block is not available
diagnostics = False
# Number of steps without progress to stop simulation
steps4StopCondition = 7
def nextShape():
for run, fr, class1ratio, chi, vpn1, vpn2, blockSize, nn, netDegree, bwUplinkProd, bwUplink1, bwUplink2 in itertools.product(
runs, failureRates, class1ratios, chis, validatorsPerNode1, validatorsPerNode2, blockSizes, numberNodes, netDegrees, bwUplinksProd, bwUplinks1, bwUplinks2):