diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..35d39a7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Stephen Waits + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9d56a1b --- /dev/null +++ b/README.md @@ -0,0 +1,107 @@ +# Monte Carlo Project Scheduler (mcps) + +Monte Carlo Project Scheduler (mcps) is a command-line tool that runs Monte +Carlo simulations on project schedules to estimate completion times and effort +required. It helps project managers and engineers gain a better understanding of +potential project risks and timelines by providing a probabilistic analysis of +schedule durations and total work effort. + +## Features + +- **Simulate Project Schedules**: Run multiple simulations to estimate the + probability distribution of project completion times and total work effort. +- **Customizable Inputs**: Accepts project schedules in YAML or JSON formats, + with options to override certain parameters like the number of workers or the + number of iterations. +- **Visual Output**: Generates an ASCII-based cumulative distribution function + (CDF) graph, providing an easy-to-understand visualization of the simulation + results. + +## Installation + +### Prerequisites + +- **Rust**: You'll need to have Rust installed on your system to build the + project. You can install Rust using `rustup`: + + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + ``` + +### Building from Source + +- Clone and build the repository: + +```bash +git clone :~swaits/mcps +cd mcps +cargo build --release +``` + +The binary will be available at `target/release/mcps`. + +## Usage + +Once you have built the tool, you can use it by providing a project schedule +file in YAML or JSON format. + +### Basic Usage + +```bash +./mcps example.yaml -i 100000 -w 10 +``` + +This command runs the Monte Carlo simulation on the example.yaml schedule file +with 100,000 iterations and overrides the number of workers to 10. + +### Command-Line Options + +- `-i, --iterations `: Specify the number of iterations to run. Must be at least 100. Default is 50,000. +- `-w, --workers `: Override the number of workers specified in the schedule file. +- `-v, --version`: Print version information. +- `-h, --help`: Print help information. + +### Schedule File Format + +The tool accepts schedule files in YAML or JSON format. Below is an example of the YAML format: + +```yaml +num_workers: 5 # for the purpose of scheduling simulation +estimate_confidence: 0.80 # confidence actuals will fall inside estimate bounds +tasks: + - id: DesignPhase + min_time: 1.5 # 1.5 days + max_time: 3.5 # 3.5 days + dependencies: [] + - id: ImplementationPhase + min_time: 2.25 # 2.25 days + max_time: 4.75 # 4.75 days + dependencies: [DesignPhase] +``` + +### Example Output + +The tool generates an ASCII-based cumulative distribution function (CDF) graph, +which visually represents the distribution of project durations and effort: + +![example output of mcps](./assets/output.png) + +## Project Details + +### Contributing + +Contributions are welcome! If you'd like to contribute, please fork the +repository and make changes as you'd like. Pull requests are warmly welcomed. + +### Issues + +If you encounter any issues with the tool, feel free to open an issue on the repository. + +### Acknowledgments + +This tool was developed by Stephen Waits. Contributions and suggestions are +always welcome! + +### License + +This project is licensed under the MIT License. See the LICENSE file for details. diff --git a/assets/output.png b/assets/output.png new file mode 100644 index 0000000..68ddc3f Binary files /dev/null and b/assets/output.png differ