arion 0.5.0

Solver and Local search operators for vehicle routing problems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt;

#[derive(Debug, Clone)]
pub struct InfeasableProblem;

// Generation of an error is completely separate from how it is displayed.
// There's no need to be concerned about cluttering complex logic with the display style.
//
// Note that we don't store any extra info about the errors. This means we can't state
// which string failed to parse without modifying our types to carry that information.
impl fmt::Display for InfeasableProblem {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Can't solve the problem with current demand and capacity constraints")
    }
}