yawning_titan.envs.specific.core.nsa_node.Node#

class yawning_titan.envs.specific.core.nsa_node.Node[source]#

Bases: object

Class representing a the state of single node within the Ridley 17 inspired environment.

Methods

change_compromised

Change the compromised status of a node.

change_isolated

Change the isolation status of a node.

get_condition

Return the condition of the node.

get_condition()[source]#

Return the condition of the node.

Returns:

a list containing the isolation and compromised status of the node ([bool, bool])

Return type:

reward

change_isolated()[source]#

Change the isolation status of a node.

Flips it so if it was true it becomes false and vice versa

change_compromised(mode)[source]#

Change the compromised status of a node.

Parameters:

mode – either 0, 1 or 2 0: does nothing 1: changes the node to safe 2: changes the node to compromised