How-to: Add Numerical Algorithms
To add a new numerical algorithm called “my_algorithm” to the simulation system,
perform the following steps:
- Create a new sub-directory called
my_algorithminside the directory:csle/simulation-system/libs/csle-agents/src/csle_agents/agents/Listing 177: Directory with numerical algorithms in CSLE.
- Implement the algorithm in a file called
my_algorithm.pyin the directory:csle/simulation-system/libs/csle-agents/src/csle_agents/agents/my_agentListing 178: Directory with algorithm implementation for the algorithm with the name `my_agent` in CSLE.
The implementation should be a Python class called
MyAlgorithmthat inherits from the classBaseAgent, which is defined in the file:csle/simulation-system/libs/csle-agents/src/csle_agents/agents/base/base_agent.pyListing 179: Base agent file in CSLE.
- Add an example of how to use the algorithm to the following folder:
csle/examplesListing 180: Directory with example usages of CSLE.