$darkmode
DENOPTIM
denoptim.programs.RunTimeParameters Class Referenceabstract

Collection of parameters controlling the behavior of the software. More...

Inheritance diagram for denoptim.programs.RunTimeParameters:
[legend]
Collaboration diagram for denoptim.programs.RunTimeParameters:
[legend]

Classes

enum  ParametersType
 Identifier of the type of parameters. More...
 

Public Member Functions

 RunTimeParameters (ParametersType paramType)
 Constructor. More...
 
String paramTypeName ()
 Returns a string defining the type the parameters collected here. More...
 
String getWorkDirectory ()
 Gets the pathname to the working directory. More...
 
void setWorkDirectory (String pathname)
 Gets the pathname to the working directory. More...
 
String getLogFilePathname ()
 Gets the pathname to the log file. More...
 
void setLogFilePathname (String pathname)
 Sets the pathname to the log file. More...
 
Logger getLogger ()
 Get the name of the program specific logger. More...
 
Logger startProgramSpecificLogger (String loggerIdentifier) throws SecurityException, IOException
 Starts a logger with the given name. More...
 
Logger startProgramSpecificLogger (String loggerIdentifier, boolean toLogFile) throws SecurityException, IOException
 Starts a logger with the given name. More...
 
Logger startConsoleLogger (String loggerIdentifier)
 Starts a program-specific logger that prints to System.err stream. More...
 
int getVerbosity ()
 Returns the level of verbosity, i.e., the amount of log that we want to print. More...
 
void setVerbosity (int l)
 Set the level of verbosity. More...
 
Randomizer getRandomizer ()
 Returns the current program-specific randomizer. More...
 
long getRandomSeed ()
 Returns the seed. More...
 
void setRandomizer (Randomizer rng)
 Sets the randomizer. More...
 
Randomizer startRandomizer ()
 Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions. More...
 
Randomizer startRandomizer (long seed)
 Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions. More...
 
void readParameterFile (String infile) throws DENOPTIMException
 Read the parameter TXT file line by line and interpret its content. More...
 
void readParameterLine (String line) throws DENOPTIMException
 
boolean containsParameters (ParametersType type)
 
RunTimeParameters getParameters (ParametersType type)
 
void setParameters (RunTimeParameters otherParams)
 
void interpretKeyword (String line) throws DENOPTIMException
 Processes a string looking for keyword and a possibly associated value. More...
 
abstract void interpretKeyword (String key, String value) throws DENOPTIMException
 Processes a keyword/value pair and assign the related parameters. More...
 
abstract void checkParameters () throws DENOPTIMException
 Evaluate consistency of input parameters. More...
 
abstract void processParameters () throws DENOPTIMException
 Processes all parameters and initialize related objects. More...
 
abstract String getPrintedList ()
 Returns the list of parameters in a string with newline characters as delimiters. More...
 
void printParameters ()
 Print all parameters. More...
 

Static Public Member Functions

static boolean readYesNoTrueFalse (String s)
 Reads a string searching for any common way to say either yes/true (including shorthand t/y) or no/false (including shorthand f/n either). More...
 

Public Attributes

final String NL = System.getProperty("line.separator")
 New line character. More...
 

Protected Member Functions

void checkOtherParameters () throws DENOPTIMException
 Checks any of the parameter collections contained in this instance. More...
 
void processOtherParameters () throws DENOPTIMException
 Processes any of the parameter collections contained in this instance. More...
 
void ensureFileExistsIfSet (String pathname)
 Ensures a pathname is not empty nor null and that it does lead to an existing file or triggers an error. More...
 
void ensureFileExists (String pathname)
 Ensures a pathname does lead to an existing file or triggers an error. More...
 
void ensureNotNull (String paramName, String param, String paramKey)
 Ensures that a parameter is not null or triggers an error. More...
 
void ensureIsPositive (String paramName, int value, String paramKey)
 Ensures that a parameter is a positive number (x>=0) or triggers an error. More...
 
