pub trait Problem<T, C, D>: BaseProblem + Syncwhere
C: ModelOutputSuccess,
D: ModelOutputFailure,{
// Required methods
fn hit_cost(&self, t: i32, x: Config<T>) -> Cost<C, D>;
fn movement(&self, prev_x: Config<T>, x: Config<T>, inverted: bool) -> N64;
// Provided methods
fn objective_function<'a>(&self, xs: &Schedule<T>) -> Result<Cost<C, D>>
where T: Value<'a> { ... }
fn inverted_objective_function<'a>(
&self,
xs: &Schedule<T>,
) -> Result<Cost<C, D>>
where T: Value<'a> { ... }
fn alpha_unfair_objective_function<'a>(
&self,
xs: &Schedule<T>,
alpha: f64,
) -> Result<Cost<C, D>>
where T: Value<'a> { ... }
fn objective_function_with_default<'a>(
&self,
xs: &Schedule<T>,
default: &Config<T>,
) -> Result<Cost<C, D>>
where T: Value<'a> { ... }
fn _objective_function_with_default<'a>(
&self,
xs: &Schedule<T>,
default: &Config<T>,
alpha: f64,
inverted: bool,
t_end: i32,
) -> Result<Cost<C, D>>
where T: Value<'a> { ... }
fn total_movement<'a>(
&self,
xs: &Schedule<T>,
inverted: bool,
) -> Result<N64>
where T: Value<'a> { ... }
fn _default_config<'a>(&self) -> Config<T>
where T: Value<'a> { ... }
}
Expand description
Trait providing objective function, hitting cost, and movement cost.
Required Methods§
Provided Methods§
Sourcefn objective_function<'a>(&self, xs: &Schedule<T>) -> Result<Cost<C, D>>where
T: Value<'a>,
fn objective_function<'a>(&self, xs: &Schedule<T>) -> Result<Cost<C, D>>where
T: Value<'a>,
Objective function. Calculates the cost of a schedule.
Sourcefn inverted_objective_function<'a>(
&self,
xs: &Schedule<T>,
) -> Result<Cost<C, D>>where
T: Value<'a>,
fn inverted_objective_function<'a>(
&self,
xs: &Schedule<T>,
) -> Result<Cost<C, D>>where
T: Value<'a>,
Inverted Objective function. Calculates the cost of a schedule. Pays the switching cost for powering down rather than powering up.
Sourcefn alpha_unfair_objective_function<'a>(
&self,
xs: &Schedule<T>,
alpha: f64,
) -> Result<Cost<C, D>>where
T: Value<'a>,
fn alpha_unfair_objective_function<'a>(
&self,
xs: &Schedule<T>,
alpha: f64,
) -> Result<Cost<C, D>>where
T: Value<'a>,
$\alpha$-unfair Objective function. Calculates the cost of a schedule.
Sourcefn objective_function_with_default<'a>(
&self,
xs: &Schedule<T>,
default: &Config<T>,
) -> Result<Cost<C, D>>where
T: Value<'a>,
fn objective_function_with_default<'a>(
&self,
xs: &Schedule<T>,
default: &Config<T>,
) -> Result<Cost<C, D>>where
T: Value<'a>,
Objective function starting from an initial configuration other than $\mathbf{0}$.
fn _objective_function_with_default<'a>(
&self,
xs: &Schedule<T>,
default: &Config<T>,
alpha: f64,
inverted: bool,
t_end: i32,
) -> Result<Cost<C, D>>where
T: Value<'a>,
Sourcefn total_movement<'a>(&self, xs: &Schedule<T>, inverted: bool) -> Result<N64>where
T: Value<'a>,
fn total_movement<'a>(&self, xs: &Schedule<T>, inverted: bool) -> Result<N64>where
T: Value<'a>,
Movement in the decision space.
fn _default_config<'a>(&self) -> Config<T>where
T: Value<'a>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.