ProfitOracle class
#include <ellalgo/oracles/profit_oracle.hpp>
Oracle for a profit maximization problem.
This example is taken from [Aliabadi and Salahi, 2013]:
max p(A x1^alpha x2^beta) - v1*x1 - v2*x2 s.t. x1 \le k
where:
p(A x1^alpha x2^beta): Cobb-Douglas production function p: the market price per unit A: the scale of production alpha, beta: the output elasticities x: input quantity v: output price k: a given constant that restricts the quantity of x1
Constructors, destructors, conversion operators
- ProfitOracle(double p, double A, double k, const Vec& a, const Vec& v)
- Construct a new profit oracle object.
- ProfitOracle(const ProfitOracle&) deleted
- Construct a new profit oracle object (only explicitly)
Public functions
- auto set_elasticities(const Vec& elasticities) -> auto
- auto assess_feas(const Vec& y, const double& gamma) -> Cut * -> auto
- auto assess_optim(const Vec& y, double& gamma) -> std::tuple< Cut, bool > -> auto
Function documentation
auto ProfitOracle:: set_elasticities(const Vec& elasticities)
The set_elasticities function is a member function of the ProfitOracle class. It takes a Vec object elasticities as input and sets the _elasticities member variable of the ProfitOracle object to the input value. This function allows you to update the elasticities used by the profit oracle for assessing feasibility and optimization.
auto ProfitOracle:: assess_feas(const Vec& y,
const double& gamma) -> Cut *
| Parameters | |
|---|---|
| y in | input quantity (in log scale) |
| gamma in | the best-so-far optimal value |
| Returns | std::tuple<Cut, double> Cut and the updated best-so-far value |
auto ProfitOracle:: assess_optim(const Vec& y,
double& gamma) -> std::tuple< Cut, bool >
| Parameters | |
|---|---|
| y in | input quantity (in log scale) |
| gamma in/out | the best-so-far optimal value |
| Returns | std::tuple<Cut, double> Cut and the updated best-so-far value |