Incorporating a Module into the FRAMEwork System (FRAMES)


Title Page
Legal Notice
Table of Contents
Introduction
Example
STEP 1
STEP 2
STEP 3
STEP 4
STEP 5
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
 

Appendix D
Installation Script for the Constantly Stirred Tank Reduction Model

The following code provides an installation script for the Constantly Stirred Tank Reduction Model being integrated into FRAMES. The first line of the script imports the installation functions. These functions are part of the install class. All source code for these classes can be found in the "Developer\FRAMES2API" subdirectory of FRAMES 2.0.

Basically, the install class does nothing more than attempt to install a dictionary, unit, measure, module, and domain. As can be seen below, the code first declares the install and defines some common file paths. The code then starts the install class, followed by the domain and modules (which can occur at any point in the installation process). The measures and units are added before the dictionaries. The code adds the modules after the dictionaries.

Note that the "System.out.println" calls in the script provide some feedback to the user that the installation is progressing.


import FRAMES2API.*;

Install inst=new Install();

String path="C:\\program files\\FRAMESV2\\";
String DicPath=path+"Dictionaries\\";
String ModPath=path+"Modules\\";
String ExePath=path;

inst.Start(path);

System.out.println("Adding FRAMES Domain");
inst.Domain("FRAMES",path+"Icons\\fui.ico");
System.out.println("Adding 3MRA Model Groups");
inst.ModelGroup("FRAMES","Example",path+"Icons\\src.ico");
System.out.println("Adding Units");
inst.Unit("Distance/Time","cm/yr","cm/yr",1/100.0,0.0);
inst.Measure("Solid Volume/Mass","cm^3/g","cm^3/g");
inst.Unit("Solid Volume/Mass","cm^3/g","cm^3/g",1.0,0.0);
inst.End();

inst.Start(path);

System.out.println("Adding Dictionaries");
inst.Dic(DicPath,"CSTROutput.dic");
inst.Dic(DicPath,"CSTRInput.DIC");

System.out.println("Adding Model");
inst.Mod(ModPath,"CSTRWrapped.MOD",ExePath);

inst.End();

Battelle Logo
Home | Security and Privacy | Contact Us