PIANOS
Class Generator

java.lang.Object
  extended by PIANOS.Generator

public class Generator
extends java.lang.Object

The PIANOS main class. Writes Fortran module files for a simulation program that matches the model description files given. May be run on the command line with 8 or 1 parameters, see the PIANOS manual on the CD-ROM or in the tar.gz for details. See writeProgram for the Java way of running PIANOS.


Constructor Summary
Generator()
           
 
Method Summary
static java.util.ArrayList<java.lang.String> generateIntroduction()
           
static void main(java.lang.String[] args)
          The PIANOS command-line interface.
static void setModel(ComputationalModel modelToSet)
           
static void writeProgram(java.lang.String userDistFileName, java.lang.String modelFileName, java.lang.String initialValueFileName, java.lang.String simulationFileName, java.lang.String proposalFileName, java.lang.String updateFileName, java.lang.String toOutputFileName, java.lang.String lastValueFileName)
          The PIANOS main interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
Method Detail

setModel

public static void setModel(ComputationalModel modelToSet)

writeProgram

public static void writeProgram(java.lang.String userDistFileName,
                                java.lang.String modelFileName,
                                java.lang.String initialValueFileName,
                                java.lang.String simulationFileName,
                                java.lang.String proposalFileName,
                                java.lang.String updateFileName,
                                java.lang.String toOutputFileName,
                                java.lang.String lastValueFileName)
                         throws MissingFunctionException,
                                SyntaxException,
                                InvalidProposalException,
                                java.io.IOException,
                                MissingDistributionException,
                                IllegalParametersException,
                                InvalidModelException
The PIANOS main interface. Writes definitions.f90, input.f90, output.f90, proposal.f90, main.f90. Note that when compiling the user will also need user_dist.f90 that contains the user-defined distributions used in the model.

Parameters:
userDistFileName - the filename of the user-defined distributions file
modelFileName - the filename of the model description file
initialValueFileName - the filename of the simulation initial values file
simulationFileName - the filename of the simulation parameters file (burn-in, thinning)
proposalFileName - the filename of the proposal strategies and distributions file
updateFileName - the filename of the update strategy and iterations file
toOutputFileName - the filename of the parameters desired as output
lastValuesFileName - the filename of the file where the last values are to be saved after the simulation
Throws:
MissingFunctionException
SyntaxException
InvalidProposalException
java.io.IOException
MissingDistributionException
IllegalParametersException
InvalidModelException

main

public static void main(java.lang.String[] args)
                 throws SyntaxException,
                        java.io.IOException
The PIANOS command-line interface. Writes definitions.f90, input.f90, output.f90, proposal.f90, main.f90. Note that when compiling the user will also need user_dist.f90 that contains the user-defined distributions used in the model. Command-line parameters specified in order (choose first 8 or the last one which incorporates the 8):

Parameters:
userDistFileName - the filename of the user-defined distributions file
modelFileName - the filename of the model description file
initialValueFileName - the filename of the simulation initial values file
simulationFileName - the filename of the simulation parameters file (burn-in, thinning)
proposalFileName - the filename of the proposal strategies and distributions file
updateFileName - the filename of the update strategy and iterations file
toOutputFileName - the filename of the parameters desired as output
lastValuesFileName - the filename of the file where the last values are to be saved after the simulation
allFilesFileName - (mutually exclusive with the parameters above) A file containing the file names of all the files specified above, in the format:
(begin of file)
user distributions: relative/path/to/user_dist.f90
model: relative/path/to/modelFile
initial values: relative/path/to/initialValuesFile
simulation: relative/path/to/simulationFile
proposals: relative/path/to/proposalsFile
update strategy: relative/path/to/updateFile
to output: relative/path/to/toOutputFile
last values: relative/path/to/lastValuesFile
(end of file)
The order of the identifier - file name pairs is arbitrary.
The file may contain comments beginning with a hash '#'
Throws:
SyntaxException
java.io.IOException

generateIntroduction

public static java.util.ArrayList<java.lang.String> generateIntroduction()