Live Chat
BestFit

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

1. Application Class Module - this is the main, publicly accessible module of the .DLL, which contains the Simulate method.
2. RDKEvents Class Module - this module contains the code that actually calculates the model's output each iteration of a simulation. In addition, it also contains code for making dynamic progress graphs during the simulation.
In the code listings, items in blue are an object, method or property from the RDKX.

SimpleSim_Results.ASP
This .ASP page uses VBScript to call the RDKX_SimpleSim.DLL, which is installed on our server, and then displays the results generated by the DLL (in the HISTOGRAM.JPG file) into a nicely formatted web page. A previous web page passes in the model parameters that were defined by the user.

 




form goes here

Contact:
Palisade Corporation
798 Cascadilla Street
Ithaca, NY 14850-3239
sales@palisade.com
 
800 432 RISK (US/Can)
+ 1 607 277 8000
+ 1 607 277 8001 fax
Palisade Europe
+44 1895 425050
sales@palisade-europe.com
www.palisade-europe.com
Palisade Asia-Pacific Pty Limited
+61 2 9929 9799
sales@palisade.com.au
www.palisade.com.au
Palisade Latinoamérica
+1 607 277 8000
ventas@palisade-lta.com
www.palisade-lta.com