Enum grote_opdracht::model::Action [] [src]

pub enum Action {
    InsertOrder {
        vehicle: usize,
        day: usize,
        segment_id: usize,
        index: usize,
        order_id: u32,
        time_delta: Time,
        volume_delta: i32,
    },
    RemoveOrder {
        vehicle: usize,
        day: usize,
        segment_id: usize,
        index: usize,
        order_id: u32,
        time_delta: Time,
        volume_delta: i32,
    },
    InsertSegment {
        vehicle: usize,
        day: usize,
        index: usize,
    },
    RemoveSegment {
        vehicle: usize,
        day: usize,
        index: usize,
    },
    SplitSegment {
        vehicle: usize,
        day: usize,
        segment_id: usize,
        index: usize,
        durations: (Time, Time),
        volumes: (i32, i32),
    },
    MergeSegment {
        vehicle: usize,
        day: usize,
        segment_id: usize,
        duration: Time,
        volume: i32,
    },
}

The action that should be performed for the operator. This is done as an optimization so we don't have to calculate information twice. Items are always inserted before index.

Variants

Inserts an order in the specified segment.

Fields of InsertOrder

Removes and order in the specified segment.

Fields of RemoveOrder

Inserts a new segment before the specified segment.

Fields of InsertSegment

Removes an entire segment. Any scheduled orders will be readded to possible_orders. It is important that every instance of an order gets removed at the same time.

Fields of RemoveSegment

Split a segment before index. This will introduce a new dump. This is practically the same as a lot of insertiosn and removals, but with lower overhead.

Fields of SplitSegment

Merge the segment at segment_id with the one happening after it. This would be the same as removing a dump.

Fields of MergeSegment

Trait Implementations

impl Debug for Action
[src]

[src]

Formats the value using the given formatter. Read more