pub struct Product { /* private fields */ }Implementations§
Source§impl Product
impl Product
Sourcepub fn daily_quotient(&self) -> f64
pub fn daily_quotient(&self) -> f64
The expected daily customer interest for the product, expressed as a fraction of 1.0 where 1.0 means every customer wants it. This metric quantifies the product’s popularity. Note that the product’s price also influences final sales.
Sourcepub fn expected_return_rate(&self) -> f64
pub fn expected_return_rate(&self) -> f64
Expected return rate of the product, %/period.
Sourcepub fn stock_supplies_in(&self) -> f64
pub fn stock_supplies_in(&self) -> f64
Expected terms of shipment arrival from the supplier, in days. The final value for each shipment is sampled using SkewedNormal distribution with the parameters derived from the following three values. stock_supplies_in is the mean or location parameter.
Sourcepub fn supplier_inaccuracy(&self) -> f64
pub fn supplier_inaccuracy(&self) -> f64
Specifies the variability of the shipment terms. The value is a percentage of the stock_supplies_in value. The higher the value, the more uncertain the shipment terms are; values above 20% are not accepted. This value translates into the SkewNormal distribution scale parameter by the formula: scale = supplier_inaccuracy * stock_supplies_in / 1.6448536
Sourcepub fn supplier_tardiness(&self) -> f64
pub fn supplier_tardiness(&self) -> f64
Specifies the tendency of a supplier to delay the shipment. Positive values indicate a tendency to delay and measured as a percentage of the late shipments. Negative values indicate a tendency to deliver faster. Reasonable range for the value is between -0.9 and 0.7. Whereas the former is simply optimistic, the latter is rather the maximum reasonably acceptable in real life. The value translates into SkewedNormal distribution shape parameter by the formula: shape = tan(PI * (supplier_tardiness - 0.5))
pub fn product_model(&self) -> Arc<ProductModel>
Sourcepub fn daily_estimate(&self) -> f64
pub fn daily_estimate(&self) -> f64
The expected number of items of this product sold to a single customer per day. This value is used in the sampling process to simulate how many items of this product a customer buys in a single order.
Sourcepub fn view_probability(&self) -> f64
pub fn view_probability(&self) -> f64
How likely the product is to be viewed by a customer when purchase decision is being made.
Sourcepub fn builder() -> ProductBuilder
pub fn builder() -> ProductBuilder
Creates a new builder for this struct.
Trait Implementations§
impl FXStruct for Product
Auto Trait Implementations§
impl !Freeze for Product
impl !RefUnwindSafe for Product
impl Send for Product
impl Sync for Product
impl Unpin for Product
impl !UnwindSafe for Product
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.