Skip to content

Optimization Workflows

ropt.workflow

Optimization workflow functionality.

ropt.workflow.create_compute_step

create_compute_step(
    method: str, **kwargs: Any
) -> ComputeStep

Create a new compute step.

Parameters:

Name Type Description Default
method str

The method string to find the compute step.

required
kwargs Any

Optional keyword arguments passed to the compute step init.

{}

ropt.workflow.create_event_handler

create_event_handler(
    method: str, **kwargs: Any
) -> EventHandler

Create a new event handler.

Parameters:

Name Type Description Default
method str

The method string to find the handler.

required
kwargs Any

Optional keyword arguments passed to the handler init.

{}

ropt.workflow.create_evaluator

create_evaluator(method: str, **kwargs: Any) -> Evaluator

Create a new evaluator.

Parameters:

Name Type Description Default
method str

The method string to find the evaluator.

required
kwargs Any

Optional keyword arguments passed to the evaluator init.

{}

ropt.workflow.Event dataclass

Stores data related to an optimization event.

During the execution of an optimization workflow, events are triggered to signal specific occurrences. Callbacks can be registered to react to these events and will receive an Event object containing relevant information.

The specific data within the Event object varies depending on the event type. See the EventType documentation for details.

Attributes:

Name Type Description
event_type EventType

The type of event that occurred.

data dict[str, Any]

A dictionary containing additional event-specific data.