saealib.EvaluationPlanStage#

class saealib.EvaluationPlanStage(planner=None, n_eval=None)[ソース]#

ベースクラス: Stage

Create an owned request and pending record.

Increments state.decision_count by exactly one whenever a genuinely new plan is confirmed (the branch that calls the planner and builds pending_evaluations), never on a continuation of an already-pending multi-request plan. One decision covers the whole confirmed EvaluationPlan, however many candidates its requests evaluate. decision_count counts a genuinely new evaluation plan confirmed by the runtime regardless of execution mode: this method increments it for synchronous execution; AsyncEvaluationSubmitStage (which execute_async() delegates to) increments it the same way for async/steady-state execution.

パラメータ:

planner (EvaluationPlanner | None)

Methods

__init__

Initialize base Stage attributes.

contract

Return this stage's structural and direct state-access contract.

execute

Execute this stage and return the updated state.

execute_async

Submit through the public async execution seam.

has_async_work

to_pseudocode

Render this stage as a LaTeX algorithmic line.

to_text

Render this stage as a plain-text algorithmic line.

Method Details

EvaluationPlanStage.__init__(planner=None, n_eval=None)[ソース]#

Initialize base Stage attributes.

パラメータ:
  • name (str, optional) -- Override the class-level name.

  • label (str, optional) -- Override the class-level label.

  • notation (str, optional) -- Override the class-level notation.

  • planner (EvaluationPlanner | None)

戻り値の型:

None

EvaluationPlanStage.contract()[ソース]#

Return this stage's structural and direct state-access contract.

戻り値の型:

ComponentContract

EvaluationPlanStage.execute(state)[ソース]#

Execute this stage and return the updated state.

パラメータ:

state (OptimizationState) -- Current optimization state.

戻り値:

Updated state.

戻り値の型:

OptimizationState

EvaluationPlanStage.execute_async(state, *, scheduler, feedback_builder=None, algorithm=None, callback_manager=None, prefix=None, strategy=None)[ソース]#

Submit through the public async execution seam.

Runtime supplies lifecycle services and a prefix callback; planning and refill decisions remain owned by this stage.

パラメータ:
  • state (OptimizationState)

  • scheduler (Any)

  • feedback_builder (FeedbackBuilder | None)

  • algorithm (Any)

  • callback_manager (Any)

  • strategy (Any)

戻り値の型:

OptimizationState

EvaluationPlanStage.has_async_work(state)[ソース]#
パラメータ:

state (OptimizationState)

戻り値の型:

bool

EvaluationPlanStage.to_pseudocode(*, expand=False, indent=0)#

Render this stage as a LaTeX algorithmic line.

パラメータ:
  • expand (bool) -- If True and this stage has sub-stages, recursively expand them.

  • indent (int) -- Current indentation level (number of \State indent steps).

戻り値:

LaTeX algorithmic fragment.

戻り値の型:

str

EvaluationPlanStage.to_text(*, expand=False, indent=0)#

Render this stage as a plain-text algorithmic line.

パラメータ:
  • expand (bool)

  • indent (int)

戻り値の型:

str