Struct dypdl::GroundedCondition
source · pub struct GroundedCondition {
pub elements_in_set_variable: Vec<(usize, usize)>,
pub elements_in_vector_variable: Vec<(usize, usize, usize)>,
pub condition: Condition,
}
Expand description
Condition with element parameters.
Fields§
§elements_in_set_variable: Vec<(usize, usize)>
Pairs of an index of a set variable and a parameter. The condition is evaluated only when all parameters are included in the set variables. Otherwise, the condition is evaluated to true.
elements_in_vector_variable: Vec<(usize, usize, usize)>
Pairs of an index of a vector variable, a parameter, and the capacity. The condition is evaluated only when all parameters are included in the vector variables. Otherwise, the condition is evaluated to true.
condition: Condition
Condition.
Implementations§
source§impl GroundedCondition
impl GroundedCondition
sourcepub fn is_satisfied<U: StateInterface>(
&self,
state: &U,
registry: &TableRegistry,
) -> bool
pub fn is_satisfied<U: StateInterface>( &self, state: &U, registry: &TableRegistry, ) -> bool
Returns true if the condition is satisfied and false if the condition is not satisfied.
§Panics
Panics if the cost of the transition state is used or a min/max reduce operation is performed on an empty set or vector.
Trait Implementations§
source§impl Clone for GroundedCondition
impl Clone for GroundedCondition
source§fn clone(&self) -> GroundedCondition
fn clone(&self) -> GroundedCondition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GroundedCondition
impl Debug for GroundedCondition
source§impl Default for GroundedCondition
impl Default for GroundedCondition
source§fn default() -> GroundedCondition
fn default() -> GroundedCondition
Returns the “default value” for a type. Read more
source§impl From<Condition> for GroundedCondition
impl From<Condition> for GroundedCondition
source§impl From<GroundedCondition> for Condition
impl From<GroundedCondition> for Condition
source§fn from(grounded_condition: GroundedCondition) -> Self
fn from(grounded_condition: GroundedCondition) -> Self
Creates a condition from a grounded condition.
source§impl PartialEq for GroundedCondition
impl PartialEq for GroundedCondition
source§fn eq(&self, other: &GroundedCondition) -> bool
fn eq(&self, other: &GroundedCondition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GroundedCondition
Auto Trait Implementations§
impl Freeze for GroundedCondition
impl RefUnwindSafe for GroundedCondition
impl Send for GroundedCondition
impl Sync for GroundedCondition
impl Unpin for GroundedCondition
impl UnwindSafe for GroundedCondition
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more