Skip to main content

execution_order

Function execution_order 

Source
pub fn execution_order(
    model: &Model,
) -> Result<Vec<EntityId>, ScheduleReadError>
Expand description

Every task in a valid execution order.

A deterministic topological sort: among tasks that are simultaneously ready, the one appearing first in the file wins. Without that tie-break the order would depend on hash iteration and change between runs.

The sort runs over every IfcProcess and keeps the IfcTasks (#236), so a constraint that passes through an IfcEvent or IfcProcedure (task A, then event E, then task B) still orders A before B, and a cycle through one is still refused. process_execution_order keeps every process.

ยงErrors

ScheduleReadError::Cycle when the graph loops, because a cyclic schedule has no valid ordering at all, and the refusals of process_execution_order.