Enhance AI and simulation components with presence management and routing capabilities
- Introduced the `HSchool.Ai` project, responsible for routing, day plans, and presence management. - Updated the `HSchool.Simulation` project to integrate with the new AI functionalities, improving decision-making and presence tracking. - Added `travelMinutes` to room and territory definitions, ensuring accurate movement calculations within the simulation. - Enhanced the `School` class to manage presence and implement empty-time skipping functionality. - Updated documentation to reflect the new AI features and their impact on school simulation. - Added tests for presence management and routing to ensure robust functionality and reliability.
This commit is contained in:
@@ -50,6 +50,17 @@ public sealed class GameClock
|
||||
|
||||
public static bool IsValidStartDate(DateTime date) => date >= MinStartDate && date <= MaxStartDate;
|
||||
|
||||
/// <summary>Empty-time skip. Not a tick — the calendar jumps to an instant already known to be legal.</summary>
|
||||
public void JumpTo(DateTime time)
|
||||
{
|
||||
if (!IsValidStartDate(time))
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(time), time, "Jump target is outside the supported range.");
|
||||
}
|
||||
|
||||
Time = DateTime.SpecifyKind(time, DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advances the calendar by one fixed step of <paramref name="realSeconds"/>, scaled by the
|
||||
/// base rate and the current speed. Does nothing while paused.
|
||||
|
||||
Reference in New Issue
Block a user