Simple Simulation
Overview
The simple simulation example has two main parts.
First, using Visual Basic, we wrote an ActiveX DLL and installed it on our server. This DLL references the @RISK Developer's Kit ActiveX library, and contains all the model logic for simulating distribution defined by the user. It also contains code for generating the progress and output the you see in the example's results.
Second, we wrote a sequence of web pages to retrieve the
model's input parameters from the user, to dynamically show
the progress of the simulation, and to display the output
results. One of the web pages in the sequence uses VBScript
to call our DLL, passing it the model parameters specified
by the user. When the simulation is complete, the results
page displays the graph generated by the DLL in a nicely formatted
web page.
RDKX_SimpleSim.DLL
This DLL contains only a single publicly accessible method,
called Simulate. The function
takes as arguments all the input model parameters, as well
as an output directory to which it will write graphs and results.
The Simulate method performs
the following five steps:
1. Initializes the RDK
2. Sets up the Model
3. Runs the Simulation
4. Generates the Results
5. Shuts Down the RDK
The function generates the graphic file, "HISTOGRAM.JPG" in the output directory specified. This file is referenced by the calling .ASP page to make the final result page that is displayed to the user.
There are two code modules that make up the RDKX_SimpleSim.DLL
form goes here