More descriptive debug msg
This commit is contained in:
@@ -78,19 +78,23 @@ def calculate_reward_function(
|
|||||||
start_step = ier_value.get_start_step()
|
start_step = ier_value.get_start_step()
|
||||||
stop_step = ier_value.get_end_step()
|
stop_step = ier_value.get_end_step()
|
||||||
if step_count >= start_step and step_count <= stop_step:
|
if step_count >= start_step and step_count <= stop_step:
|
||||||
if not ier_value.get_is_running() and reference_ier.get_is_running():
|
if not ier_value.get_is_running():
|
||||||
# what should happen if reference IER is blocked but live IER is running?
|
if reference_ier.get_is_running():
|
||||||
_LOGGER.debug(
|
ier_reward = (
|
||||||
(
|
config_values.green_ier_blocked
|
||||||
f"Applying penalty of "
|
* ier_value.get_mission_criticality()
|
||||||
f"{config_values.green_ier_blocked * ier_value.get_mission_criticality()} "
|
)
|
||||||
f"due to IER {ier_key} being blocked"
|
_LOGGER.debug(
|
||||||
|
f"Applying reward of {ier_reward} because IER {ier_key} is blocked"
|
||||||
|
)
|
||||||
|
reward_value += ier_reward
|
||||||
|
else:
|
||||||
|
_LOGGER.debug(
|
||||||
|
(
|
||||||
|
f"IER {ier_key} is blocked in the reference and live environments. "
|
||||||
|
f"Therefore, no penalty was applied."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
reward_value += (
|
|
||||||
config_values.green_ier_blocked
|
|
||||||
* ier_value.get_mission_criticality()
|
|
||||||
)
|
|
||||||
|
|
||||||
return reward_value
|
return reward_value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user