Differences between revisions 14 and 15
Revision 14 as of 2018-10-03 15:19:59
Size: 2258
Editor: khellman
Comment:
Revision 15 as of 2018-10-05 10:28:36
Size: 2280
Editor: khellman
Comment: / between node ids
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
OUTPUT :a12,a23,a34,a46: 0.5726
OUTPUT :a13,a36: 0.0181
OUTPUT :a12,a25,a56: 0.0015
OUTPUT :a12,a23,a3
6: 0.0945
OUTPUT :a14,46: 0.1944
OUTPUT :a13,a34,a46: 0.1189
OUTPUT :a1/2,a2/3,a3/4,a4/6: 0.5726
OUTPUT :a1/3,a3/6: 0.0181
OUTPUT :a1/2,a2/5,a5/6: 0.0015
OUTPUT :a1/2,a2/3,a3/
6: 0.0945
OUTPUT :a1/4,a4/6: 0.1944
OUTPUT :a1/3,a3/4,a4/6: 0.1189
Line 28: Line 28:
OUTPUT :a12, a23, a34, a46: 0.5726 OUTPUT :a1/2, a2/3, a3/4, a4/6: 0.5726

Write a program SIM (meeting the usual requirements) that implements the Monte Carlo simulation for Stochastic Area Networks in section 2.4.4 of the text.

Input & Output

Your SIM program will take several arguments:

Argument

Value

1

File of $Uniform(0,1)$ values; use one of these if you like

2

Number of iterations to run ($N$)

3

A text file describing the SAN (details below)

Your program should produce output such as (compared to the book's table on page 83, we simply displaying the $\pi_k$ and $\hat{p}_a(\pi_k)$ columns):

OUTPUT    :a1/2,a2/3,a3/4,a4/6:     0.5726
OUTPUT    :a1/3,a3/6:             0.0181
OUTPUT    :a1/2,a2/5,a5/6:         0.0015
OUTPUT    :a1/2,a2/3,a3/6:         0.0945
OUTPUT    :a1/4,a4/6:              0.1944
OUTPUT    :a1/3,a3/4,a4/6:         0.1189

Note that the there is no specific order to the output,1 but you must provide an entry for all possible paths. However, the paths should be formatted without any intervening white space, beware:

OUTPUT    :a1/2, a2/3, a3/4, a4/6:  0.5726

is no good

The value provided for each path is the critical path point estimate described in the book.

SAN Description Files

Consider the following network:

network-example.svg

this would be represented as a simple text file:

1 2 3
2 3 5
1 4 6
1 3 2
4 3 1.5
4 5 6
3 5 4

Per row, the first term is the source node, the second term is the destination node, and the third term is the upper bound for a $Uniform(a,b)$ distribution. For instance, the distribution for the a13 arc should be $Uniform(0,2)$. The largest numbered node in the second column (over all the nodes in the network) may always be considered the terminal node and node 1 will always be the single source node of the network.

Submit Your Work

Log into the course website and submit your project archive file for grading.

Rubric

TBD :(

  1. Because we have sort -n -k2 at our disposal (1)

Assignments/StochasticAreaNetworks/CriticalPath (last edited 2023-12-27 12:12:44 by khellman)