void ensureIsPositiveOrZero (String paramName, int value, String paramKey)
 Ensures that a parameter is a positive number (x>=0) or triggers an error. More...
 
void ensureInRange (String paramName, int value, int min, int max, String paramKey)
 Ensures that a parameter is within a range or triggers an error. More...
 

Protected Attributes

boolean isMaster = true
 Flag signaling this is the master collection of parameters. More...
 
String workDir = System.getProperty("user.dir")
 Working directory. More...
 
String logFile = "unset"
 Log file. More...
 
int verbosity = 0
 Verbosity level for logger. More...
 
Map< ParametersType, RunTimeParametersotherParameters
 Collection of other parameters by type. More...
 

Private Member Functions

void setLogger (Logger logger)
 Set the name of the program specific logger. More...
 
Level verbosityTologLevel ()
 

Static Private Member Functions

static RunTimeParameters getInstanceFor (ParametersType paramType)
 Builds the implementation of this class suitable to allocate parameters of the given type. More...
 

Private Attributes

Logger logger = Logger.getLogger("DummyLogger")
 Program-specific logger. More...
 
Randomizer rng = null
 Program-specific random numbers and random decisions generator. More...
 
ParametersType paramType = null
 The type of parameters collected in this instance. More...
 

Detailed Description

Collection of parameters controlling the behavior of the software.

These parameters have a default value and are optionally defined at startup by reading in input parameter file. Parameters are collected in a hierarchical structure so that those parameters that determine the primary behavior of the software, i.e., define the RunType, determine also the type of the main parameter collector, i.e., any one of the implementations of this class. Other parameters, such as those defining the settings of functions used by the main program, are collected as secondary parameters that can be accessed via the primary one by means of the getParameters(ParametersType) method.

Author
Marco Foscato

Definition at line 67 of file RunTimeParameters.java.

Constructor & Destructor Documentation

◆ RunTimeParameters()

denoptim.programs.RunTimeParameters.RunTimeParameters ( ParametersType  paramType)

Constructor.

Parameters
paramTypethe type of parameters this instance is meant to collect.

Definition at line 270 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.paramType.

Referenced by denoptim.programs.RunTimeParameters.getInstanceFor().

Here is the caller graph for this function:

Member Function Documentation

◆ checkOtherParameters()

◆ checkParameters()

◆ containsParameters()

◆ ensureFileExists()

void denoptim.programs.RunTimeParameters.ensureFileExists ( String  pathname)
protected

Ensures a pathname does lead to an existing file or triggers an error.

This is meant for checking initialization settings and does not print in the program specific log file.

Definition at line 1001 of file RunTimeParameters.java.

References denoptim.files.FileUtils.checkExists().

Referenced by denoptim.programs.fragmenter.FragmenterParameters.checkParameters(), and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.checkParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensureFileExistsIfSet()

void denoptim.programs.RunTimeParameters.ensureFileExistsIfSet ( String  pathname)
protected

Ensures a pathname is not empty nor null and that it does lead to an existing file or triggers an error.

This is meant for checking initialization settings and does not print in the program specific log file.

Definition at line 982 of file RunTimeParameters.java.

References denoptim.files.FileUtils.checkExists().

Referenced by denoptim.programs.fragmenter.FragmenterParameters.checkParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensureInRange()

void denoptim.programs.RunTimeParameters.ensureInRange ( String  paramName,
int  value,
int  min,
int  max,
String  paramKey 
)
protected

Ensures that a parameter is within a range or triggers an error.

This is meant for checking initialization settings and does not print in the program specific log file.

Definition at line 1074 of file RunTimeParameters.java.

◆ ensureIsPositive()

void denoptim.programs.RunTimeParameters.ensureIsPositive ( String  paramName,
int  value,
String  paramKey 
)
protected

Ensures that a parameter is a positive number (x>=0) or triggers an error.

