ProfitOracleQ class
#include <ellalgo/oracles/profit_oracle.hpp>
Oracle for profit maximization problem (discrete version)
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 (must be integer value) v: output price k: a given constant that restricts the quantity of x1
Constructors, destructors, conversion operators
- ProfitOracleQ(double p, double A, double k, const Vec& a, const Vec& v)
- Construct a new profit q oracle object.
Public functions
- auto assess_optim_q(const Vec& y, double& gamma, bool retry) -> std::tuple< Cut, bool, Vec, bool > -> auto
- Make object callable for cutting_
plane_ optim_ q()
Function documentation
ProfitOracleQ:: ProfitOracleQ(double p,
double A,
double k,
const Vec& a,
const Vec& v)
Construct a new profit q oracle object.
Parameters | |
---|---|
p in | the market price per unit |
A in | the scale of production |
k in | a given constant that restricts the quantity of x1 |
a in | the output elasticities |
v in | output price |
auto ProfitOracleQ:: assess_optim_q(const Vec& y,
double& gamma,
bool retry) -> std::tuple< Cut, bool, Vec, bool >
Make object callable for cutting_
Parameters | |
---|---|
y in | input quantity (in log scale) |
gamma in/out | the best-so-far optimal value |
retry in | whether it is a retry |
Returns | Cut and the updated best-so-far value |