Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Static Public Member Functions | Static Public Attributes | List of all members
idyno.Idynomics Class Reference

Main class to run to launch the iDynoMiCS tool. More...

Static Public Member Functions

static void main (String[] args)
 
  • Main method used to start iDynoMiCS
More...
 
static void show_Update_Box (String[] args, String updateInfoMessage)
 Method to show that an iDynomics update is available. More...
 
static void startIDynomics () throws Exception
 Launches a simulation of each of the protocol files provided. More...
 
static LinkedList< File > chooseFile ()
 Method to select protocol files from a file selection dialog if run in Eclipse. More...
 
static void processArguments (String[] args)
 Processes the command line or Eclipse protocol file selection arguments, forming a list of simulations to be run. More...
 
static boolean initSimulation (int iSimul)
 Create the result directories and simulator object for the simulation to be run. More...
 
static boolean checkForRestart (String activePath, String protocolFile)
 Checks the protocol file to see whether a previous simulation is being restarted. More...
 
static boolean checkForQuietMode (String protocolFile)
 Checks the protocol file to determine whether quiet mode has been enabled. More...
 
static boolean checkForReleaseUpdate (String activePath, String protocolFile) throws Exception
 Checks the protocol file to determine whether the user wishes to check for iDynoMiCS update, and if so performs the check. More...
 
static boolean iDyno_New_Released_Version_Check () throws Exception
 Checks whether this version of iDynoMiCS is the latest stable release. More...
 
static void launchSimulation (int iSimul)
 Executes the simulation object for a particular protocol file. More...
 
static void listDirectory (java.io.File aDirectory, String filter, LinkedList< File > fileList)
 Processes the files and directories selected from the dialog box when iDynoMiCS is run in Eclipse. More...
 

Static Public Attributes

static double version_number = 1.0
 
static String[] programArgs
 
static double newVersionNumber
 
static double begin
 
static Simulator aSimulator
 
static boolean quietMode = false
 
static String currentPath
 
static InitialisationErrorLog initErrorLog
 

Detailed Description

Main class to run to launch the iDynoMiCS tool.

Launch iDynomics using this class. Syntax: To launch a single simulation idyno.Idynomics \protocol\protocolFileURL - To launch a batch of simulations idyno.Idynomics \protocol\FilesDirectory

Please make sure you are aware of the licensing agreement when you are running the iDynomics tool. This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

Since
June 2006
Version
1.1
Author
Andreas Dötsch (andre.nosp@m.as.d.nosp@m.oetsc.nosp@m.h@he.nosp@m.lmhol.nosp@m.tz-h.nosp@m.zi.de)
Laurent Lardon (lardo.nosp@m.nl@s.nosp@m.upagr.nosp@m.o.in.nosp@m.ra.fr)
Brian Merkey (brim@.nosp@m.env..nosp@m.dtu.d.nosp@m.k, bvm@n.nosp@m.orth.nosp@m.weste.nosp@m.rn.e.nosp@m.du)
João Xavier (xavie.nosp@m.rj@m.nosp@m.skcc..nosp@m.org)
Cristian Picioreanu (C.Pic.nosp@m.iore.nosp@m.anu@t.nosp@m.udel.nosp@m.ft.nl)
Jan-Ulrich Kreft (j.kre.nosp@m.ft@b.nosp@m.ham.a.nosp@m.c.uk)
Rob Clegg (rjc09.nosp@m.6@bh.nosp@m.am.ac.nosp@m..uk)
Kieran Alden (k.j.a.nosp@m.lden.nosp@m.@bham.nosp@m..ac..nosp@m.uk)

Member Function Documentation

static boolean idyno.Idynomics.checkForQuietMode ( String  protocolFile)
static

Checks the protocol file to determine whether quiet mode has been enabled.

This method checks the protocol file provided to determine whether quiet mode has been specified. If this is the case, the simulation will note this in the log file

Parameters
protocolFileThe path to the protocol file that is being checked
Returns
boolean stating whether quiet mode is enabled or not
static boolean idyno.Idynomics.checkForReleaseUpdate ( String  activePath,
String  protocolFile 
) throws Exception
static

