Skip to content

Commit

Permalink
fiddling
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkWolters committed Apr 16, 2024
1 parent 4c30fd7 commit bebe0e8
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -52,11 +52,9 @@ protected FrameResult nextFrame() {
);
} else if (best.index() == last.index() - 1) {
// got worse consecutively, this may be collapsed out since the general case below covers it (test first)
if (((last.params().paramValues()[0] + config.step_value()) -
(best.params().paramValues()[0] + config.step_value())) <= config.step_value()) {
logger.info("could not divide search space further, stop condition met");
return new FrameResult(best.params().paramValues()[0], SimFrameAction.stop_run);
} else {
// if (((last.params().paramValues()[0] + config.step_value()) -
// (best.params().paramValues()[0] + config.step_value())) <= config.step_value()) {
logger.info("First worse result, rerunning with longer sample time");
newValue = best.params().paramValues()[0] + config.step_value();
config = new FindmaxConfig(
(config.sample_time_ms() * config.sample_incr()),
Expand All @@ -70,7 +68,7 @@ protected FrameResult nextFrame() {
config.optimization_type(),
new double[]{newValue}
);
}
//}
} else { // any other case
// find next frame with higher rate but lower value, the closest one by rate
SimFrame<FindmaxFrameParams> nextWorseFrameWithHigherRate = function.getJournal().frames().stream()
Expand Down

0 comments on commit bebe0e8

Please sign in to comment.