#2563: apply PR suggestions

This commit is contained in:
Czar Echavez
2024-05-29 12:01:14 +01:00
parent 69aa12f49b
commit d62ce7f86b

View File

@@ -4,7 +4,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Getting Information out of PrimAITE" "# Getting information out of PrimAITE"
] ]
}, },
{ {
@@ -62,9 +62,9 @@
"\n", "\n",
"The state of the simulation object is used to determine the observation space used by agents.\n", "The state of the simulation object is used to determine the observation space used by agents.\n",
"\n", "\n",
"Any object created using the ``SimComponent`` class has a state which can show the state of the object.\n", "Any object created using the ``SimComponent`` class has a ``describe_state`` method which can show the state of the object.\n",
"\n", "\n",
"An example of such an object is ``Computer``. In the default network configuration, ``client_1`` is a Computer object." "An example of such an object is ``Computer`` which inherits from ``SimComponent``. In the default network configuration, ``client_1`` is a Computer object."
] ]
}, },
{ {
@@ -81,9 +81,9 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"### More specific describe state\n", "### More specific describe_state\n",
"\n", "\n",
"As you can see, the describe state for the computer also includes the describe state for all the components (i.e. Software) within it. This can cause a large describe state output.\n", "As you can see, the output from the ``describe_state`` method for the ``Computer`` object includes the describe state for all its components. This can cause a large describe state output.\n",
"\n", "\n",
"As stated, the ``describe_state`` can be called on any object that inherits ``SimComponent``. This can allow you retrieve the state of a specific item." "As stated, the ``describe_state`` can be called on any object that inherits ``SimComponent``. This can allow you retrieve the state of a specific item."
] ]
@@ -103,7 +103,7 @@
"source": [ "source": [
"## System Logs\n", "## System Logs\n",
"\n", "\n",
"Objects that inherit from the ``Node`` class will inherit the ``sys_logs`` property.\n", "Objects that inherit from the ``Node`` class will inherit the ``sys_log`` attribute.\n",
"\n", "\n",
"This is to simulate the idea that items such as Computer, Routers, Servers, etc. have a logging system used to diagnose problems." "This is to simulate the idea that items such as Computer, Routers, Servers, etc. have a logging system used to diagnose problems."
] ]
@@ -119,7 +119,7 @@
"was_enabled = PRIMAITE_CONFIG[\"developer_mode\"][\"enabled\"]\n", "was_enabled = PRIMAITE_CONFIG[\"developer_mode\"][\"enabled\"]\n",
"was_syslogs_enabled = PRIMAITE_CONFIG[\"developer_mode\"][\"output_sys_logs\"]\n", "was_syslogs_enabled = PRIMAITE_CONFIG[\"developer_mode\"][\"output_sys_logs\"]\n",
"\n", "\n",
"# # enable dev mode so that the default config outputs are overridden for this demo\n", "# enable dev mode so that the default config outputs are overridden for this demo\n",
"PRIMAITE_CONFIG[\"developer_mode\"][\"enabled\"] = True\n", "PRIMAITE_CONFIG[\"developer_mode\"][\"enabled\"] = True\n",
"PRIMAITE_CONFIG[\"developer_mode\"][\"output_sys_logs\"] = True\n", "PRIMAITE_CONFIG[\"developer_mode\"][\"output_sys_logs\"] = True\n",
"\n", "\n",
@@ -138,7 +138,7 @@
"\n", "\n",
"\n", "\n",
"\n", "\n",
"# # restore config\n", "# restore config\n",
"PRIMAITE_CONFIG[\"developer_mode\"][\"enabled\"] = was_enabled\n", "PRIMAITE_CONFIG[\"developer_mode\"][\"enabled\"] = was_enabled\n",
"PRIMAITE_CONFIG[\"developer_mode\"][\"output_sys_logs\"] = was_syslogs_enabled" "PRIMAITE_CONFIG[\"developer_mode\"][\"output_sys_logs\"] = was_syslogs_enabled"
] ]