Checks the protocol file to determine whether the user wishes to check for iDynoMiCS update, and if so performs the check.

This method checks the protocol file provided to determine whether the user has turned iDynoMiCS update off. If this is the case, the simulation will not check that it is the most up to date version. However, if this is true, the simulation performs a check against the online repository as to whether this is the latest version. If it is not the latest version, true is returned, and the user will be shown a screen detailing the changes in the new version, and given the option as to whether to update. If either this is the latest version or the user has turned updating off, false will be returned. Note that if checkForReleaseUpdate is not in the protocol file, FALSE is returned and no check will be performed

Author
Kieran Alden (k.j.a.nosp@m.lden.nosp@m.@bham.nosp@m..ac..nosp@m.uk)
Parameters
activePathPath to the first protocol file being processed
protocolFileThe path to the protocol file that is being checked
Returns
boolean stating whether an update needs to be installed (true) or whether the software is up to date or update checking is off (false)
static boolean idyno.Idynomics.checkForRestart ( String  activePath,
String  protocolFile 
)
static

Checks the protocol file to see whether a previous simulation is being restarted.

This method checks the protocol file provided to determine whether a previous run is being restarted. If this is the case, the original results file folder and log files are resused

Author
Brian Merkey (brim@.nosp@m.env..nosp@m.dtu.d.nosp@m.k, bvm@n.nosp@m.orth.nosp@m.weste.nosp@m.rn.e.nosp@m.du)
Parameters
activePathPath to the first protocol file being processed
protocolFileName of the protocol file that is being checked
Returns
boolean stating whether this is a restarted simulation or not
static LinkedList<File> idyno.Idynomics.chooseFile ( )
static

Method to select protocol files from a file selection dialog if run in Eclipse.

When run from the command line (using the RunIDyno.py file), the simulation expects XML protocol file names to be provided. If however the simulation is run from Eclipse (which is possible, especially for those developing it), the user would have to either specify the file name as a Run Argument, or provide this during RunTime. This method allows the latter, presenting the simulation user with a selection box from which to choose one or more protocol files on which simulations should be run. These are returned within a linked list for later processing

Returns
a linked list, protocolFiles, of XML files selected from the dialog box

protocolFiles - a linked list that will contain the files selected from the dialog box

static boolean idyno.Idynomics.iDyno_New_Released_Version_Check ( ) throws Exception
static

Checks whether this version of iDynoMiCS is the latest stable release.

This method checks with the online repository whether this version of iDynoMiCS is up to date. If this is not the case, true is returned and the user will be prompted to update iDynoMiCS if they wish. If this is the latest version, false will be returned and the simulation starts as normal

Author
Kieran Alden (k.j.a.nosp@m.lden.nosp@m.@bham.nosp@m..ac..nosp@m.uk)
Returns
boolean stating whether an update is required (true) or not (false)
Exceptions
ExceptionException generated if a problem checking release status online (but this is dealt with elsewhere should this occur)
static boolean idyno.Idynomics.initSimulation ( int  iSimul)
static

Create the result directories and simulator object for the simulation to be run.

Called for each protocol file specified in the command line or Eclipse arguments. This method first of all checks whether the specified simulation is new or a restart of a previous simulation. If the latter is the case the log file is reopened and a log added stating this is the restart of a previous simulation. If a new simulation, the relevant result file directories are created, a log file created for population as the simulation progresses, and the protocol file copied into the results folder for ease of reference alongside results. Once the required folders are created (where necessary), a simulator object is created for this run. Should this be successful, true is returned to note the simulation was initialised ok. If not, the main program is informed such that the run is not performed.

Parameters
iSimulThe number that references a protocol file in the array of protocol files being processed
static void idyno.Idynomics.launchSimulation ( int  iSimul)
static

Executes the simulation object for a particular protocol file.

Launches a simulation for each of the provided protocol files, and logs how long the simulation has taken to run under those conditions

Parameters
iSimulAn integer reference to the protocol file name array
static void idyno.Idynomics.listDirectory ( java.io.File  aDirectory,
String  filter,
LinkedList< File >  fileList 
)
static

Processes the files and directories selected from the dialog box when iDynoMiCS is run in Eclipse.

