|
  
Accumulate
Format: x -> y
Arguments: (real) x Any real value to add to the
global accumulator
[any] y Any valid expression
Returns: [any] y or value of the global
accumulator
Description: This operator is used exclusively for
building expected value decision trees. It allows you to enter
incremental value or cost numbers in tree nodes and then
calculate the total accumulated cost in end nodes.
The operator works by first evaluating x and adding its
value to a global accumulator variable. It then evaluates y,
resets the accumulator to its original value, and then returns
the value of y. Other nodes referenced in y will
most likely use the Accumulate operator as well and add
more to the accumulator variable. In end nodes, the expression
for y is omitted to cause the Accumulate operator
to return the value in the accumulator variable.
Examples: Try:=-100->emv(50%,Succeed,50%,Fail)
= Create a branch node
Succeed:=150-> = Create an
end node
Fail:=0-> = Create an end
node
Try = -25
Succeed = 50 (-100+150)
Fail = -100 (-100+0)
See Also: emv, max
|