27 Commits

Author SHA1 Message Date
Tuan-Dat Tran
7d194176f0 feat(simulation): Added time spent in cache log for each object
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-04 16:38:39 +01:00
Tuan-Dat Tran
036789cc7c cleanup(plot): removed heatmap
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-03 15:31:03 +01:00
Tuan-Dat Tran
3787d004c1 fix(optimize ttl): manual differentiation of hitrate<1 to fix log(0) warnings
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-03 15:28:52 +01:00
Tuan-Dat Tran
0ea1fb5d07 feat(optimal ttl): Added calculation for optimal ttl of each object
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-03 15:15:56 +01:00
Tuan-Dat Tran
272f722f23 feat(objective optimization): Perform gridsearch as single-core and multi-core to find optimal parameters to minimize objective
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-03 14:19:45 +01:00
Tuan-Dat Tran
799f7b78d4 fix(h_i_opt calculation): Fix for calculation of optimized hitrate:
- Assignment of current_cache_size instead of decrease

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-03 10:12:07 +01:00
Tuan-Dat Tran
4ea5505130 feat(eta_calculation): Implementing "Joint Caching and Freshness Optimization" (in progress)
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-02 18:07:08 +01:00
Tuan-Dat Tran
b2cc80bb09 refactor: Restructure Repository to add eta optimization
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-29 21:49:59 +01:00
Tuan-Dat Tran
f32588340d feat(simulation): add expected age computation and enhance statistics reporting
- Increased `ACCESS_COUNT_LIMIT` to extend simulation runtime.
- Introduced `expected_age` metric based on hit rates for additional insights.
- Calculated and exported `age_delta` for comparing average and expected ages.
- Improved data exports to include detailed metrics for analysis.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-29 14:42:52 +01:00
Tuan-Dat Tran
6672608721 feat(simulation): Single source of truth regarding avg_age and hit_rate
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 16:50:10 +01:00
Tuan-Dat Tran
ad4654dd0f fix(simulation): Updated avg_age calculation not only for details.csv, but all avg_age calculation.
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 16:38:55 +01:00
Tuan-Dat Tran
3a9e3105f2 chore(simulation): Reran simulation
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 16:23:45 +01:00
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
123129f3a9 feat(simulation): Added notebook to run multiple simulations sucessivly
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 11:59:43 +01:00
Tuan-Dat Tran
43b84bf0bb feat(eval): add markdown export for hit rates and average ages
- Introduced functionality to export hit rates and average ages as markdown files.
- Generated `hit_rates.md` and `avg_ages.md` for easier sharing and reporting.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-28 11:40: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
b540aafc61 feat: add new experiment notebook and visualization
- Added `aoi_cache_experiment_eval.ipynb`: A Jupyter notebook evaluating cache performance based on TTL (Time-to-Live) with hit rate and average age analysis. It includes visualizations and experiment results.
- Removed the unused `experiment_name` variable in `aoi_cache_simulation.ipynb`.
- Added `experiments/hr_and_age_vs_ttl.png`: A plot visualizing the relationship between hit rate and TTL, complementing the cache evaluation experiments.

### Reason
The new notebook enhances experiment evaluation by providing a detailed analysis of cache behavior over different TTL values. The image file adds a visualization of the results. The removal of the `experiment_name` variable cleans up the simulation code, as it was not being utilized.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-27 16:59:06 +01:00
Tuan-Dat Tran
673302a6b2 feat: add new experiment notebook and visualization
- Added `aoi_cache_experiment_eval.ipynb`: A Jupyter notebook evaluating cache performance based on TTL (Time-to-Live) with hit rate and average age analysis. It includes visualizations and experiment results.
- Removed the unused `experiment_name` variable in `aoi_cache_simulation.ipynb`.
- Added `experiments/hr_and_age_vs_ttl.png`: A plot visualizing the relationship between hit rate and TTL, complementing the cache evaluation experiments.

### Reason
The new notebook enhances experiment evaluation by providing a detailed analysis of cache behavior over different TTL values. The image file adds a visualization of the results. The removal of the `experiment_name` variable cleans up the simulation code, as it was not being utilized.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-27 16:58:54 +01:00
Tuan-Dat Tran
62fc02b205 chore: remove outdated simulation output files
Deleted generated simulation output files:
- : Redundant or outdated visualization of cache simulation results.
- : Obsolete log data, possibly superseded by newer exports or not needed for version control.

### Reason
These files are either auto-generated during simulation runs or are no longer relevant for tracking in version control. Their removal helps reduce repository clutter and ensures only essential files are maintained.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-27 16:34:00 +01:00
Tuan-Dat Tran
2040ea639f chore: remove outdated simulation output files
Deleted generated simulation output files:
- : Redundant or outdated visualization of cache simulation results.
- : Obsolete log data, possibly superseded by newer exports or not needed for version control.

### Reason
These files are either auto-generated during simulation runs or are no longer relevant for tracking in version control. Their removal helps reduce repository clutter and ensures only essential files are maintained.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-27 16:33:12 +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
Tuan-Dat Tran
912b97a06e Added simulation stop condition for maximum access count for the object with the highest lambda
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-13 16:46:36 +01:00
Tuan-Dat Tran
8e1376cc44 adjusted lambda for inter arrival time
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-13 12:00:18 +01:00
Tuan-Dat Tran
594873c472 removed checkpoint:
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-08 21:39:33 +01:00
Tuan-Dat Tran
591ea50d82 Initial commit
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-11-08 21:38:45 +01:00