36 ext::shared_ptr<FdmInnerValueCalculator> gasPrice,
37 ext::shared_ptr<FdmInnerValueCalculator> sparkSpreadPrice)
38 :
heatRate_(params.heatRate), pMin_(params.pMin), pMax_(params.pMax), tMinUp_(params.tMinUp),
39 tMinDown_(params.tMinDown), startUpFuel_(params.startUpFuel),
40 startUpFixCost_(params.startUpFixCost), fuelCostAddon_(params.fuelCostAddon),
41 stateDirection_(mesh.stateDirection), nStates_(nStates),
mesher_(mesh.mesher),
42 gasPrice_(
std::move(gasPrice)), sparkSpreadPrice_(
std::move(sparkSpreadPrice)),
43 stateEvolveFcts_(nStates_) {
46 "mesher does not fit to vpp arguments");
69 for (
const auto& iter : *
mesher_->layout()) {
70 a[iter.index()] +=
evolve(iter,
t);
73 for (
const auto& iter : *
mesher_->layout()) {
1-D array used in linear algebra.
1-D array used in linear algebra.
const std::vector< Size > & coordinates() const
FdmVPPStepCondition(const FdmVPPStepConditionParams ¶ms, Size nStates, const FdmVPPStepConditionMesher &mesh, ext::shared_ptr< FdmInnerValueCalculator > gasPrice, ext::shared_ptr< FdmInnerValueCalculator > sparkSpreadPrice)
Real evolveAtPMax(Real sparkSpread) const
virtual Array changeState(Real gasPrice, const Array &state, Time t) const =0
Real evolve(const FdmLinearOpIterator &iter, Time t) const
const Size stateDirection_
const ext::shared_ptr< FdmMesher > mesher_
const Real fuelCostAddon_
const ext::shared_ptr< FdmInnerValueCalculator > gasPrice_
void applyTo(Array &a, Time t) const override
Real evolveAtPMin(Real sparkSpread) const
const ext::shared_ptr< FdmInnerValueCalculator > sparkSpreadPrice_
std::vector< ext::function< Real(Real)> > stateEvolveFcts_
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
layer of abstraction to calculate the inner value
iterator for a linear fdm operator
memory layout of a fdm linear operator
VPP step condition for FD models.
const ext::shared_ptr< FdmMesher > mesher_
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container