yawning_titan.envs.specific.core.nsa_node#

Classes

Node

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

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

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

__init__()[source]#
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