This is meant for checking initialization settings and does not print in the program specific log file.

Definition at line 1035 of file RunTimeParameters.java.

Referenced by denoptim.programs.fragmenter.FragmenterParameters.checkParameters().

Here is the caller graph for this function:

◆ ensureIsPositiveOrZero()

void denoptim.programs.RunTimeParameters.ensureIsPositiveOrZero ( String  paramName,
int  value,
String  paramKey 
)
protected

Ensures that a parameter is a positive number (x>=0) or triggers an error.

This is meant for checking initialization settings and does not print in the program specific log file.

Definition at line 1054 of file RunTimeParameters.java.

◆ ensureNotNull()

void denoptim.programs.RunTimeParameters.ensureNotNull ( String  paramName,
String  param,
String  paramKey 
)
protected

Ensures that a parameter is not null or triggers an error.

This is meant for checking initialization settings and does not print in the program specific log file.

Definition at line 1017 of file RunTimeParameters.java.

Referenced by denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.checkParameters().

Here is the caller graph for this function:

◆ getInstanceFor()

static RunTimeParameters denoptim.programs.RunTimeParameters.getInstanceFor ( ParametersType  paramType)
staticprivate

Builds the implementation of this class suitable to allocate parameters of the given type.

Parameters
paramTypethe type of parameters to allocate in the instance to create.
Returns
the instance of the proper type.

Definition at line 758 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.ParametersType.getImplementation(), denoptim.programs.RunTimeParameters.paramType, and denoptim.programs.RunTimeParameters.RunTimeParameters().

Referenced by denoptim.programs.RunTimeParameters.readParameterLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLogFilePathname()

String denoptim.programs.RunTimeParameters.getLogFilePathname ( )

Gets the pathname to the log file.

Returns

Definition at line 320 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.logFile.

Referenced by denoptim.programs.denovo.GAParametersTest.testLogging().

Here is the caller graph for this function:

◆ getLogger()

Logger denoptim.programs.RunTimeParameters.getLogger ( )

Get the name of the program specific logger.

