Explorar el Código

init run before training surrogate

Jérôme BUISINE hace 4 años
padre
commit
09a18c3e1a
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      optimization/ILSSurrogate.py

+ 4 - 4
optimization/ILSSurrogate.py

@@ -158,14 +158,14 @@ class ILSSurrogate(Algorithm):
                 self.add_to_surrogate(newSolution)
 
                 self.increaseEvaluation()
-        
-        # train surrogate on real evaluated solutions file
-        self.train_surrogate()
-        self.load_surrogate()
 
         # initialize current solution
         self.initRun()
 
+        # train surrogate on real evaluated solutions file
+        self.train_surrogate()
+        self.load_surrogate()
+
         # local search algorithm implementation
         while not self.stop():