Browse Source

set run initialization before surrogate training

Jérôme BUISINE 4 years ago
parent
commit
21c9123181
1 changed files with 3 additions and 3 deletions
  1. 3 3
      optimization/ILSSurrogate.py

+ 3 - 3
optimization/ILSSurrogate.py

@@ -143,6 +143,9 @@ class ILSSurrogate(Algorithm):
         # enable resuming for ILS
         self.resume()
 
+        # initialize current solution
+        self.initRun()
+
         if self.start_train_surrogate > self.getGlobalEvaluation():
         
             # get `self.start_train_surrogate` number of real evaluations and save it into surrogate dataset file
@@ -159,9 +162,6 @@ class ILSSurrogate(Algorithm):
 
                 self.increaseEvaluation()
 
-        # initialize current solution
-        self.initRun()
-
         # train surrogate on real evaluated solutions file
         self.train_surrogate()
         self.load_surrogate()