feat: Introduce a new simulation dashboard editor with block and element components, dedicated styling, visualization state management, and an analyzer.

This commit is contained in:
2025-12-20 09:43:28 +05:30
parent c072648397
commit 525bfb6541
6 changed files with 77 additions and 84 deletions

View File

@@ -1376,17 +1376,18 @@ function Analyzer() {
// Occupancy trends
const timestamp = new Date().toISOString();
if (!historicalDataRef.current[storage.modelUuid]) {
historicalDataRef.current[storage.modelUuid] = [];
}
historicalDataRef.current[storage.modelUuid].push({
timestamp,
currentLoad,
utilizationRate,
operation: storeOps > retrieveOps ? "store" : "retrieve",
totalOps,
state: storage.state,
});
const currentData = historicalDataRef.current[storage.modelUuid] || [];
historicalDataRef.current[storage.modelUuid] = [
...currentData,
{
timestamp,
currentLoad,
utilizationRate,
operation: storeOps > retrieveOps ? "store" : "retrieve",
totalOps,
state: storage.state,
},
].slice(-100);
// Calculate peak occupancy from historical data
const occupancyData = historicalDataRef.current[storage.modelUuid] || [];