Opened 20 months ago

Closed 4 weeks ago

Last modified 39 hours ago

#2524 closed feature request (done)

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 (19)

comment:1 Changed 20 months ago by jkarder

  • Status changed from new to accepted

comment:2 Changed 20 months ago by jkarder

comment:3 Changed 20 months ago by jkarder

r13378: made BasicAlgorithm pausable

comment:4 Changed 19 months ago by ascheibe

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

comment:5 Changed 14 months ago by ascheibe

  • Owner changed from ascheibe to mkommend

comment:6 Changed 8 months ago by jkarder

  • Milestone changed from HeuristicLab 4.0 to HeuristicLab 3.3.15

comment:7 Changed 8 months ago by mkommend

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

comment:8 Changed 7 months ago by jkarder

  • Status changed from assigned to accepted

comment:9 Changed 7 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 7 months ago by jkarder

r14517: made BasicAlgorithm pausable

comment:11 follow-up: Changed 7 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 7 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 7 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 3 months 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 3 months 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?

comment:16 Changed 5 weeks ago by gkronber

  • Status changed from reviewing to readytorelease

Reviewed r14523 and r14527.

comment:17 Changed 5 weeks ago by gkronber

r15061: merged r14517, r14523, r14527 from trunk to branch

comment:18 Changed 4 weeks ago by gkronber

  • Resolution set to done
  • Status changed from readytorelease to closed

comment:19 in reply to: ↑ 11 Changed 39 hours ago by abeham

Replying to 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

You did not disable pause for P3 as claimed in the description. SupportsPause is overriden returning true. Is the description wrong or was this intentional?

Note: See TracTickets for help on using tickets.