浏览代码

init run before training surrogate

Jérôme BUISINE 4 年之前
父节点
当前提交
09a18c3e1a
共有 1 个文件被更改,包括 4 次插入4 次删除
  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():