#[non_exhaustive]pub enum Error<S> {
InvalidCost {
state: S,
cost: f64,
},
InvalidProbability {
state: S,
probability: f64,
},
ProbabilitySum {
state: S,
sum: f64,
},
InvalidHeuristic {
state: S,
},
UnboundedUpper {
state: S,
},
InvalidReward {
state: S,
reward: f64,
},
NoActions,
EmptyBelief,
UnseenHistory,
BeliefDepleted {
attempts: usize,
},
InvalidConfig {
reason: &'static str,
},
}Expand description
Invalid input found while solving. Each variant names the state where it was found.
Implements core::error::Error when the state is fmt::Debug. The enum is
#[non_exhaustive]: new kinds of invalid input can be added without a breaking change,
so a match outside this crate needs a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidCost
An action cost is negative, NaN or infinite.
InvalidProbability
An outcome probability is NaN or outside (0, 1].
ProbabilitySum
The outcome probabilities of an action do not sum to 1 within
PROBABILITY_TOLERANCE. An action without outcomes sums to 0.
Fields
state: SThe state whose action has the outcomes.
InvalidHeuristic
The heuristic estimated NaN or negative infinity, a POMDP upper bound (see
despot) is NaN, or a brtdp upper estimate is
NaN, negative infinity or below the lower estimate of the same state.
Fields
state: SThe state that was estimated.
UnboundedUpper
Under DeadEnds::Infinite, the upper bound of
brtdp estimated no finite value (None or infinity) for a state
the lower bound does not prove to be a dead end.
The bounded algorithms need a finite upper bound wherever the optimal value is finite: an infinite
one on a cycle never becomes finite through backups. Give a finite upper estimate,
return None from the lower bound too where the state is a dead end, or use
DeadEnds::Penalty, whose penalty bounds every value.
Fields
state: SThe state that was estimated.
InvalidReward
A Pomdp::step returned a NaN or infinite reward.
NoActions
A Pomdp emitted no actions.
EmptyBelief
A POMDP planner was given a belief without particles.
UnseenHistory
Despot::advance met an action and observation the tree
never produced; the planner needs Despot::reset.
BeliefDepleted
update_belief accepted no particle: the observation is
impossible under the belief, or too rare for the attempt budget.
InvalidConfig
A configuration setting is out of range.
Trait Implementations§
Source§impl<S: Debug> Error for Error<S>
impl<S: Debug> Error for Error<S>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()