Instantaneous rewards (i.r.) define how much the cumulative reward (c.r.) will
increase by time unit. These i.r. values can be set in two different ways:
- During the specification of the reward. Here the pairs condition-value
defines all about our i.r.
rate_reward = fluid1
condition = (state == 1)
value = -124.5;
NOTE: in the above example, the value of the i.r. changes in
accordance with the value of state, i.e. 0 when the condition is
false and -124.5 otherwise.
- Inside the action code, through the set_ir command,
which overrides the previous value of the i.r. After using this command,
this reward will increase by the value set.
NOTE: Conditional values of i.r., as in the previous note, are
only allowed in the reward declaration part. Once set_ir is used,
the conditional is ignored. To restore the conditional declaration, use
unset_ir.
set_ir(fluid1, 100.5);
set_ir(utilization, 0);
Commands get_ir and unset_ir are used in the code of an
action to get an instantaneous reward's value and to enable automatic
calculation, respectively. Their behavior will be defined by eq. ()
below.
x = get_ir(Queue_size);
unset_ir(utilization);
Guilherme Dutra Gonzaga Jaime
2010-10-27