Commit Graph

1896 Commits

Author SHA1 Message Date
Archer.Bowen
9fd4c8b8dd #2734 - Updating developer_tools.rst to follow #2757 2024-07-17 11:54:53 +01:00
Archer.Bowen
bc660d651d 2734 - Initial User Guide Updates 2024-07-16 09:32:26 +01:00
Marek Wolan
99af67023a Updated VERSION 2024-07-15 13:41:01 +00:00
Christopher McCarthy
e824391ae3 Merged PR 462: retrospectively added the 3.1.0 benchmark results
retrospectively added the 3.1.0 benchmark results
2024-07-13 19:00:23 +00:00
Chris McCarthy
951fd30e03 retrospectively added the 3.1.0 benchmark results 2024-07-13 19:58:41 +01:00
Marek Wolan
a1690fe1e3 Merged PR 459: fix test problems and slowness
Related work items: #2747
2024-07-12 11:49:20 +00:00
Marek Wolan
104d033053 Merge remote-tracking branch 'origin/dev' into fix-slow-tests 2024-07-12 11:29:46 +01:00
Marek Wolan
199cd0d9df fix test problems and slowness 2024-07-12 11:23:41 +01:00
Christopher McCarthy
2f649a302c Merged PR 458: Carry over airspace hotfixes from internal
## Summary
Carried over hit fixes from internal that backtracked on the complex channel width stuff for now and focussed on getting a stable data rate baked in for each frequency.  Implemented overriding of frequency max capacities on the airspace. updated documentation to reflect the changes in airspace.py.

## Test process
- Original tests still work
- Tested reading the frequency capacity overrides from config file
- Tested that setting the frequency override to 0.0 blocks the channel

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2745
2024-07-12 10:17:25 +00:00
Marek Wolan
9a0164c254 Merged PR 454: Action masking support
## Summary
* Add action masking to environments
* add notebook demonstrating action masking

## Test process
* E2E test for SB3, Ray SARL, and Ray MARL
* integration test to check if the contents of the action mask change accordingly when statuses of components change

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [x] updated the **documentation** if this PR changes or adds functionality
- [x] written/updated **design docs** if this PR implements new functionality
  - https://dev.azure.com/ma-dev-uk/PrimAITE/_wiki/wikis/PrimAITE.wiki/703/Action-Masking
- [ ] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

Related work items: #2623
2024-07-12 08:14:47 +00:00
Chris McCarthy
cde632066c #2745 implemented overriding of frequency max capacities on the airspace. updated documentation to reflect the changes in airspace.py. 2024-07-11 21:11:27 +01:00
Marek Wolan
e759ae5990 2623 fix issues with tests and revert request show method 2024-07-11 17:44:31 +01:00
Marek Wolan
3af22ac2ed Merge remote-tracking branch 'origin/dev' into feature/2623-action-masking 2024-07-11 15:50:42 +01:00
Marek Wolan
abbfc86942 2623 update defaults 2024-07-11 15:50:35 +01:00
Chris McCarthy
cf563149ec #2745 carried over changes from internal that backtracked on the complex channel width stuff for now and focussed on getting a stable data rate baked in for each frequency 2024-07-11 15:07:58 +01:00
Czar Echavez
a527b8798e Merged PR 455: Add folder and file request permissions validators
## Summary
Implemented the last of the request validators from https://dev.azure.com/ma-dev-uk/PrimAITE/_wiki/wikis/PrimAITE.wiki/703/Action-Masking

files and folders validators

## Test process
integration tests for files and folders
added unit tests for previous validators as well

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2740
2024-07-11 13:59:44 +00:00
Czar Echavez
9636882ed1 #2740: refactor variable 2024-07-11 13:57:23 +01:00
Archer Bowen
643318d090 Merged PR 453: Agent Logging - #2716
## Summary
This PR is intends to introduce a new log for agents. Taking heavy inspiration from sys_log, this implementation grants each agent their own individual logger (inherited by abstractagent).

![image.png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/453/attachments/image.png)

![image (2).png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/453/attachments/image%20%282%29.png)

## Test process
Dev-mode CLI, the show method and the manually checking the logs via file explorer.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2716
2024-07-11 11:47:17 +00:00
Czar Echavez
1d466d6807 #2740: unit tests + a minor fix to nic test 2024-07-11 12:19:27 +01:00
Archer.Bowen
b8c6238610 #2740 Fixed Nmap Test Failure. 2024-07-11 11:55:03 +01:00
Marek Wolan
579469d1c3 2623 add sb3 contrib dependency 2024-07-11 11:25:38 +01:00
Marek Wolan
bdf5ff2167 2623 Add docs for action masking 2024-07-11 10:01:33 +01:00
Czar Echavez
aa425a5284 #2740: fix tests affected by request permissions 2024-07-10 14:40:25 +01:00
Archer.Bowen
9e7fd017df #2716 Fixed game.py pre-commit issue. 2024-07-10 14:04:52 +01:00
Archer.Bowen
2bedf0c363 Updated changelog 2024-07-10 13:56:33 +01:00
Marek Wolan
0c58c3969a 2623 - finish testing action mask 2024-07-10 13:46:30 +01:00
Archer.Bowen
feb9763f62 Merge https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE into feature/2716-Red-Agent-Logging 2024-07-10 13:40:54 +01:00
Archer.Bowen
239f5b86c0 #2716 Agent logging now sits outside of the simulation output log directory, updated dev-mode CLI to include agent logging and added additional tests. 2024-07-10 13:36:37 +01:00
Czar Echavez
caa6a4809c #2740: tests + implement file request validators 2024-07-10 13:14:22 +01:00
Marek Wolan
7201b7b8e0 2623 Add e2e tests for action masking 2024-07-10 11:01:42 +01:00
Czar Echavez
7cb9bc8dd9 Merge remote-tracking branch 'origin/dev' into feature/2740-add-request-permissions-validator-to-files-and-folder-actions 2024-07-10 10:19:28 +01:00
Christopher McCarthy
2c46fb8b04 Merged PR 452: Automate the benchmark process
## Summary
This pull request integrates full automation of the PrimAITE benchmarking process into our Azure DevOps pipeline, enhancing consistency and minimizing manual effort.

#### Key Changes:

1.  **Pipeline Automation**: Configured to trigger on commits to `dev` and `release` branches, with scheduled runs during off-peak hours.

2.  **Error Handling Improvements**: The pipeline is set to fail on any Python execution errors, ensuring immediate identification of issues.

3.  **Artifact Publishing**: Benchmark results are now automatically compressed and published as artifacts, facilitating easy access and analysis.

## Test process
Tested the pipeline runs from end-to-end and produces a working benchmark report: https://dev.azure.com/ma-dev-uk/PrimAITE/_build/results?buildId=5280&view=results

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2739
2024-07-09 19:39:27 +00:00
Christopher McCarthy
2eb9d970bf Apply suggestions from code review 2024-07-09 19:25:13 +00:00
Archer.Bowen
48645d2e72 #2716 Initial Implementation + Initial Tests and updated changelog and sphinx documentation. 2024-07-09 16:46:31 +01:00
Czar Echavez
20b9b61be5 #2740: added ability to merge validators + validators for folders 2024-07-09 16:44:02 +01:00
Marek Wolan
faf268a9b9 2623 move action mask generation to game and fix MARL masking 2024-07-09 15:59:50 +01:00
Marek Wolan
5367f9ad53 2623 Ray single agent action masking 2024-07-09 15:27:03 +01:00
Marek Wolan
470fa28ee1 2623 Implement basic action masking logic 2024-07-09 13:13:13 +01:00
Christopher McCarthy
b45f6bbd40 Merged PR 447: Bandwidth load / capacity checks before transmission
## Summary

This pull request introduces significant enhancements to the AirSpace class within our network simulation software, aimed at improving the realism, configurability, and accuracy of wireless network simulations. These changes include the addition of new enums and attributes, enhancements to the configuration schema, and improvements in bandwidth management and transmission logic.

**Additions**

-   **Enums and Attributes:**

-   **AirSpaceEnvironmentType Enum**: Defines various environmental settings that affect wireless signal propagation and interference.
-   **ChannelWidth Enum**: Specifies available channel width options for wireless interfaces.
-   **Channel Width Attribute**: Added to WirelessNetworkInterface for dynamic adjustments based on the operational environment.
-   **airspace_key Attribute**: A tuple identifying the frequency and channel width combination for bandwidth management.
-   **airspace_environment_type Attribute**: Sets the overall environmental context of the airspace, influencing all contained devices.

-   **Functional Enhancements:**

-   **SNR and Capacity Calculation Functions**: New functions estimate_snr and calculate_total_channel_capacity have been implemented to compute signal-to-noise ratios and channel capacities dynamically.
-   **show_bandwidth_load Function**: Provides a visual representation of the current bandwidth load across different channels.
-   **Dynamic Speed Setting**: The speed attribute of WirelessInterface is now adjusted dynamically based on frequency, channel width, and environment.

-   **Configuration and Testing:**

-   **Configuration Schema Update**: The simulation.network config file schema now supports setting the airspace_environment_type.

**Changes**

-   **Interface and Performance Adjustments:**

-   **NetworkInterface Speed Type**: Changed from int to float for more precise speed definitions.
-   **Transmission Feasibility Check**: Updated the _can_transmit function in Link to better handle current load and bandwidth capacities.
-   **WirelessRouter Configurations**: The configure_wireless_access_point function now takes channel_width as an additional parameter.
-   **Grouping Adjustments**: WirelessNetworkInterfaces are now categorized by both AirSpaceFrequency and ChannelWidth.

-   **Transmission Logic Overhaul:**

-   **Interface Adjustments**: Modifying an interface's settings now necessitates its temporary removal from the airspace, followed by a recalculation of its data rate and reintegration under new settings.
-   **Blocking Overloads**: Strengthened the logic in AirSpace to prevent transmissions that would surpass the available capacity.

**Fixes**

-   **Transmission Permission Logic**: Fixed the can_transmit_frame function to accurately enforce transmission limits based on current network load and available bandwidth.

**Conclusion**

These updates significantly enhance the fidelity and flexibility of our network simulation tool, enabling more accurate m...
2024-07-09 10:47:56 +00:00
Czar Echavez
1fdd05a0d1 Merged PR 449: #2688: apply the request validators + fixing the fix duration test + refactor...
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2688: apply the request validators + fixing the fix duration test + refactor test class names

Related work items: #2688
2024-07-09 08:26:31 +00:00
Czar Echavez
a3f74087fa #2688: refactor test classes 2024-07-08 15:26:30 +01:00
Marek Wolan
cbf54d442c #2623 Make it possible to view currently valid simulation requests 2024-07-08 15:17:35 +01:00
Czar Echavez
829a6371de #2688: tests 2024-07-08 14:39:37 +01:00
Christopher McCarthy
2d2f2df360 Added set -e to the Run Benchmark Script step in azure-benchmark-pipeline.yaml so that the pipeline fails if the python script fails. 2024-07-08 08:26:52 +00:00
Christopher McCarthy
2a003eece9 Updated v3.0.0_benchmark_metadata.json so that combined_av_reward_per_episode is now named combined_total_reward_per_episode to match the new script 2024-07-08 08:25:05 +00:00
Chris McCarthy
c146992307 #2739 - updated azure-benchmark-pipeline.yaml to run on ubuntu-latest while we wait for authorisation to use the yak pool 2024-07-05 17:02:35 +01:00
Chris McCarthy
5e8343ca91 #2739 - update job name in azure-benchmark-pipeline.yaml 2024-07-05 16:57:40 +01:00
Chris McCarthy
7173c329b0 #2739 - Updated azure-benchmark-pipeline.yaml to allow it to run for unlimited time on the Imaginary Yak Pool 2024-07-05 16:56:07 +01:00
Chris McCarthy
4410e05e3e #2967 - Updated the DB filesize so that it doesn't fill the 100mbit link. moved the can transmit checks to the network interface to enable frame dropped syslog. narrowed the scope of the NODE_NMAP_PORT_SCAN action in nmap_port_scan_red_agent_config.yaml to select ports and protocols as the link was filling up on the full box scan. 2024-07-05 16:27:03 +01:00
Czar Echavez
2a0695d0d1 #2688: apply the request validators + fixing the fix duration test + refactor test class names 2024-07-05 15:06:17 +01:00