Opened 18 months ago

Last modified 2 weeks ago

#2524 reviewing feature request

It should be possible to pause BasicAlgorithms

Reported by: jkarder Owned by: gkronber
Priority: medium Milestone: HeuristicLab 3.3.15
Component: Optimization Version: 3.3.14
Keywords: Cc:

Description

BasicAlgorithms can only be prepared, started and stopped, not paused/resumed.

Change History (15)

comment:1 Changed 18 months ago by jkarder

  • Status changed from new to accepted

comment:2 Changed 18 months ago by jkarder

comment:3 Changed 18 months ago by jkarder

r13378: made BasicAlgorithm pausable

comment:4 Changed 17 months ago by ascheibe

  • Owner changed from jkarder to ascheibe
  • Status changed from accepted to reviewing

comment:5 Changed 11 months ago by ascheibe

  • Owner changed from ascheibe to mkommend

comment:6 Changed 6 months ago by jkarder

  • Milestone changed from HeuristicLab 4.0 to HeuristicLab 3.3.15

comment:7 Changed 6 months ago by mkommend

  • Owner changed from mkommend to jkarder
  • Status changed from reviewing to assigned

comment:8 Changed 5 months ago by jkarder

  • Status changed from assigned to accepted

comment:9 Changed 5 months ago by jkarder

  • Version changed from branch to 3.3.14

Disregard r13371 and r13378. I will implement this directly in the trunk.

comment:10 Changed 5 months ago by jkarder

r14517: made BasicAlgorithm pausable

comment:11 Changed 5 months ago by mkommend

r14523:

  • Renamed pausable to SupportsPause
  • Changed SupportsPause field to abstract property that has to be implemented
  • Stored initialization flag in BasicAlgorithm
  • Changed CancellationToken access to use the according property
  • Adapted HillClimber to new pausing mechanism
  • Disabled pause for PPP, because it does not work correctly
  • Derived FixedDataAnalysisAlgorithm from BasicAlgorithm
  • Changed base class of all data analysis algorithm from BasicAlgorithm to FixedDataAnalysisAlgorithm

comment:12 Changed 5 months ago by jkarder

r14527:

  • made sure that P3 results are updated after cancellation
  • fixed unit tests to also call Initialize

comment:13 follow-up: Changed 4 months ago by abeham

  • Changed SupportsPause field to abstract property that has to be implemented

Why not virtual and default to false?

comment:14 in reply to: ↑ 13 Changed 2 weeks ago by jkarder

Replying to abeham:

  • Changed SupportsPause field to abstract property that has to be implemented

Why not virtual and default to false?

This way you have to explicitly think about whether or not you make your algorithm pausable.

comment:15 Changed 2 weeks ago by jkarder

  • Owner changed from jkarder to gkronber
  • Status changed from accepted to reviewing

I think mkommend already reviewed r14517. Could you please have a look at r14523 and r14527?

Note: See TracTickets for help on using tickets.