pub struct Network { /* private fields */ }
Implementations§
Source§impl Network
impl Network
pub fn builder() -> NetworkBuilder
Sourcepub fn activities(&self) -> Result<Vec<&str>>
pub fn activities(&self) -> Result<Vec<&str>>
A list of all activities in the precedence network
Sourcepub fn connected(
&self,
origin_reference: &str,
target_reference: &str,
) -> Result<bool>
pub fn connected( &self, origin_reference: &str, target_reference: &str, ) -> Result<bool>
Test whether two activities are connected
Sourcepub fn start_activities(&self) -> Result<Vec<&str>>
pub fn start_activities(&self) -> Result<Vec<&str>>
A list of all start activities
A start activity is an activity with no preceding activities.
Sourcepub fn finish_activities(&self) -> Result<Vec<&str>>
pub fn finish_activities(&self) -> Result<Vec<&str>>
A list of all finish activities
A finish activity is an activity with no dependant activities.
Sourcepub fn next_activities(&self, reference: &str) -> Result<Vec<&str>>
pub fn next_activities(&self, reference: &str) -> Result<Vec<&str>>
Returns a list of activities that depend on the completion of the given activity
Sourcepub fn previous_activities(&self, reference: &str) -> Result<Vec<&str>>
pub fn previous_activities(&self, reference: &str) -> Result<Vec<&str>>
Returns a list of activities that the given activity depends on
Sourcepub fn earliest_finish(&self, reference: &str) -> Result<f64>
pub fn earliest_finish(&self, reference: &str) -> Result<f64>
The earliest possible finish of an activity
Sourcepub fn latest_finish(&self, reference: &str) -> Result<f64>
pub fn latest_finish(&self, reference: &str) -> Result<f64>
The latest possible finish of an activity
Sourcepub fn latest_start(&self, reference: &str) -> Result<f64>
pub fn latest_start(&self, reference: &str) -> Result<f64>
The latest possible start of an activity
Sourcepub fn earliest_start(&self, reference: &str) -> Result<f64>
pub fn earliest_start(&self, reference: &str) -> Result<f64>
The earliest possible start of an activity
Sourcepub fn on_critical_path(&self, reference: &str) -> Result<bool>
pub fn on_critical_path(&self, reference: &str) -> Result<bool>
Returns true if the given activity is on the critical path
Sourcepub fn critical_path_activities(&self) -> Result<Vec<&str>>
pub fn critical_path_activities(&self) -> Result<Vec<&str>>
A list of all activities on the critical path
Sourcepub fn total_float(&self, reference: &str) -> Result<f64>
pub fn total_float(&self, reference: &str) -> Result<f64>
The total float (or slack) of an activity
Slack is how much the activity can be delayed to not cause the final completion time of all activities to be delayed.
Sourcepub fn free_float(&self, reference: &str) -> Result<f64>
pub fn free_float(&self, reference: &str) -> Result<f64>
The free (or early) float of an activity
The free float is how much the activity can be delayed to not cause a delay in the earliest start of any subsequent activity.
Sourcepub fn start(&self, reference: &str) -> Result<f64>
pub fn start(&self, reference: &str) -> Result<f64>
The start of an activity, which can vary depending on how activity_type
was set
Sourcepub fn finish(&self, reference: &str) -> Result<f64>
pub fn finish(&self, reference: &str) -> Result<f64>
The finish time of an activity, which can vary depending on how activity_type
was set
Sourcepub fn active_at(&self, reference: &str, time: f64) -> Result<bool>
pub fn active_at(&self, reference: &str, time: f64) -> Result<bool>
Whether an activity is active at a certain time
Sourcepub fn active_during(&self, reference: &str, range: Range<f64>) -> Result<bool>
pub fn active_during(&self, reference: &str, range: Range<f64>) -> Result<bool>
Whether an activity is active during a certain time range
Sourcepub fn mean_duration(&self, reference: &str) -> Result<f64>
pub fn mean_duration(&self, reference: &str) -> Result<f64>
The mean duration of the activity
The mean is calculated as: ((4 * expected_duration) + minimum_duration + maximum_duration) / 6
Sourcepub fn variance(&self, reference: &str) -> Result<f64>
pub fn variance(&self, reference: &str) -> Result<f64>
The variance of the duration of the activity
The variance is calculated as: variance ** 2
Sourcepub fn standard_deviation(&self, reference: &str) -> Result<f64>
pub fn standard_deviation(&self, reference: &str) -> Result<f64>
The standard deviation of the duration of the activity
This is calculated as: (maximum_duration - minimum_duration) / 6
Sourcepub fn depth(&self, reference: &str) -> Result<usize>
pub fn depth(&self, reference: &str) -> Result<usize>
The depth is a measure of how far the activity is from the start
All start activities have depth 1 and all other activities have depth of the maximum depth of their preceding activities + 1.
Sourcepub fn to_dot(&self) -> Result<String>
pub fn to_dot(&self) -> Result<String>
Returns a string containing a representation suitable for dot
and other programs in
the GraphViz package.