Struct ProfitRbOracle

Source
pub struct ProfitRbOracle { /* private fields */ }
Expand description

The ProfitRbOracle struct is an implementation of an oracle for a profit maximization problem with robustness. It is used to solve a profit maximization problem where the parameters have interval uncertainty. The implementation is based on the approach described in the paper “Robust Geometric Programming Approach to Profit Maximization with Interval Uncertainty” by Aliabadi and Salahi. The ProfitRbOracle struct is an implementation of an oracle for a profit maximization problem with robustness.

Reference:

  • Aliabadi, Hossein, and Maziar Salahi. “Robust Geometric Programming Approach to Profit Maximization with Interval Uncertainty.” Computer Science Journal Of Moldova 61.1 (2013): 86-96.

Implementations§

Source§

impl ProfitRbOracle

Source

pub fn new( params: (f64, f64, f64), aa: Array1<f64>, price_out: Array1<f64>, vparams: (f64, f64, f64, f64, f64), ) -> Self

The function new constructs a new ProfitRbOracle object with given parameters.

Arguments:

  • p: The market price per unit.
  • scale: The scale parameter represents the scale of production. It determines the level of output or production for a given set of inputs. It can be thought of as the size or capacity of the production process.
  • k: A given constant that restricts the quantity of x1.
  • aa: The parameter aa represents the output elasticities. It is an array that contains the elasticities of each output variable.
  • price_out: The parameter price_out represents the output price. It is of type Arr, which suggests that it is an array or vector of values.
  • e: Parameters for uncertainty.
  • e3: The parameter e3 represents the uncertainty in the market price per unit. It is used to adjust the market price in the calculation of the omega variable.

Returns:

The new function is returning an instance of the ProfitRbOracle struct.

Trait Implementations§

Source§

impl Debug for ProfitRbOracle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl OracleOptim<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for ProfitRbOracle

Source§

fn assess_optim( &mut self, y: &Array1<f64>, gamma: &mut f64, ) -> ((Array1<f64>, f64), bool)

The assess_optim function takes an input quantity y and updates the best-so-far optimal value gamma based on the elasticities and returns a cut and the updated best-so-far value.

Arguments:

  • y: The parameter y is an input quantity represented as an array (Arr) in log scale.
  • gamma: The parameter gamma is the best-so-far optimal value. It is passed as a mutable reference (&mut f64) so that its value can be updated within the function.
Source§

type CutChoice = f64

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.