Policies#
smart_control.reinforcement_learning.policies.schedule_policy
#
Reinforcement learning schedule policies.
ScheduleEvent
dataclass
#
ScheduleEvent(
start_time: Timedelta,
device: DeviceType,
setpoint_name: SetpointName,
setpoint_value: SetpointValue,
)
An event that sets a specific value at a specific time.
SchedulePolicy
#
SchedulePolicy(
time_step_spec,
action_spec: NestedTensorSpec,
action_sequence: ActionSequence,
weekday_schedule: Schedule,
weekend_schedule: Schedule,
dow_sin_index: int,
dow_cos_index: int,
hod_sin_index: int,
hod_cos_index: int,
action_normalizers: dict,
local_start_time: Timestamp,
name: Optional[str] = None,
)
Bases: TFPolicy
Policy that selects actions based on time-dependent schedules.
create_baseline_schedule_policy
#
Create baseline schedule policy.
This is the baseline default policy that we use for benchmarking / initial data collection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tf_env
|
TFPyEnvironment
|
The TFPyEnvironment to interact with. |
required |
Returns:
Type | Description |
---|---|
SchedulePolicy
|
The schedule policy. |
get_active_setpoint
#
get_active_setpoint(
schedule: Schedule,
device: DeviceType,
setpoint_name: SetpointName,
timestamp: Timedelta,
) -> SetpointValue
Find the active setpoint value at a given time.