Definition at line 341 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.logger.

Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.gui.GUIGraphHandler.appendGraphsFromConvertingMolecule(), denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.fragspace.FragmentSpaceParameters.checkParameters(), denoptim.combinatorial.CombinatorialExplorerByLayer.CombinatorialExplorerByLayer(), denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), denoptim.graph.rings.CyclicGraphHandler.CyclicGraphHandler(), denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations(), denoptim.graph.rings.PathClosabilityTools.evaluate3DPathClosability(), denoptim.graph.rings.RingClosureFinder.evaluateClosability(), denoptim.graph.rings.PathClosabilityTools.evaluateConstitutionalClosability(), denoptim.ga.EvolutionaryAlgorithm.EvolutionaryAlgorithm(), denoptim.ga.EvolutionaryAlgorithm.evolvePopulation(), denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel(), denoptim.fragmenter.FragmenterTools.filterFragment(), denoptim.ga.EAUtils.foundForbiddenEnd(), denoptim.fragmenter.FragmenterTask.FragmenterTask(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs(), denoptim.graph.rings.RingClosuresArchive.getRCCsFromArchive(), denoptim.graph.rings.RingClosuresArchive.getRCCsOfChain(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.ga.Population.getXoverPartners(), denoptim.graph.DGraph.hasForbiddenEnd(), denoptim.gui.GUIVertexInspector.initialize(), denoptim.ga.EvolutionaryAlgorithm.initializePopulation(), denoptim.molecularmodeling.MultiMolecularModelBuilder.MultiMolecularModelBuilder(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.fragmenter.ParallelConformerExtractionAlgorithm.ParallelConformerExtractionAlgorithm(), denoptim.fragmenter.ParallelFragmentationAlgorithm.ParallelFragmentationAlgorithm(), denoptim.fragmenter.FragmenterTools.prepareMolToFragmentation(), denoptim.molecularmodeling.RingClosureTool.RingClosureTool(), denoptim.graph.rings.RingSizeManager.RingSizeManager(), denoptim.combinatorial.CombinatorialExplorerByLayer.run(), denoptim.task.FitnessTask.runExternalFitness(), denoptim.task.FitnessTask.runFitnessProvider(), denoptim.task.FitnessTask.runInternalFitness(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.denovo.GARunner.runProgram(), denoptim.programs.genetweeker.GeneOpsRunner.runProgram(), denoptim.programs.grapheditor.GraphEditor.runProgram(), denoptim.programs.graphlisthandler.GraphListsHandler.runProgram(), denoptim.programs.isomorphism.Isomorphism.runProgram(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram(), denoptim.programs.genetweeker.GeneOpsRunner.runXOver(), denoptim.fragmenter.ParallelFragmentationAlgorithm.splitInputForThreads(), denoptim.graph.rings.RingClosuresArchive.storeEntry(), denoptim.programs.denovo.GAParametersTest.testLogging(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_linearities(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_ScaffoldingPolicy(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_Symmetry(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_symmetry(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().

◆ getParameters()

RunTimeParameters denoptim.programs.RunTimeParameters.getParameters ( ParametersType  type)
Parameters
typethe type of embedded parameters to search for.
Returns
the requested parameter, or null.

Definition at line 790 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.otherParameters.

Referenced by denoptim.ga.GraphOperations.addRing(), denoptim.ga.GraphOperations.attachFragmentInClosableChain(), denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree(), denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.buildGraph(), denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), denoptim.graph.DGraph.checkConsistency(), denoptim.molecularmodeling.RingClosureTool.closeRings(), denoptim.combinatorial.CombinatorialExplorerByLayer.CombinatorialExplorerByLayer(), denoptim.ga.EvolutionaryAlgorithm.evolvePopulation(), denoptim.ga.GraphOperations.extendGraph(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.FitnessEvaluationTask(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), denoptim.ga.EvolutionaryAlgorithm.initializePopulation(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.ga.OffspringEvaluationTask.OffspringEvaluationTask(), denoptim.ga.EAUtils.performFBCC(), denoptim.ga.GraphOperations.performMutation(), denoptim.ga.Population.Population(), denoptim.ga.EvolutionaryAlgorithm.processInitialPopCandidate(), denoptim.programs.denovo.GAParameters.processParameters(), denoptim.ga.EvolutionaryAlgorithm.run(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.genetweeker.GeneOpsRunner.runProgram(), denoptim.programs.grapheditor.GraphEditor.runProgram(), and denoptim.ga.EAUtils.setupRings().

Here is the caller graph for this function:

◆ getPrintedList()

abstract String denoptim.programs.RunTimeParameters.getPrintedList ( )
abstract

◆ getRandomizer()

Randomizer denoptim.programs.RunTimeParameters.getRandomizer ( )

Returns the current program-specific randomizer.

If no such tool has been configured, then it creates one using a new and uncontrollable random seed.

Returns
the current and program-specific tool for random number and random decision generation.

Definition at line 590 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.rng.

Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.ga.GraphOperations.attachFragmentInClosableChain(), denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.ga.EAUtils.chooseGenerationMethod(), denoptim.graph.rings.PathClosabilityTools.evaluate3DPathClosability(), denoptim.ga.GraphOperations.extendGraph(), denoptim.fragspace.FragmentSpace.getCappingFragment(), denoptim.fragspace.FragmentSpace.getRandomizer(), denoptim.ga.EvolutionaryAlgorithm.makeOffspringB(), denoptim.fragspace.FragmentSpace.makeRandomScaffold(), denoptim.graph.rings.RandomCombOfRingsIterator.next(), denoptim.ga.EAUtils.performFBCC(), denoptim.ga.SelectionHelper.performRandomSelection(), denoptim.ga.SelectionHelper.performRWS(), denoptim.ga.SelectionHelper.performSUS(), denoptim.ga.SelectionHelper.performTournamentSelection(), denoptim.task.FitnessTask.runFitnessProvider(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.grapheditor.GraphEditor.runProgram(), denoptim.programs.genetweeker.GeneOpsRunner.runXOver(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().

Here is the caller graph for this function:

◆ getRandomSeed()

long denoptim.programs.RunTimeParameters.getRandomSeed ( )

Returns the seed.

Returns

Definition at line 618 of file RunTimeParameters.java.

References denoptim.utils.Randomizer.getSeed(), and denoptim.programs.RunTimeParameters.rng.

Referenced by denoptim.programs.denovo.GAParameters.processParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVerbosity()

int denoptim.programs.RunTimeParameters.getVerbosity ( )

Returns the level of verbosity, i.e., the amount of log that we want to print.

Returns
the level of verbosity.

Reimplemented in denoptim.graph.rings.RingClosureParameters.

Definition at line 548 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.verbosity.

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.CombinatorialExplorerByLayer(), and denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel().

Here is the caller graph for this function:

◆ getWorkDirectory()

String denoptim.programs.RunTimeParameters.getWorkDirectory ( )

◆ interpretKeyword() [1/2]

◆ interpretKeyword() [2/2]

void denoptim.programs.RunTimeParameters.interpretKeyword ( String  line) throws DENOPTIMException

Processes a string looking for keyword and a possibly associated value.

Parameters
linethe string to parse
Exceptions
DENOPTIMException

Definition at line 841 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.interpretKeyword(), denoptim.programs.RunTimeParameters.ParametersType.keywordRoot, and denoptim.programs.RunTimeParameters.paramType.

Referenced by denoptim.programs.RunTimeParameters.interpretKeyword(), and denoptim.programs.RunTimeParameters.readParameterLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ paramTypeName()

◆ printParameters()

void denoptim.programs.RunTimeParameters.printParameters ( )

◆ processOtherParameters()

◆ processParameters()

◆ readParameterFile()

void denoptim.programs.RunTimeParameters.readParameterFile ( String  infile) throws DENOPTIMException

Read the parameter TXT file line by line and interpret its content.

Parameters
infile
Exceptions
DENOPTIMException

Definition at line 680 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.readParameterLine().

Referenced by denoptim.programs.combinatorial.FragSpaceExplorer.runProgram(), denoptim.programs.denovo.GARunner.runProgram(), denoptim.programs.fitnessevaluator.FitnessRunner.runProgram(), denoptim.programs.fragmenter.Fragmenter.runProgram(), denoptim.programs.genetweeker.GeneOpsRunner.runProgram(), denoptim.programs.grapheditor.GraphEditor.runProgram(), denoptim.programs.graphlisthandler.GraphListsHandler.runProgram(), denoptim.programs.isomorphism.Isomorphism.runProgram(), and denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readParameterLine()

void denoptim.programs.RunTimeParameters.readParameterLine ( String  line) throws DENOPTIMException
Parameters
linethe line to try to interpret.
Exceptions
DENOPTIMExceptionif the parameter could be read but not interpreted, i.e., any wrong format of syntax.

Definition at line 720 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.getInstanceFor(), denoptim.programs.RunTimeParameters.interpretKeyword(), denoptim.programs.RunTimeParameters.ParametersType.keywordRoot, denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.paramType.

Referenced by denoptim.gui.FSParamsDialog.makeFragSpace(), denoptim.ga.PopulationTest.prepare(), denoptim.programs.RunTimeParameters.readParameterFile(), and denoptim.programs.denovo.GAParametersTest.testLogging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readYesNoTrueFalse()

static boolean denoptim.programs.RunTimeParameters.readYesNoTrueFalse ( String  s)
static

Reads a string searching for any common way to say either yes/true (including shorthand t/y) or no/false (including shorthand f/n either).

This method is case insensitive, and the string is trimmed.

Parameters
sthe string to interpret.
Returns
true for 'true/yes'.

Definition at line 491 of file RunTimeParameters.java.

Referenced by denoptim.gui.FitnessParametersForm.importSingleParameter(), denoptim.fitness.FitnessParameters.interpretKeyword(), denoptim.programs.denovo.GAParameters.interpretKeyword(), and denoptim.programs.fragmenter.FragmenterParameters.interpretKeyword().

Here is the caller graph for this function:

◆ setLogFilePathname()

void denoptim.programs.RunTimeParameters.setLogFilePathname ( String  pathname)

Sets the pathname to the log file.

Parameters
pathnamethe new value of pathname to the log file.

Definition at line 331 of file RunTimeParameters.java.

◆ setLogger()

void denoptim.programs.RunTimeParameters.setLogger ( Logger  logger)
private

Set the name of the program specific logger.

This method should only be used by subclasses that need to set the logger for embedded parameters collections.

Parameters
loggerthe new logger.

Definition at line 354 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.logger, and denoptim.programs.RunTimeParameters.otherParameters.

◆ setParameters()

void denoptim.programs.RunTimeParameters.setParameters ( RunTimeParameters  otherParams)

◆ setRandomizer()

void denoptim.programs.RunTimeParameters.setRandomizer ( Randomizer  rng)

Sets the randomizer.

This method should only be used by subclasses that need to set the randomizer in embedded parameters collections.

Definition at line 630 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.rng.

Referenced by denoptim.ga.SeelctionHelperTest.testPerformSUS().

Here is the caller graph for this function:

◆ setVerbosity()

void denoptim.programs.RunTimeParameters.setVerbosity ( int  l)

Set the level of verbosity.

If any associated logger exists, the level is set accordingly. The change affects all embedded sets of parameters. The integer is translated in a Level so that -3 (or lower) corresponds to Level#OFF, 0 is the normal Level#INFO, and 3 (or higher) corresponds to Level#FINEST.

Definition at line 563 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.logger, denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.verbosityTologLevel().

Referenced by denoptim.fragmenter.FragmentClustererTest.testCluster().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWorkDirectory()

void denoptim.programs.RunTimeParameters.setWorkDirectory ( String  pathname)

Gets the pathname to the working directory.

Parameters
pathnamethe new value of the working directory pathname.

Definition at line 309 of file RunTimeParameters.java.

Referenced by denoptim.programs.combinatorial.FragSpaceExplorer.runProgram(), denoptim.programs.fitnessevaluator.FitnessRunner.runProgram(), denoptim.programs.fragmenter.Fragmenter.runProgram(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram(), and denoptim.fragmenter.ParallelFragmentationAlgorithmTest.testSplitInputForThreads().

Here is the caller graph for this function:

◆ startConsoleLogger()

Logger denoptim.programs.RunTimeParameters.startConsoleLogger ( String  loggerIdentifier)

Starts a program-specific logger that prints to System.err stream.

Parameters
loggerIdentifier
Returns

Definition at line 451 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.logger, denoptim.programs.RunTimeParameters.otherParameters, denoptim.programs.RunTimeParameters.verbosity, and denoptim.programs.RunTimeParameters.verbosityTologLevel().

Referenced by denoptim.gui.GUIVertexInspector.dialogToDefineCuttingRules(), and denoptim.fragmenter.FragmentClustererTest.testCluster().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startProgramSpecificLogger() [1/2]

Logger denoptim.programs.RunTimeParameters.startProgramSpecificLogger ( String  loggerIdentifier) throws SecurityException, IOException

Starts a logger with the given name.

The name is saved among the parameters and the logger can be obtained from static Logger#getLogger(String) method using the value of loggerIdentifier or by RunTimeParameters#getLogger(). All parameter collectors embedded in this one will inherit the logger. By default the logger that is created does dump its log into the pathname identified by the RunTimeParameters#logFile field of this instance.

Parameters
loggerIdentifierthe string identifying the program-specific logger.
Exceptions
IOException
SecurityException

Definition at line 378 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.startProgramSpecificLogger().

Referenced by denoptim.programs.combinatorial.FragSpaceExplorer.runProgram(), denoptim.programs.denovo.GARunner.runProgram(), denoptim.programs.fitnessevaluator.FitnessRunner.runProgram(), denoptim.programs.fragmenter.Fragmenter.runProgram(), denoptim.programs.genetweeker.GeneOpsRunner.runProgram(), denoptim.programs.grapheditor.GraphEditor.runProgram(), denoptim.programs.graphlisthandler.GraphListsHandler.runProgram(), denoptim.programs.isomorphism.Isomorphism.runProgram(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram(), denoptim.programs.RunTimeParameters.startProgramSpecificLogger(), and denoptim.programs.denovo.GAParametersTest.testLogging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startProgramSpecificLogger() [2/2]

Logger denoptim.programs.RunTimeParameters.startProgramSpecificLogger ( String  loggerIdentifier,
boolean  toLogFile 
) throws SecurityException, IOException

Starts a logger with the given name.

The name is saved among the parameters and the logger can be obtained from static Logger#getLogger(String) method using the value of loggerIdentifier or by RunTimeParameters#getLogger(). All parameter collectors embedded in this one will inherit the logger.

Parameters
loggerIdentifierthe string identifying the program-specific logger.
toLogFilewith true we dump the log to a file. The pathname of such file must have been configured in this collection of parameters as the RunTimeParameters#logFile field. With false we log on standard output.
Exceptions
IOException
SecurityException

Definition at line 400 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.logFile, denoptim.programs.RunTimeParameters.logger, denoptim.programs.RunTimeParameters.otherParameters, denoptim.programs.RunTimeParameters.verbosity, and denoptim.programs.RunTimeParameters.verbosityTologLevel().

Here is the call graph for this function:

◆ startRandomizer() [1/2]

Randomizer denoptim.programs.RunTimeParameters.startRandomizer ( )

Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions.

Parameters
seedthe random seed.

Definition at line 646 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.rng.

Referenced by denoptim.programs.denovo.GAParameters.processParameters().

Here is the caller graph for this function:

◆ startRandomizer() [2/2]

Randomizer denoptim.programs.RunTimeParameters.startRandomizer ( long  seed)

Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions.

Parameters
seedthe random seed.

Definition at line 663 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.rng.

◆ verbosityTologLevel()

Level denoptim.programs.RunTimeParameters.verbosityTologLevel ( )
private

Definition at line 513 of file RunTimeParameters.java.

References denoptim.programs.RunTimeParameters.verbosity.

Referenced by denoptim.programs.RunTimeParameters.setVerbosity(), denoptim.programs.RunTimeParameters.startConsoleLogger(), and denoptim.programs.RunTimeParameters.startProgramSpecificLogger().

Here is the caller graph for this function:

Member Data Documentation

◆ isMaster

boolean denoptim.programs.RunTimeParameters.isMaster = true
protected

Flag signaling this is the master collection of parameters.

The master collection is the one with the type that corresponds to the type of program task. A parameters collection is master if it may contain other collections without being itself contained in any other collection.

Definition at line 76 of file RunTimeParameters.java.

Referenced by denoptim.programs.combinatorial.CEBLParameters.processParameters(), denoptim.programs.denovo.GAParameters.processParameters(), and denoptim.programs.fragmenter.FragmenterParameters.processParameters().

◆ logFile

◆ logger

Logger denoptim.programs.RunTimeParameters.logger = Logger.getLogger("DummyLogger")
private

Program-specific logger.

Note that initialization errors in input parameters are detected prior to starting the logger. Also, the logger is initialized to avoid null during unit tests. In any proper run, this logger should be overwritten by a call to startProgramSpecificLogger(String).

Definition at line 95 of file RunTimeParameters.java.

Referenced by denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.RunTimeParameters.printParameters(), denoptim.programs.RunTimeParameters.setLogger(), denoptim.programs.RunTimeParameters.setVerbosity(), denoptim.programs.RunTimeParameters.startConsoleLogger(), and denoptim.programs.RunTimeParameters.startProgramSpecificLogger().

◆ NL

◆ otherParameters

Map<ParametersType, RunTimeParameters> denoptim.programs.RunTimeParameters.otherParameters
protected
Initial value:
=
new HashMap<ParametersType, RunTimeParameters>()

Collection of other parameters by type.

Definition at line 112 of file RunTimeParameters.java.

Referenced by denoptim.programs.RunTimeParameters.checkOtherParameters(), denoptim.programs.combinatorial.CEBLParameters.checkParameters(), denoptim.programs.RunTimeParameters.containsParameters(), denoptim.programs.RunTimeParameters.getParameters(), denoptim.fitness.FitnessParameters.getPrintedList(), denoptim.fragspace.FragmentSpaceParameters.getPrintedList(), denoptim.graph.rings.RingClosureParameters.getPrintedList(), denoptim.programs.combinatorial.CEBLParameters.getPrintedList(), denoptim.programs.denovo.GAParameters.getPrintedList(), denoptim.programs.fitnessevaluator.FRParameters.getPrintedList(), denoptim.programs.fragmenter.FragmenterParameters.getPrintedList(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.getPrintedList(), denoptim.programs.grapheditor.GraphEdParameters.getPrintedList(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.getPrintedList(), denoptim.programs.isomorphism.IsomorphismParameters.getPrintedList(), denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.getPrintedList(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.programs.RunTimeParameters.processOtherParameters(), denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.processParameters(), denoptim.programs.RunTimeParameters.readParameterLine(), denoptim.programs.RunTimeParameters.setLogger(), denoptim.programs.RunTimeParameters.setParameters(), denoptim.programs.RunTimeParameters.setRandomizer(), denoptim.programs.RunTimeParameters.setVerbosity(), denoptim.programs.RunTimeParameters.startConsoleLogger(), denoptim.programs.RunTimeParameters.startProgramSpecificLogger(), and denoptim.programs.RunTimeParameters.startRandomizer().

◆ paramType

◆ rng

Randomizer denoptim.programs.RunTimeParameters.rng = null
private

◆ verbosity

◆ workDir

String denoptim.programs.RunTimeParameters.workDir = System.getProperty("user.dir")
protected

Working directory.

Definition at line 81 of file RunTimeParameters.java.

Referenced by denoptim.programs.combinatorial.CEBLParameters.checkParameters(), denoptim.programs.fitnessevaluator.FRParameters.checkParameters(), denoptim.programs.fragmenter.FragmenterParameters.checkParameters(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.checkParameters(), denoptim.programs.grapheditor.GraphEdParameters.checkParameters(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.checkParameters(), denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.checkParameters(), denoptim.programs.combinatorial.CEBLParameters.createWorkingDirectory(), denoptim.programs.fragmenter.FragmenterParameters.createWorkingDirectory(), denoptim.programs.RunTimeParameters.getWorkDirectory(), denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.getWorkingDirectory(), denoptim.programs.combinatorial.CEBLParameters.interpretKeyword(), denoptim.programs.fitnessevaluator.FRParameters.interpretKeyword(), denoptim.programs.fragmenter.FragmenterParameters.interpretKeyword(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.interpretKeyword(), denoptim.programs.grapheditor.GraphEdParameters.interpretKeyword(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.interpretKeyword(), denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.interpretKeyword(), denoptim.programs.combinatorial.CEBLParameters.processParameters(), denoptim.programs.fitnessevaluator.FRParameters.processParameters(), and denoptim.programs.fragmenter.FragmenterParameters.processParameters().


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