20 "Evaluates a scaled absolute difference reward function for a process "
21 "which is controlled by a Deep Reinforcement Learning based surrogate.");
23 params.
addRequiredParam<FunctionName>(
"design_function",
"The desired value to reach.");
25 "observed_value",
"The name of the Postprocessor that contains the observed value.");
27 params.
addParam<Real>(
"c1", 10,
"1st coefficient in the reward function.");
28 params.
addParam<Real>(
"c2", 1,
"2nd coefficient in the reward function.");
37 _design_function(getFunction(
"design_function")),
38 _observed_value(getPostprocessorValueByName(getParam<PostprocessorName>(
"observed_value"))),
39 _c1(getParam<Real>(
"c1")),
40 _c2(getParam<Real>(
"c2"))
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("StochasticToolsApp", ScaledAbsDifferenceDRLRewardFunction)
static InputParameters validParams()
virtual Real value(Real t, const Point &p) const
A simple reward function which uses c1*|x-x_target|+c2.
const Function & _design_function
Value we would like to reach (can be time and space dependent)
const PostprocessorValue & _observed_value
Postprocessor containing the observed value.
virtual Real value(Real t, const Point &p) const override
const Real & _c1
Coefficients for the reward function.
static InputParameters validParams()
ScaledAbsDifferenceDRLRewardFunction(const InputParameters ¶meters)