{"id":29113678,"url":"https://github.com/diaa9/aems","last_synced_at":"2025-07-25T16:04:37.219Z","repository":{"id":300245212,"uuid":"1005594156","full_name":"diaa9/AEMS","owner":"diaa9","description":"The Adaptive Efficiency Monitor Simulator (AEMS) offers a user-friendly platform to track and predict performance metrics using the EWMA model. Explore its features and start optimizing your efficiency today! 🛠️🌐","archived":false,"fork":false,"pushed_at":"2025-07-04T19:57:37.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T20:38:11.289Z","etag":null,"topics":["access-control","acltesting","adobe","aem","aem-site","aem65","cif","code-samples","helix4","jcr","maven","oak","osgi","repository-template","scanner","tutorial","wcm-components","wknd-sites"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diaa9.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T13:32:40.000Z","updated_at":"2025-07-04T19:57:40.000Z","dependencies_parsed_at":"2025-07-04T20:30:28.146Z","dependency_job_id":"9944bea0-328a-489c-8d19-2562cbcc5fb8","html_url":"https://github.com/diaa9/AEMS","commit_stats":null,"previous_names":["diaa9/aems"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/diaa9/AEMS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diaa9%2FAEMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diaa9%2FAEMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diaa9%2FAEMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diaa9%2FAEMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diaa9","download_url":"https://codeload.github.com/diaa9/AEMS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diaa9%2FAEMS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267029404,"owners_count":24024199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-control","acltesting","adobe","aem","aem-site","aem65","cif","code-samples","helix4","jcr","maven","oak","osgi","repository-template","scanner","tutorial","wcm-components","wknd-sites"],"created_at":"2025-06-29T11:05:44.206Z","updated_at":"2025-07-25T16:04:37.004Z","avatar_url":"https://github.com/diaa9.png","language":"JavaScript","readme":"# Adaptive Efficiency Monitor Simulator (AEMS)\n\nThe **Adaptive Efficiency Monitor Simulator (AEMS)** is a web-based application designed to track and forecast performance metrics using an **Exponentially Weighted Moving Average (EWMA)** model. It provides users with a dynamic, interactive interface to simulate efficiency trends, analyze historical data, and predict future performance based on customizable event-driven scenarios. AEMS is ideal for applications in personal productivity, quality control, health tracking, and business metrics.\n\nThe live version of the application is available at: [https://adaptive-efficiency-monitor.netlify.app/](https://adaptive-efficiency-monitor.netlify.app/).\n\n## Table of Contents\n- [Overview](#overview)\n- [Key Features](#key-features)\n- [How It Works](#how-it-works)\n  - [EWMA Model](#ewma-model)\n  - [Daily Performance Calculation](#daily-performance-calculation)\n  - [Forecasting](#forecasting)\n- [Technology Stack](#technology-stack)\n- [Installation and Setup](#installation-and-setup)\n- [Usage Guide](#usage-guide)\n  - [Simulator Tab](#simulator-tab)\n  - [How It Works Tab](#how-it-works-tab)\n  - [Running a Simulation](#running-a-simulation)\n  - [Running Aggregate Analysis](#running-aggregate-analysis)\n- [Example Scenario](#example-scenario)\n- [File Structure](#file-structure)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n## Overview\nAEMS allows users to input historical performance data, define event types with associated severity scores, and simulate future performance over a specified period. The application uses an EWMA algorithm to provide adaptive scoring, giving more weight to recent performance while retaining historical context. Users can run single simulations to see day-by-day progress or perform aggregate analyses across multiple simulations to understand performance trends and probabilities.\n\nThe application is particularly useful for:\n- **Personal Productivity**: Tracking habits, mistakes, or goal achievement.\n- **Quality Control**: Monitoring defects or process failures.\n- **Health \u0026 Wellness**: Tracking dietary lapses or medication adherence.\n- **Business Metrics**: Measuring customer satisfaction or operational efficiency.\n\n## Key Features\n- **Adaptive Scoring**: Uses EWMA to weigh recent performance more heavily.\n- **Event-Based Tracking**: Allows users to define custom events with severity scores.\n- **Predictive Forecasting**: Estimates the number of perfect days needed to reach a target efficiency.\n- **Dynamic Simulation**: Generates realistic scenarios based on user-defined probabilities.\n- **Aggregate Analysis**: Runs multiple simulations to provide statistical insights, including histograms and line charts.\n- **Interactive UI**: Features a responsive, modern interface with real-time updates and visualizations.\n- **Open Source**: Available on GitHub for contributions and customization.\n\n## How It Works\n\n### EWMA Model\nThe Exponentially Weighted Moving Average (EWMA) algorithm calculates efficiency by assigning exponentially decreasing weights to older performance data. The formula is:\n\n```\nNew Efficiency = α × Daily Performance + (1 - α) × Previous Efficiency\n```\n\nWhere:\n- **α (alpha)**: Smoothing factor (0 \u003c α ≤ 1). Higher values make the model more responsive to recent changes, while lower values provide stability.\n- **Daily Performance**: A score between 0 and 1, calculated based on the day's events.\n- **Previous Efficiency**: The efficiency score from the previous day.\n\n### Daily Performance Calculation\nDaily performance is determined by the total severity of events that occur on a given day, relative to a user-defined maximum daily severity:\n\n```\nDaily Performance = 1 - (Total Daily Severity / Max Daily Severity)\n```\n\n- **Perfect Day**: No events occur, resulting in a performance score of 1 (100%).\n- **Worst Day**: Total severity equals or exceeds the maximum, resulting in a score of 0 (0%).\n- **Other Days**: Performance is proportional to the severity of events.\n\n### Forecasting\nAEMS forecasts the number of consecutive perfect days needed to reach a target efficiency using the following formula:\n\n```\nDays Needed = ⌈ln((1 - Target Efficiency) / (1 - Current Efficiency)) / ln(1 - α)⌉\n```\n\nThis provides a realistic estimate of the effort required to achieve a performance goal.\n\n## Technology Stack\n- **HTML5**: Structure of the web application.\n- **CSS3**: Styling, including responsive design with Tailwind-inspired gradients and animations.\n- **JavaScript**: Core logic, including the Efficiency Monitor class and Chart.js for visualizations.\n- **Chart.js**: For rendering histograms and line charts in aggregate analysis.\n- **Netlify**: Hosting the live deployment.\n\n## Installation and Setup\nTo run AEMS locally, follow these steps:\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/yaseen454/adaptive-efficiency-monitor.git\n   cd adaptive-efficiency-monitor\n   ```\n\n2. **Open the Project**:\n   Since AEMS is a static web application, no server setup is required. Simply open `index.html` in a modern web browser (e.g., Chrome, Firefox).\n\n3. **Optional: Use a Local Server**:\n   For a better development experience, you can use a local server. For example, with Python:\n   ```bash\n   python -m http.server 8000\n   ```\n   Then, navigate to `http://localhost:8000` in your browser.\n\n4. **Dependencies**:\n   - The application uses Chart.js via a CDN, so no additional installations are needed.\n   - Ensure you have an internet connection for the Chart.js CDN to load.\n\n## Usage Guide\n\n### Simulator Tab\nThe **Simulator** tab is the main interface for running simulations. It includes several sections:\n\n1. **Historical Data**:\n   - **Number of Bad Events**: Enter the number of negative events in your historical data (e.g., days with issues).\n   - **Total Duration (days)**: Specify the time period for your historical data.\n   - The initial efficiency is calculated as: `1 - (Bad Events / Duration)` and displayed as a percentage with a progress bar.\n\n2. **Simulation Parameters**:\n   - **Days to Simulate**: Number of days to run the simulation (1–365).\n   - **Max Daily Severity**: The maximum severity score for a single day.\n   - **Target Efficiency Increment**: The desired percentage increase over the initial efficiency.\n   - **Smoothing Factor (α)**: Controls the responsiveness of the EWMA model (0.01–1).\n   - **Perfect Day Probability**: The likelihood of a day with no events (0–100%).\n   - **Second Event Probability**: The chance of a second random event occurring (0–100%).\n\n3. **Event Severity Profile**:\n   - Define event types (e.g., \"Minor Issue\") and their severity scores.\n   - Add or remove events using the \"Add Event Type\" and \"Remove\" buttons.\n\n4. **Simulation Controls**:\n   - **Run Simulation**: Starts a single simulation, displaying day-by-day results and statistics.\n   - **Clear Output**: Resets the simulation output.\n\n5. **Aggregate Analysis**:\n   - **Number of Simulations**: Specify how many simulations to run (10–10,000).\n   - **Max Events Per Day**: Set the maximum number of events per day for the analysis.\n   - **Run Aggregate Analysis**: Executes multiple simulations and displays statistical summaries and charts.\n\n### How It Works Tab\nThis tab provides a detailed explanation of the AEMS methodology, including:\n- The EWMA formula and its parameters.\n- How daily performance is calculated.\n- The forecasting algorithm.\n- Practical applications and a step-by-step example.\n\n### Running a Simulation\n1. Enter historical data (e.g., 42 bad events over 120 days).\n2. Set simulation parameters (e.g., 25 days, max severity of 10, α = 0.04).\n3. Define at least one event type in the severity profile.\n4. Click **Run Simulation** to view the day-by-day output, including:\n   - Events that occurred.\n   - Daily performance.\n   - Current efficiency.\n   - Forecasted days to reach the target.\n5. Review the final summary and statistics, such as final efficiency and perfect days.\n\n### Running Aggregate Analysis\n1. Configure the same parameters as for a single simulation.\n2. Specify the number of simulations and max events per day.\n3. Click **Run Aggregate Analysis** to generate:\n   - Statistical summaries (e.g., average final efficiency, goal achievement rate).\n   - Charts:\n     - Histogram of final efficiencies.\n     - Histogram of days to goal.\n     - Line plot of final efficiencies over simulations.\n     - Line plot of days to goal over simulations.\n\n## Example Scenario\nSuppose you want to track your study focus over a 120-day period, where you had 42 days with distractions. Here's how to use AEMS:\n\n1. **Historical Data**:\n   - Bad Events: 42\n   - Duration: 120\n   - Initial Efficiency: `(1 - 42/120) × 100 = 65%`\n\n2. **Event Severity Profile**:\n   - \"Minor Distraction\": Severity 1\n   - \"Major Procrastination\": Severity 4\n\n3. **Simulation Parameters**:\n   - Days to Simulate: 25\n   - Max Daily Severity: 10\n   - Target Increment: 20% (goal: 85% efficiency)\n   - Smoothing Factor: 0.04\n   - Perfect Day Probability: 40%\n   - Second Event Probability: 35%\n\n4. **Run Simulation**:\n   - The output shows daily events, performance, and efficiency updates.\n   - For example, a day with \"Major Procrastination\" (severity 4) has a performance of `1 - (4/10) = 60%`.\n   - The new efficiency is calculated as: `0.04 × 60% + 0.96 × 65% ≈ 64.8%`.\n   - The forecast might indicate 38 perfect days needed to reach 85%.\n\n5. **Run Aggregate Analysis**:\n   - Set 100 simulations with a max of 5 events per day.\n   - Review charts and stats to understand the distribution of outcomes.\n\n## File Structure\n```\nadaptive-efficiency-monitor/\n├── index.html        # Main HTML file\n├── script.js         # JavaScript logic (Efficiency Monitor class, simulation functions)\n├── style.css         # CSS styles for the application\n└── README.md         # Project documentation\n```\n\n## Contributing\nContributions are welcome! To contribute:\n1. Fork the repository on GitHub: [https://github.com/yaseen454/adaptive-efficiency-monitor](https://github.com/yaseen454/adaptive-efficiency-monitor).\n2. Create a new branch for your feature or bug fix.\n3. Submit a pull request with a clear description of your changes.\n\nPlease ensure your code follows the existing style and includes appropriate comments.\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\nFor questions or feedback, contact the project maintainer:\n- GitHub: [yaseen454](https://github.com/yaseen454)\n- Email: (Please refer to the GitHub profile for contact details)\n\n---\nThank you for using AEMS! We hope it helps you track and improve your performance effectively.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiaa9%2Faems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiaa9%2Faems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiaa9%2Faems/lists"}