cpm-rs

Single crate for Critical Path Method calculation.

Crates.io

Functionality

Future functionality

Limitations

Usage

Example 1: read tasks from file

```rust

fn main() { let mut scheduler = scheduler::Scheduler::new(); let args: Vec = env::args().collect(); if args.len() < 2 { eprintln!("Please provide an input file path!"); exit(1); } match inputparser::parseinputfile(&args[1]) { Ok(tasklist) => { scheduler.schedule(task_list); }, Err(e) => {eprintln!("Error: {}", e); exit(1);}, } }

```

Example 2: add tasks from code

```rust

fn main() { let mut scheduler = Scheduler::new(); scheduler.addtask(CustomTask::new( "TaskA".tostring() , 1 , vec!{} )); scheduler.addtask(CustomTask::new( "SidetaskB".tostring() , 3 , vec!{"TaskA".tostring()} )); scheduler.addtask(CustomTask::new( "SidetaskC".tostring() , 2 , vec!{"TaskB".tostring()} )); scheduler.addtask(CustomTask::new( "Finish".tostring() , 1 , vec!{"SidetaskB".tostring(), "SidetaskC".to_string()} )); match scheduler.schedule() { Ok(()) => {}, Err(e) => {eprintln!("Error: {}", e); exit(1);}, }

}

```