Live Chat
Source Code

Fit Sample Data

Overview
The fit sample data example has two main parts.

First, using Visual Basic, we wrote an ActiveX DLL and installed it on our server. This DLL references the BestFit Developer's Kit ActiveX library, and all the code for fitting a set of input data and returning the nicely formatted graphs and results you seeing the example's result window.

Second, we wrote a sequence of web pages to retrieve some input data from the user, and to display the fit results. One of the web pages in the sequence uses VBScript to call our DLL, passing it the data entered by the user. When the fitting is complete, the results page combines together the statistics and graphs generated by the DLL into a nicely formatted page, suitable for display.

RDKX_FitSampleData.DLLL
This DLL contains two publicly accessible methods.

The GetRandomData method, is a utility routine for getting a set of default random data that can be displayed in a web page.

The PerformFit method takes as arguments all the input data, as well as an output directory to which it will write graphs and results. The PerformFit method performs the following five steps:

     1. Initializes the BDK
     2. Defines a BDKInput Object
     3. Fits the Input, and Selects the Best Result
     4. Generates the Results For Display
     5. Shuts Down the BDK

The method generates two files in the output directory specified, "GRAPH.JPG," and "FITRESULTS.HTML". The files are combined together by the calling .ASP page to make the final page that is displayed to the user.

In the code listings, items in blue are an object, method or property from the RDKX.

Fit_Sample_Data_Results.ASP
This .ASP page uses VBScript to call the RDKX_FitSampleData.DLL which is installed on our server. It then writes the results generated by the DLL (the \GRAPH.JPG and \FITRESULTS.HTML files) into a nicely formatted web page. A previous web page passes in the model parameters defined by the user using an HTML form.

 




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