Sections
Navigation
Running the Sample Application
Sample Application Development
API Specification
Hosted By
Inspired By
Copyright © 2002
The Feynman Project
The last part to grasp about the Framework is the properties file. This simple text file tells the Controller what classes to load. It also sets up the Simulation bean with initial values for some of its attributes. We will review in detail each element of the properties file.
This is a standard java.util.Properties file. Comments are indicated by the pound (#) sign and are ignored by the load method. Elements and their values are specified by writing the element name followed by an equals (=) sign and then the corresponding value of the element. The example below illustrates the text.
# This is a comment
PhysicalSystemClass=feynman.framework.system.CartesianSystem
To see the makeup of the file you can review the properties file source. To understand the elements in the file and its corresponding values use the following table as a guide. The table below gives a description of each element and what values are allowed. It also includes an example of how to define a value for the element.
Attribute | Description |
---|---|
PhysicalSystemClass | Presently this specifies the PhysicalSystem class to be used for the simulation. Notice that in the file the full package path is provided to specify this class. The only time you would change this path is if you develop your own PhysicalSystem class in your own package. |
PhysicalSystemClass=feynman.framework.system.CartesianSystem | |
Note: This element is subject to change in a future release. It will probably be replaced with a single element that specifies the coordinate system or mathematical function system be used. | |
PhysicalObjectFactoryClass | Presently this is how a PhysicalObject is specified. Remember from the discussion in the Factory Design section the Framework uses factories to create these objects. |
PhysicalObjectFactoryClass=feynman.framework.system.CartesianObjectFactory | |
Note: See the above note. This element might be replaced in future releases. | |
PhysicalObjectClass | This is a class from the application that you have developed that implements the PhysicalObject interface. In the sample application the Ball.java class was developed and so it is specified here. Notice that since the sample application did not have a package associated with it, there is no path specified. So how did the Controller class know where to find our classes? By default the Framework classpath looks in the classes directory under the feynman.jar root directory. |
PhysicalObjectClass=Ball | |
DoFinalReport | Simple boolean value of either true or false to indicate whether or not the Controller should perform an invocation of the report method from the FinalReport class that you specify in the next element. |
DoFinalReport=true | |
FinalReportClass | An application class that implements the FinalReport interface. In the sample application the Report.java class was developed and so it is specified here. |
ClassFinalReport=Report | |
DataStore | Indicates whether to use the FileDataStore or the DbmsDataStor types by being of value file or dbms. |
DataStore=file | |
DataStoreFile | Specifies the file name to store the data for the FileDataStore to. Notice the sample application produces the data.csv file in the main directory as shown in Running the Sample Application section. |
DataStoreFile=data.csv | |
DataStoreTable | Specifies the table name to insert the data for the DbamsDataStore in. |
DataStoreTable=table | |
NumberPhysicalObject | The number of PhysicalObjects that need to be created for the simulation. |
NumberPhysicalObjects=1 | |
Iterations | The number of iterations is the number of times the Controller will loop through integrating the numerical equations in the PhysicalAlgorithm implementation. |
Iterations=1000 | |
Interval | The interval is the step used by the algorithm in the implementation of the PhysicalAlgorithm. The smaller the interval the more accurate the simulation. In some types of simulations (i.e. Monte-Carlo), the interval is not necessary so it does not need to be specified. |
Interval=0.01 | |
PerformPhysicalMeasurement | A boolean value of true or false that indicates whether the simulation should take measurements of data or not. |
PerformPhysicalMeasurement=true | |
StartTime | The initial value of the clock at the start of the simulation. This value is incremented by Interval by the Controller to keep track of the time. This is also the way to specify the start time of a simulation that is a continuation of the previous one so the time is continuous with the previous data. |
StartTime=0.0 | |
PhysicalConfigurationClass | This is a class from the application that you have developed that implements the PhysicalConfiguration interface. In the sample application the Setup.java class was developed and so it is specified here. |
PhysicalConfigurationClass=Setup | |
PhysicalAlgorithmClass | This is a class from the application that you have developed that implements the PhysicalAlgorithm interface. In the sample application the SimpleGravity.java class was developed and so it is specified here. |
PhysicalAlgorithmClass=SimpleGravity | |
PhysicalMeasurementClass | This is a class from the application that you have developed that implements the PhysicalMeasurement interface. In the sample application the Measurement.java class was developed and so it is specified here. |
PhysicalMeasurementClass=Measurement |