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
impl ProfitRbOracle
Sourcepub fn new(
params: (f64, f64, f64),
aa: Array1<f64>,
price_out: Array1<f64>,
vparams: (f64, f64, f64, f64, f64),
) -> Self
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
: Thescale
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 parameteraa
represents the output elasticities. It is an array that contains the elasticities of each output variable.price_out
: The parameterprice_out
represents the output price. It is of typeArr
, which suggests that it is an array or vector of values.e
: Parameters for uncertainty.e3
: The parametere3
represents the uncertainty in the market price per unit. It is used to adjust the market price in the calculation of theomega
variable.
Returns:
The new
function is returning an instance of the ProfitRbOracle
struct.
Trait Implementations§
Source§impl Debug for ProfitRbOracle
impl Debug for ProfitRbOracle
Source§impl OracleOptim<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for ProfitRbOracle
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)
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 parametery
is an input quantity represented as an array (Arr
) in log scale.gamma
: The parametergamma
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.