5 Commits

Author SHA1 Message Date
Tuan-Dat Tran
f9d48e6fe4 fix(simulation): Evaluation of age was based on hits instead of access_count
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 15:57:19 +01:00
Tuan-Dat Tran
a484d49128 fix(simulation): enhance client request process with progress tracking and refine metrics computation
- Added `tqdm` progress bar to track simulation progress in real-time.
- Improved computation of hit rates and average ages for better accuracy.
- Updated data export logic for clearer output and better insights.
Reran Experiments

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 15:21:56 +01:00
Tuan-Dat Tran
09b943e41d fix(simulation): correct exponential sampling and cache behavior logic
- Fixed incorrect use of exponential sampling for `next_request` and `next_refresh` timings.
- Adjusted cache eviction logic to properly handle capacity checks.
- Improved simulation output and logging for least accessed objects.
- Corrected CSV export to include index labels for better data clarity.
- Reran experiments

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 11:19:04 +01:00
Tuan-Dat Tran
dea6004160 feat(cache-simulation): add avg_age metric and update TTL experiment name
- Introduced `avg_age` metric to track the average age of cached objects during simulation.
- Updated experiment configuration name from "No Refresh (0.5s ttl)" to "No Refresh (5.0s ttl)".
- Updated Jupyter notebooks and related files to incorporate new metrics and change experiment labels.
- Modified experiment output CSV and PDF files to reflect the new `avg_age` metric and updated experiment details.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-27 17:34:04 +01:00
Tuan-Dat Tran
6e8a742705 feat: add cache simulation with experiments for TTL and eviction strategies
Introduce a new simulation for Age of Information (AoI) cache management, focusing on varying TTL values and eviction strategies (LRU and Random Eviction). This includes:
- New Python script  for event-driven cache simulations using .
- Experiments for "No Refresh" across multiple TTL configurations (, , ..., ) with:
  - Hit rate and object age tracking (, , etc.).
  - Visualizations (e.g., , ).
- Updated  to describe experimental setup and configurations.
- Log export file () for simulation results.
- Refactor of  with detailed strategy configurations and runtime notes.

### Reason
The commit enhances the project by enabling detailed experiments with configurable cache parameters, supporting analysis of cache efficiency and AoI under varying conditions. This provides a foundation for more sophisticated simulations and insights.

### Performance
- Runtime: ~4m 29s for .

Co-authored experiments introduce structured data files and visualizations, improving clarity for future iterations.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-27 16:31:46 +01:00