fn tick_ts(state: &mut SPState, ts: &[&Transition]) -> Vec<SPPath> {
        let enabled = ts.iter().all(|t| t.eval(state)) && ts.iter().any(|t| !t.actions.is_empty());
        if enabled && !ts.is_empty() {
            ts.iter().flat_map(|t| t.actions.iter()).for_each(|a| {
                let _res = a.next(state); // if actions write to the same path, only the first will be used
                if _res.is_err() {
                    println!("The transitions {:?} could not fire! {:?}", ts, _res);
                }
            });
            return ts.iter().map(|t| t.path().clone()).collect();
        }
        vec![]
    }
/// Check if the row of transitions is enabled and fire the actions. Also checks the forbidden state after
/// the state change, and will revert if we are forbidden.
Check if the row of transitions is enabled and fire the actions. Also checks the forbidden state after
the state change, and will revert if we are forbidden.
Check if the row of transitions is enabled and fire the actions . Also checks the forbidden state after the state change and will revert if we are forbidden .
fn tick_ts(state: &mut SPState, ts: &[&Transition]) -> Vec<SPPath> {
        let enabled = ts.iter().all(|t| t.eval(state)) && ts.iter().any(|t| !t.actions.is_empty());
        if enabled && !ts.is_empty() {
            ts.iter().flat_map(|t| t.actions.iter()).for_each(|a| {
                let _res = a.next(state); // if actions write to the same path, only the first will be used
                if _res.is_err() {
                    println!("The transitions {:?} could not fire! {:?}", ts, _res);
                }
            });
            return ts.iter().map(|t| t.path().clone()).collect();
        }
        vec![]
    }
fn tick_ts ( state : & mut SPState , ts : & [ & Transition ] ) -> Vec < SPPath > { let enabled = ts . iter ( ) . all ( | t | t . eval ( state ) ) && ts . iter ( ) . any ( | t | ! t . actions . is_empty ( ) ) ; if enabled && ! ts . is_empty ( ) { ts . iter ( ) . flat_map ( | t | t . actions . iter ( ) ) . for_each ( | a | { let _res = a . next ( state ) ; // if actions write to the same path, only the first will be used if _res . is_err ( ) { println ! ( " " ts _res ) ; } } ) ; return ts . iter ( ) . map ( | t | t . path ( ) . clone ( ) ) . collect ( ) ; } vec ! [ ] }
Check if the row of transitions is enabled and fire the actions.
Check if the row of transitions is enabled and fire the actions .
state
&mut SPState
ts
&[&Transition]