When iDynoMiCS is run, the user has to specify protocol files. This is done either via a dialog box in Eclipse, or from the command line if run from RunIDyno.py. This method takes the files and directories that have been specified either way and processes these, adding the relevant files to a linked list. There are a few considerations here (a) If only one file is selected, the method checks this is the correct file type (specified by input argument filter) and if so adds this to the list. (b) If the selection is a directory, the whole directory is added to the list, again after a pre-check that the files are of the correct file format

Parameters
aDirectoryThe file(s) or directory selected from the dialog box or specified on the command line for processing
filterThe file format of the protocol files (basically the filter to apply to these files)
fileListThe linked list that the protocol files should be added to
static void idyno.Idynomics.main ( String[]  args)
static

  • Main method used to start iDynoMiCS

This method starts iDynoMiCS and launches the required methods to process the protocol files provided by the user. Firstly, these command line or Eclipse dialog box arguments are processed, such that the tool is aware of the protocol files it needs to process. With this complete, the tool performs a check that tests whether it is the latest stable release of iDynoMiCS. If this is the case, the simulation starts as normal. If not, the user has the opportunity to update iDynoMiCS and relaunch the tool. Note that this check can be turned off in the protocol file, and thus a further check is included in this file to determine if the check is enabled.

Parameters
argsSimulation arguments passed from the command line
static void idyno.Idynomics.processArguments ( String[]  args)
static

Processes the command line or Eclipse protocol file selection arguments, forming a list of simulations to be run.

iDynoMiCS can be run in a couple of different ways. Yet both require the user to specify one or a set of XML protocol files that describe the simulation that will be run. This method is used in both Eclipse and command line version of iDynoMiCS, and processes this input. For a command line run (from RunIDyno.py for example), the user will specify the protocol files on the command line. For an eclipse run, these will be specified via a file selection dialog box. Either way, these are then processed into two string arrays, one containing the paths to the protocol files to be run and another containing the names of the protocol files. Once this is complete. iDynoMiCS can be started such that each is processed in turn.

Parameters
argsThe protocol file names specified on the command line (not used in an eclipse run)
static void idyno.Idynomics.show_Update_Box ( String[]  args,
String  updateInfoMessage 
)
static

Method to show that an iDynomics update is available.

This method creates a dialog box on the screen that shows that an update is available for the iDynomics package. This dialog box will contain information from a file history.html, on the iDynomics web server, that details the changes included within this new version. The user is given two options - to either install the update (after which they will need to restart iDynomics), or proceed with the simulation without installing the update

Parameters
argsThe program arguments sent in to iDynomics
updateInfoMessageThe list of changes in this update, from history.html
static void idyno.Idynomics.startIDynomics ( ) throws Exception
static

Launches a simulation of each of the protocol files provided.

This method iterates through each of the protocol files provided and launches a simulation under each of these conditions. Once this is complete, the random number state file for that simulation is also written to file. Note that from version 1.2 this method is new - but all this code previously existed in the main method. It has been moved here to work with the updater - the user may get the update screen but choose not to update. If this is the case, they need to be located somewhere where they can launch the simulation. This was only possible by creating a new method

Member Data Documentation

Simulator idyno.Idynomics.aSimulator
static

A simulation object that runs the simulator under the conditions specified in the protocol file

double idyno.Idynomics.begin
static

A double used to calculate how long the simulation has taken to run under a set of specified conditions

String idyno.Idynomics.currentPath
static

parameter set such that the simulator knows the current path to read/write the random number file

InitialisationErrorLog idyno.Idynomics.initErrorLog
static

Log to hold any issues with simulation initialisation. Created as initialisation happens prior to creation of any log file

double idyno.Idynomics.newVersionNumber
static

Store new version number (if there is one) globally as required by action handlers

String [] idyno.Idynomics.programArgs
static

The program arguments sent in with this run (which have yet to be processed) - passed round such that these can be processed after the update check

boolean idyno.Idynomics.quietMode = false
static

When this is true, only the absolute essentials are displayed and written to the log file

double idyno.Idynomics.version_number = 1.0
static

Version number of this iteration of iDynoMiCS - required by update procedure


The documentation for this class was generated from the following file: