khora_agents/physics_agent/mod.rs
1// Copyright 2025 eraflo
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Acts as the **[A]gent** for the physics subsystem, fulfilling the role of an ISA.
16//!
17//! This module provides the high-level, tactical logic for the physics simulation.
18//! It is responsible for configuring and dispatching the various `physics_lanes`
19//! (e.g., broadphase, solver, integration) that perform the actual calculations.
20//!
21//! As an **Intelligent Subsystem Agent (ISA)**, its responsibilities will include:
22//! - Reporting the simulation's performance and resource cost to the DCC.
23//! - Managing multiple strategies, such as switching between a high-precision but
24//! slow physics solver and a faster, less precise one.
25//! - Adapting simulation parameters (e.g., timestep frequency) based on the budget
26//! allocated by GORNA to maintain stability or performance.