saealib.PostAskEvent#

class saealib.PostAskEvent(ctx, candidates=None)[source]#

Bases: Event

Fired after the full ask step (post crossover and mutation).

candidates is exposed for observation only; reassigning it does not change the pipeline’s output. Whether an in-place edit is picked up depends on the algorithm: some (e.g. PSO) dispatch this event after the candidates have already been copied into the offspring population, so even in-place changes have no effect. Do not rely on either form of mutation here; to actually alter ask output, use with_post(fn) on the relevant Crossover/Mutation instance instead.

Parameters:
  • ctx (_EventContext)

  • candidates (ndarray | None)

Methods

Method Details

PostAskEvent.__init__(ctx, candidates=None)#
Parameters:
  • ctx (_EventContext)

  • candidates (ndarray | None)

Return type:

None