odys.optimization.objective_terms.profit¶
Internal implementation detail. The expected-profit term: each scenario's profit weighted by its probability, times the term's weight. See Expected profit.
The expected-profit objective term.
ProfitTermFormulation
¶
Bases: ObjectiveTermFormulation
Expected profit: the probability-weighted sum of every scenario's profit, times the term's weight.
Source code in src/odys/optimization/objective_terms/profit.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
__init__(term, inputs)
¶
Initialize the term.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
term
|
ProfitTerm
|
The profit term of the objective. |
required |
inputs
|
ObjectiveTermInputs
|
The objective, the shared indexing, and the entity formulations. |
required |
Source code in src/odys/optimization/objective_terms/profit.py
16 17 18 19 20 21 22 23 24 | |
build(inputs)
classmethod
¶
Return the profit term's formulation, or None if the objective has no profit term.
Source code in src/odys/optimization/objective_terms/profit.py
26 27 28 29 30 | |
expression()
¶
Return the weight times Σ_s probability_s · profit_s.
Source code in src/odys/optimization/objective_terms/profit.py
32 33 34 35 36 37 | |