Enhance AI and simulation components with presence management and routing capabilities
ci / server (push) Failing after 3m39s
ci / client (push) Successful in 14s

- 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:
Leonid Pershin
2026-08-19 16:33:52 +03:00
parent c16c34a83c
commit 4137400621
50 changed files with 1978 additions and 57 deletions
@@ -5,6 +5,7 @@
"seatThing": "StudentDesk",
"defaultSeats": 16,
"works": ["TeachLesson"],
"travelMinutes": 0.5,
},
{
"defName": "Library",
@@ -14,6 +15,7 @@
],
"positions": ["Librarian"],
"works": ["LibraryWork"],
"travelMinutes": 0.5,
},
{
"defName": "ComputerLab",
@@ -23,5 +25,6 @@
{ "key": "computers", "thing": "Computer", "count": 12 },
],
"works": ["TeachLesson"],
"travelMinutes": 0.5,
},
]
@@ -1,5 +1,5 @@
[
// Walkable rooms that exist to connect the graph: lobby, stairs. Empty on purpose.
{ "defName": "EntranceHall" },
{ "defName": "Stairwell" },
{ "defName": "EntranceHall", "travelMinutes": 1 },
{ "defName": "Stairwell", "travelMinutes": 1.5 },
]
@@ -1,2 +1,2 @@
// Empty on purpose: a corridor is a walkable room with no furniture of its own.
{ "defName": "Corridor" }
{ "defName": "Corridor", "travelMinutes": 1.5 }
@@ -4,4 +4,5 @@
{ "key": "benches", "thing": "Bench", "count": 4 },
],
"works": ["PELesson"],
"travelMinutes": 0.5,
}
@@ -7,4 +7,5 @@
],
"positions": ["Principal"],
"works": ["PrincipalOfficeWork", "TeachLesson", "WalkSchool"],
"travelMinutes": 0.5,
}
@@ -7,6 +7,7 @@
],
"positions": ["Secretary"],
"works": ["OfficeWork"],
"travelMinutes": 0.5,
},
{
"defName": "TeachersRoom",
@@ -14,6 +15,7 @@
{ "key": "table", "thing": "DiningTable" },
{ "key": "chairs", "thing": "Chair", "count": 6 },
],
"travelMinutes": 0.5,
},
{
"defName": "Cafeteria",
@@ -23,9 +25,11 @@
],
"positions": ["CafeteriaCook"],
"works": ["ServeLunch"],
"travelMinutes": 0.5,
},
{
"defName": "Restroom",
"travelMinutes": 0.5,
},
{
"defName": "MedicalOffice",
@@ -35,11 +39,13 @@
],
"positions": ["Nurse"],
"works": ["MedicalDuty"],
"travelMinutes": 0.5,
},
{
"defName": "ChangingRoom",
"slots": [
{ "key": "lockers", "thing": "Locker", "count": 12 },
],
"travelMinutes": 0.5,
},
]
@@ -1 +1 @@
{ "defName": "SchoolYard" }
{ "defName": "SchoolYard", "travelMinutes": 3 }
@@ -2,6 +2,7 @@
{
"defName": "Diligent",
"weight": 8,
"commuteMinutes": 4,
"incompatible": ["Lazy", "AbsentMinded"],
"skillModifiers": [
{ "skill": "Mathematics", "offset": 8 },
@@ -47,6 +48,7 @@
"defName": "Lazy",
"weight": 6,
"incompatible": ["Diligent"],
"commuteMinutes": -4,
"skillModifiers": [
{ "skill": "PhysicalEducation", "offset": -8 },
{ "skill": "Mathematics", "offset": -6 },