Scripting exercise: Risk Analysis Decision Tree

An example posted to our old forum by Robert Lamb:

While looking for an excuse to use scripting I came up with this.

A simple decision tree / risk model

  • Change the End node values
  • Run the script
  • Intermediate and final values are recalculated

Modify only the end node values
Create a text file for the script ==> RiskCalc.py
Code can bes found in the “Run this script” entity.

1st version used attributes rather then entity text for the values, all results then output to the console.
This version allow you to easily see the values, and updates on the display.

This format could also be used for bottom up estimating.
Suggestions welcome.

Note: Thanks to Joe Pearce for info on how to pull in the values.

EMV Project Selection Version 2.xlogic (51.2 KB)