Tree structure

Adding nodesTo top

You can add children to decision and event nodes by:

  • Double-clicking on a node;
  • Clicking on the add-node toolbar button or,
  • Selecting Add node from the context menu.

Note that you cannot add children to payoff nodes.

Inserting nodesTo top

You can insert nodes to the left or right of existing nodes with the following exceptions:

  • You cannot insert a node to the left of the root node.
  • You cannot insert a node to the right of a payoff node.

You can insert a node by:

  • Selecting a node and choosing Insert node to left or Insert node to right from the add-node toolbar menu .

Moving nodesTo top

Nodes can be moved up and down in the tree by:

  • Selecting a node and choosing Move Node Up or Move Node Down from the move-node menu .

Removing nodesTo top

When nodes are removed from the tree their child nodes, if any, become children of their parent node. Note that the root node cannot be deleted.

To remove a node:

  • Click on the remove-node toolbar button or,
  • Select Remove Node from the context menu.

To remove a node and its child nodes:

  • Choose Remove Branch from the remove toolbar menu .

Changing node typesTo top

To change the type(s) of the selected node(s):

  • Click on a node-type toolbar button or,
  • Choose Change to [type] from the context menu.

Tree values

Node labelsTo top

Any node in the tree can be assigned a label. The label is located above the branch leading to the node. Click on this space to add a node label.

Node probabilitiesTo top

Nodes that are children of event nodes have associated probabilities. The probability field is located beneath the branch leading to the node.

You can use the special "@" character to force probabilities to sum to 1: Nodes with this probability value will evaluate to 1 minus the sum of the probabilities of sibling nodes.

Node payoffsTo top

All terminal nodes have associated payoff values, represented by a number to the right of the node. You can enter values directly in the tree or by double-clicking on a payoff node.

Nodes can have more than one payoff value assigned. By default, the tree is solved according to the displayed payoff. You can change the displayed payoff and payoff names through the payoff preferences form .

You can change the formula by which payoffs are evaluated through the analysis preferences form .

DistributionsTo top

You can define distributions that can be used in probability and payoff expressions throughout the tree. To create a new distribution:

  • Select Manage distributions from the definitions menu or
  • Click the add button in the distributions panel to the left of the tree.

Distributions can be sampled by performing a Monte Carlo simulation. Distributions evaluate to their means when performing basic rollback or sensitivity analyses.

VariablesTo top

You can define variables that can be used in probability and payoff expressions throughout the tree. To create a new variable:

  • Select Manage variables from the definitions menu or
  • Click the add button in the variables panel to the left of the tree.

Variables are assigned a base numerical value that is available throughout the tree. Additionally, you can update variable definitions at specific nodes:

  • Select Define variable at node from the context menu while a node is selected and choose the variable to define.
The variable definition at a node can be any expression and can even reference itself recursively.

Files

Saving filesTo top

There are three saving options available from the save menu :

  • Save the open tree. You will be prompted for a name if the tree has never been saved.
  • Save As for the open tree. You will be prompted for a new name for the tree. Once saved you will be working with the new tree.
  • Save a Copy of the open tree. You will be prompted for a new name for the copy. Once saved you will still be working on the same tree.

Opening filesTo top

You can open an existing saved tree in a new window by clicking on the open-tree menu button . This will launch a dialog to select a saved tree to open.

Creating filesTo top

Create a new tree by clicking on the create-tree menu button .

Solving the tree

Basic solveTo top

Click on the solve menu button to solve the tree. Click again to hide the solution.

An alert will display if you attempt to solve a poorly formed tree where one or more leaf nodes are not payoff nodes.

Analysis preferencesTo top

Click on the analysis preferences menu button to set preferences for the analysis:

  • Solve for. You can solve for the minimum or maximum payoff in the tree. By default the tree solves for the maximum payoff.
  • Ensure that probabilities sum to 1. If you select this option an error will occur when probabilities stemming from an event node don't sum to 1.
  • Payoff function. By default the analysis will be performed using the payoffs displayed in the tree. You can instead enter a function to evaluate the payoffs.

Expressions

OperatorsTo top

OperatorExampleDescriptionReturns
+x + yAdditionThe sum of x and y.
-x - ySubtractionThe difference between x and y.
*x * yMultiplicationThe product of x and y.
/x / yDivisionThe quotient of x and y. Throws an exception if y is 0.
^x ^ yExponentiationx raised to the y power.
!! xLogical not0 if x is greater than 0, else 1.
&&x && yLogical and1 if x and y evaluate to greater than 0, else returns 0.
||x || yLogical or1 if x or y evaluates to greater than 0, else returns 0.
? :x ? y : zTernaryy if x evaluates to greater than 0, else z.
()x * (y + z)ParenthesesGrouping for operator precedence.

ComparatorsTo top

ComparatorExampleDescriptionReturns
<x < yLess than1 if x is less than y, else 0.
<=x <= yLess than or equal1 if x is less than or equal to y, else 0.
>x > yGreater than1 if x is greater than y, else 0.
>=x >= yGreater than or equal1 if x is greater than or equal to y, else 0.
<>x <> yNot equal1 if x is not equal to y, else 0.
!=x != yNot equal1 if x is not equal to y, else 0. Synonomous with <>.

