X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fyacsloader%2FTest%2Falgoasyncexample.py;h=d944f12de3c7635b52984a4175304082bc012b62;hb=91945d98482a02a05a3f5df7511a4e5760db2a94;hp=430820e5c0a3fa5fba56b87737de19c786919b99;hpb=9b44198b5b5bf3794b63693a778382952a187475;p=modules%2Fyacs.git diff --git a/src/yacsloader/Test/algoasyncexample.py b/src/yacsloader/Test/algoasyncexample.py index 430820e5c..d944f12de 100644 --- a/src/yacsloader/Test/algoasyncexample.py +++ b/src/yacsloader/Test/algoasyncexample.py @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2014 CEA/DEN, EDF R&D +# Copyright (C) 2006-2021 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -52,7 +52,7 @@ class myalgoasync(SALOMERuntime.OptimizerAlgASync): """Optional method called on initialization. The type of "input" is returned by "getTCForAlgoInit" """ - print "Algo initialize, input = ", input.getIntValue() + print("Algo initialize, input = ", input.getIntValue()) def startToTakeDecision(self): """This method is called only once to launch the algorithm. It must @@ -66,7 +66,7 @@ class myalgoasync(SALOMERuntime.OptimizerAlgASync): pool, do nothing (wait for more samples), or empty the pool and return to finish the evaluation. """ - print "startToTakeDecision" + print("startToTakeDecision") # fill the pool with samples iter=0 self.pool.pushInSample(0, 0.5) @@ -77,7 +77,7 @@ class myalgoasync(SALOMERuntime.OptimizerAlgASync): currentId=self.pool.getCurrentId() valIn = self.pool.getCurrentInSample().getDoubleValue() valOut = self.pool.getCurrentOutSample().getIntValue() - print "Compute currentId=%s, valIn=%s, valOut=%s" % (currentId, valIn, valOut) + print("Compute currentId=%s, valIn=%s, valOut=%s" % (currentId, valIn, valOut)) iter=iter+1 if iter < 3: @@ -89,7 +89,7 @@ class myalgoasync(SALOMERuntime.OptimizerAlgASync): def finish(self): """Optional method called when the algorithm has finished, successfully or not, to perform any necessary clean up.""" - print "Algo finish" + print("Algo finish") self.pool.destroyAll() def getAlgoResult(self):