perty 0.0.1

A implementation of the Programme Evaluation and Review Technique (PERT).
Documentation
use perty::{Pert, PostProcess, Task};

fn main() {
    let json = include_str!("../graphs/wiki_example.json");
    let tasks: Vec<Task> = serde_json::from_str(json).unwrap();

    for t in tasks.iter() {
        println!("{}: {:.?}", t.id, t.duration);
    }

    let nodes = tasks.solve_pert(1_000).unwrap();

    for n in nodes.iter() {
        println!(
            "{}: {:.2} {:.2} {:.2} {} {:.2}",
            n.id,
            n.duration,
            n.early_start_time,
            n.early_finish_time,
            n.is_critical(),
            n.slack()
        );
    }

    println!("Total Duration: {}", nodes.project_duration());
}