|
5 | 5 |
|
6 | 6 | use crate::errors::CausalityError; |
7 | 7 | use crate::{ |
8 | | - Causable, CausableCollectionExplaining, Causaloid, CausaloidType, Datable, PropagatingEffect, |
9 | | - SpaceTemporal, Spatial, Symbolic, Temporal, |
| 8 | + AggregateLogic, Causable, CausableCollectionExplaining, CausableCollectionReasoning, Causaloid, |
| 9 | + CausaloidType, Datable, PropagatingEffect, SpaceTemporal, Spatial, Symbolic, Temporal, |
10 | 10 | }; |
11 | 11 |
|
12 | 12 | #[allow(clippy::type_complexity)] |
|
39 | 39 | })?; |
40 | 40 | context_fn(effect, context) |
41 | 41 | } else { |
42 | | - // Standard path |
| 42 | + // Standard causal function w/o context |
43 | 43 | let causal_fn = self.causal_fn.ok_or_else(|| { |
44 | 44 | CausalityError(format!("Causaloid {} is missing a causal_fn", self.id)) |
45 | 45 | })?; |
|
52 | 52 | CausalityError("Causaloid::evaluate: causal collection is None".into()) |
53 | 53 | })?; |
54 | 54 |
|
55 | | - // Default aggregation: "any true" logic. |
56 | | - // Prioritizes Halting, then looks for the first Deterministic(true). |
57 | | - let mut has_true = false; |
58 | | - for cause in coll.iter() { |
59 | | - if let PropagatingEffect::Deterministic(true) = cause.evaluate(effect)? { |
60 | | - has_true = true; |
61 | | - break; // Short-circuit |
62 | | - } |
63 | | - } |
64 | | - PropagatingEffect::Deterministic(has_true) |
| 55 | + coll.evaluate_mixed(effect, &AggregateLogic::All, 0.5)? |
65 | 56 | } |
66 | 57 |
|
67 | 58 | CausaloidType::Graph => { |
|
0 commit comments