|
EllAlgo 1.6.13
|
Oracle for a profit maximization problem. More...
#include <profit_oracle.hpp>
Public Member Functions | |
| ProfitOracle (double p, double A, double k, const Vec &a, const Vec &v) | |
| Construct a new profit oracle object. | |
| ProfitOracle (const ProfitOracle &)=delete | |
| Construct a new profit oracle object (only explicitly) | |
| ProfitOracle & | operator= (const ProfitOracle &)=delete |
| ProfitOracle (ProfitOracle &&)=delete | |
| ProfitOracle & | operator= (ProfitOracle &&)=delete |
| ~ProfitOracle ()=default | |
| auto | set_elasticities (const Vec &elasticities) |
| auto | assess_feas (const Vec &y, const double &gamma) -> Cut * |
| Assess feasibility of a given input quantity. | |
| auto | assess_optim (const Vec &y, double &gamma) -> std::tuple< Cut, bool > |
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
_constraints), replacing the former switch (this->idx) dispatch. Each entry is a self-contained constraint evaluator returning a Cut* (or nullptr when satisfied). Construct a new profit oracle object.
| [in] | p | the market price per unit |
| [in] | A | the scale of production |
| [in] | k | a given constant that restricts the quantity of x1 |
| [in] | a | the output elasticities |
| [in] | v | the output prices |
|
delete |
Construct a new profit oracle object (only explicitly)
|
delete |
|
default |
Assess feasibility of a given input quantity.
Uses round-robin to check constraints. Returns a cut if infeasible.
| [in] | y | input quantity (in log scale) |
| [in] | gamma | the best-so-far optimal value |
| [in] | y | input quantity (in log scale) |
| [in,out] | gamma | the best-so-far optimal value |
|
delete |
|
delete |
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.