1 parent 9a0dd3e commit c5d75dcCopy full SHA for c5d75dc
1 file changed
build/python/src/cocoex/noiser.py
@@ -56,11 +56,12 @@ class Noisifier:
56
### prepare
57
suite = cocoex.Suite(suite_name, "", "")
58
observer = cocoex.Observer(suite_name, "")
59
+ noisifier = cocoex.noiser.Noisifier() # wrapper without internal state
60
61
### go
62
for problem in suite: # this loop may take several minutes or more
63
problem.observe_with(observer) # generates the data for cocopp
- problem = cocoex.noiser.Noisifier().noisify(problem) # a Noisifier
64
+ problem = noisifier.noisify(problem) # wrap problem as noisy
65
fmin(problem, problem.initial_solution, disp=False)
66
67
The `problem` is now a `Noisifier` but it still abides by the interface
0 commit comments