Skip to content

Commit

Permalink
[cocopp] budget crosses are now at max(median(rt_s), median(rt_u))
Browse files Browse the repository at this point in the history
  • Loading branch information
nikohansen committed Jun 26, 2024
1 parent 68baeb8 commit 3882ef6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions code-postprocessing/cocopp/compall/pprldmany.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import os
import warnings
from pdb import set_trace
import collections
import numpy as np
import matplotlib.pyplot as plt
from .. import toolsstats, bestalg, genericsettings, testbedsettings
Expand Down Expand Up @@ -644,7 +644,7 @@ def main(dictAlg, order=None, outputdir='.', info='default',
print('Crafting effort for', alg, 'is', CrE)

dictData = {} # list of (ert per function) per algorithm
dictMaxEvals = {} # list of (maxevals per function) per algorithm
dictMaxEvals = collections.defaultdict(list) # list of (maxevals per function) per algorithm

# funcsolved = [set()] * len(targets) # number of functions solved per target
xbest = []
Expand Down Expand Up @@ -736,7 +736,12 @@ def main(dictAlg, order=None, outputdir='.', info='default',
elif plotType == PlotType.FUNC:
keyValue = 'f%d' % (f)
dictData.setdefault(keyValue, []).extend(x)
dictMaxEvals.setdefault(keyValue, []).extend(runlengthunsucc)
# dictMaxEvals.setdefault(keyValue, []).extend(runlengthunsucc)
if len(runlengthunsucc):
maxmed = np.median(runlengthunsucc)
if len(runlengthsucc):
maxmed = max((maxmed, np.median(runlengthsucc)))
dictMaxEvals[keyValue].append(maxmed)

displaybest = plotType == PlotType.ALG
if displaybest:
Expand Down

0 comments on commit 3882ef6

Please sign in to comment.