Operator PrecedenceTo top

SymbolDescriptionPrecedence
-, !Unary minus, negation8
^Power7
*Multiplication6
/Division6
+Addition5
-Subtraction5
==, >, <, etc.Comparators4
&&Logical and3
||Logical or3
?Ternary2
()Grouping1
,Function argument separator1

ConstantsTo top

ConstantDescriptionEvaluates to
EBase of natural logarithm~ 2.718
FALSEFalse0
LN2Natural logarithm of 2~ 0.693
LN10Natural logarithm of 10~ 2.302
PIPi~ 3.1416
SQRT1_2Square root of 1/2~ 0.707
SQRT2Square root of 2~ 1.414
TRUETrue1

FunctionsTo top

FunctionDescriptionReturns
abs(x)Absolute valueThe absolute value of x.
acos(x)ArccosineThe arccosine of x. Throws exception if x is less than -1 or greater than 1.
and(x0, x1, ... xn)And1 if all arguments are greater than 0, else 0.
asin(x)ArcsineThe arcsine of x. Throws exception is x is less than 0 or greater than 1.
atan(x)ArctangentThe arctangent of x. Throws exception is x is less than -1 or greater than 1.
ceiling(x)Ceilingx rounded up to the closest integer.
choose(x, y0, y1, ... yn)Chooseyi where i is equal to x. Throws exception if x does not correspond to an element index.
compound(rate, periods)CompoundThe periodic rate compounded over the specified periods.
cos(x)CosineThe cosine of x.
discount(amount, rate, periods)DiscountThe present value of amount discounted at a periodic rate over periods.
exp(x)Exponente raised to x.
floor(x)Floorx rounded down to the nearest integer.
if(x, y, z)Ify if x is greater than 0, else z.
log(x)Base-10 logarithmThe base-10 logarithm of x. Throws exception if x is less than or equal to 0.
ln(x)Natural logarithmThe natural logarithm of x. Throws exception if x is less than or equal to 0.
max(x0, x1, ... xn)MaximumThe maximum value among the arguments.
mean(x0, x1, ... xn)MeanThe arithmetic mean of the arguments.
min(x0, x1, ... xn)MinimumThe minimum value among the arguments.
mod(x, y)ModuloThe remainder of dividing x by y. Throws exception if y is 0.
not(x)Negation0 if x is greater than 0, else returns 1.
npv(rate, x0, x1, ... xn)Net present valueThe net present value of payments x0...xn discounted by periodic rate. Payments occur at the end of each period.
oddsToProb(odds)Odds to probabilityThe odds as a probability.
or(x0, x1, ... xn)Or1 if any arguments are greater than 0, else 0.
pow(x, y)Powerx raised to the y power.
probToOdds(prob)Probability to oddsThe probability prob as odds.
probToRate(prob, periods)Probability to rateProbability prob converted to a rate over periods.
product(x0, x1, ... xn)ProductThe product of x0...xn.
pv(pmt, final, rate, periods)Present valueThe present value of recurring payment amount pmt over periods discounted by rate. final is a final payment at the end of the last period.
quotient(x, y)QuotientThe integer portion as a result of dividing x by y. Throws exception if y equals 0.
rand()RandomA pseudo-random number in the range [0,1].
randInt(x, y)Random integerA pseudo-random integer in the range [x, y].
rangeRange(x, y)Random rangeA pseudo-random number in the range [x, y].
rateToProb(rate, periods)Rate to probabilityThe rate over periods as a probability.
round(x)Roundx rounded to the nearest integer.
sin(x)SineThe sine of x.
sqrt(x)Square rootThe square root of x.
sum(x0, x1, ... xn)SumThe sum of x0...xn.
tan(x)TangentThe tangent of x.

Distribution reference

BetaTo top

Parameters
Domain
Mean
PDF
CDF

BinomialTo top

Parameters
Domain
Mean
PMF
CDF

ErlangTo top

Parameters
Domain
Mean
PDF
CDF

ExponentialTo top

Parameters
Domain
Mean
PDF
CDF

GammaTo top

Parameters
Domain
Mean
PDF
CDF

LaplaceTo top

Parameters
Domain
Mean
PDF
CDF

Log LogisticTo top

Parameters
Domain
Mean
PDF
CDF

Log NormalTo top

Parameters
Domain
Mean
PDF
CDF

LogarithmicTo top

Parameters
Domain
Mean
PMF
CDF

LogisticTo top

Parameters
Domain
Mean
PDF
CDF

NormalTo top

Parameters
Domain
Mean
PDF
CDF

PoissonTo top

Parameters
Domain
Mean
PMF
CDF

RayleighTo top

Parameters
Domain
Mean
PDF
CDF

TriangularTo top

Parameters
Domain
Mean
PDF
CDF

UniformTo top

Parameters
Domain
Mean
PDF
CDF

WeibullTo top

Parameters
Domain
Mean
PDF
CDF