$darkmode
DENOPTIM
|
Collection of parameters controlling the behavior of the software. More...
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, RunTimeParameters > | otherParameters |
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... | |
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.
Definition at line 67 of file RunTimeParameters.java.
denoptim.programs.RunTimeParameters.RunTimeParameters | ( | ParametersType | paramType | ) |
Constructor.
paramType | the 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().
|
protected |
Checks any of the parameter collections contained in this instance.
DENOPTIMException |
Definition at line 889 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.otherParameters.
Referenced by denoptim.fitness.FitnessParameters.checkParameters(), denoptim.fragspace.FragmentSpaceParameters.checkParameters(), denoptim.graph.rings.RingClosureParameters.checkParameters(), denoptim.programs.combinatorial.CEBLParameters.checkParameters(), denoptim.programs.denovo.GAParameters.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.isomorphism.IsomorphismParameters.checkParameters(), and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.checkParameters().
|
abstract |
Evaluate consistency of input parameters.
DENOPTIMException |
Reimplemented in denoptim.fitness.FitnessParameters, denoptim.fragspace.FragmentSpaceParameters, denoptim.graph.rings.RingClosureParameters, denoptim.programs.combinatorial.CEBLParameters, denoptim.programs.denovo.GAParameters, denoptim.programs.fitnessevaluator.FRParameters, denoptim.programs.fragmenter.FragmenterParameters, denoptim.programs.genetweeker.GeneOpsRunnerParameters, denoptim.programs.grapheditor.GraphEdParameters, denoptim.programs.graphlisthandler.GraphListsHandlerParameters, denoptim.programs.isomorphism.IsomorphismParameters, and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.
boolean denoptim.programs.RunTimeParameters.containsParameters | ( | ParametersType | type | ) |
type | the type of parameter to search for. |
true
if the parameter is found among those collections of embedded parameters that are contained in this instance. Definition at line 779 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.otherParameters.
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), denoptim.molecularmodeling.RingClosureTool.closeRings(), denoptim.combinatorial.CombinatorialExplorerByLayer.CombinatorialExplorerByLayer(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.FitnessEvaluationTask(), denoptim.ga.EvolutionaryAlgorithm.initializePopulation(), denoptim.ga.OffspringEvaluationTask.OffspringEvaluationTask(), denoptim.ga.EAUtils.performFBCC(), denoptim.programs.denovo.GAParameters.processParameters(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.processParameters(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.genetweeker.GeneOpsRunner.runProgram(), and denoptim.programs.grapheditor.GraphEditor.runProgram().
|
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().
|
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().
|
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.
|
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().
|
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.
|
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().
|
staticprivate |
Builds the implementation of this class suitable to allocate parameters of the given type.
paramType | the type of parameters to allocate in the instance to create. |
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().
String denoptim.programs.RunTimeParameters.getLogFilePathname | ( | ) |
Gets the pathname to the log file.
Definition at line 320 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.logFile.
Referenced by denoptim.programs.denovo.GAParametersTest.testLogging().
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().
RunTimeParameters denoptim.programs.RunTimeParameters.getParameters | ( | ParametersType | type | ) |
type | the type of embedded parameters to search for. |
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().
|
abstract |
Returns the list of parameters in a string with newline characters as delimiters.
Reimplemented in denoptim.fitness.FitnessParameters, denoptim.fragspace.FragmentSpaceParameters, denoptim.graph.rings.RingClosureParameters, denoptim.programs.combinatorial.CEBLParameters, denoptim.programs.denovo.GAParameters, denoptim.programs.fitnessevaluator.FRParameters, denoptim.programs.fragmenter.FragmenterParameters, denoptim.programs.genetweeker.GeneOpsRunnerParameters, denoptim.programs.grapheditor.GraphEdParameters, denoptim.programs.graphlisthandler.GraphListsHandlerParameters, denoptim.programs.isomorphism.IsomorphismParameters, and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.
Referenced by denoptim.programs.RunTimeParameters.printParameters().
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.
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().
long denoptim.programs.RunTimeParameters.getRandomSeed | ( | ) |
Returns the seed.
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().
int denoptim.programs.RunTimeParameters.getVerbosity | ( | ) |
Returns the level of verbosity, i.e., the amount of log that we want to print.
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().
String denoptim.programs.RunTimeParameters.getWorkDirectory | ( | ) |
Gets the pathname to the working directory.
Definition at line 298 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.workDir.
Referenced by denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), denoptim.fragmenter.ParallelConformerExtractionAlgorithm.createAndSubmitTasks(), denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations(), denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel(), denoptim.fragmenter.ConformerExtractorTask.getChosenFragPathname(), denoptim.fragmenter.ConformerExtractorTask.getClusterCentroidsPathname(), denoptim.fragmenter.ConformerExtractorTask.getClusterPathname(), denoptim.fragmenter.FragmenterTask.getConfirmedFormulaFileName(), denoptim.fragmenter.FragmenterTask.getFragmentsFileName(), denoptim.fragmenter.FragmenterTask.getInputFileName(), denoptim.fragmenter.FragmenterTask.getLogFileName(), denoptim.programs.fragmenter.FragmenterParameters.getMWSlotFileNameAllFrags(), denoptim.programs.fragmenter.FragmenterParameters.getMWSlotFileNameUnqFrags(), denoptim.fragmenter.FragmenterTask.getPreFilteredFileName(), denoptim.fragmenter.FragmenterTask.getResultsFileName(), denoptim.fragmenter.ParallelFragmentationAlgorithm.getStructureFileNameBatch(), and denoptim.programs.fitnessevaluator.FPRunner.run().
|
abstract |
Processes a keyword/value pair and assign the related parameters.
key | the keyword as string |
value | the value as a string |
DENOPTIMException | is the parameter cannot be configured from the given value. |
Reimplemented in denoptim.fitness.FitnessParameters, denoptim.fragspace.FragmentSpaceParameters, denoptim.graph.rings.RingClosureParameters, denoptim.programs.combinatorial.CEBLParameters, denoptim.programs.denovo.GAParameters, denoptim.programs.fitnessevaluator.FRParameters, denoptim.programs.fragmenter.FragmenterParameters, denoptim.programs.genetweeker.GeneOpsRunnerParameters, denoptim.programs.grapheditor.GraphEdParameters, denoptim.programs.graphlisthandler.GraphListsHandlerParameters, denoptim.programs.isomorphism.IsomorphismParameters, and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.
void denoptim.programs.RunTimeParameters.interpretKeyword | ( | String | line | ) | throws DENOPTIMException |
Processes a string looking for keyword and a possibly associated value.
line | the string to parse |
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().
String denoptim.programs.RunTimeParameters.paramTypeName | ( | ) |
Returns a string defining the type the parameters collected here.
Definition at line 287 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.paramType.
Referenced by 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(), and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.getPrintedList().
void denoptim.programs.RunTimeParameters.printParameters | ( | ) |
Print all parameters.
Definition at line 965 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.getPrintedList(), denoptim.programs.RunTimeParameters.logger, and denoptim.programs.RunTimeParameters.NL.
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(), and denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram().
|
protected |
Processes any of the parameter collections contained in this instance.
DENOPTIMException |
Definition at line 911 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.otherParameters.
Referenced by denoptim.fitness.FitnessParameters.processParameters(), denoptim.fragspace.FragmentSpaceParameters.processParameters(), denoptim.graph.rings.RingClosureParameters.processParameters(), denoptim.programs.combinatorial.CEBLParameters.processParameters(), denoptim.programs.denovo.GAParameters.processParameters(), denoptim.programs.fitnessevaluator.FRParameters.processParameters(), denoptim.programs.fragmenter.FragmenterParameters.processParameters(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.processParameters(), denoptim.programs.grapheditor.GraphEdParameters.processParameters(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.processParameters(), denoptim.programs.isomorphism.IsomorphismParameters.processParameters(), and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.processParameters().
|
abstract |
Processes all parameters and initialize related objects.
DENOPTIMException |
Reimplemented in denoptim.fitness.FitnessParameters, denoptim.fragspace.FragmentSpaceParameters, denoptim.graph.rings.RingClosureParameters, denoptim.programs.combinatorial.CEBLParameters, denoptim.programs.denovo.GAParameters, denoptim.programs.fitnessevaluator.FRParameters, denoptim.programs.fragmenter.FragmenterParameters, denoptim.programs.genetweeker.GeneOpsRunnerParameters, denoptim.programs.grapheditor.GraphEdParameters, denoptim.programs.graphlisthandler.GraphListsHandlerParameters, denoptim.programs.isomorphism.IsomorphismParameters, and denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.
void denoptim.programs.RunTimeParameters.readParameterFile | ( | String | infile | ) | throws DENOPTIMException |
Read the parameter TXT file line by line and interpret its content.
infile |
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().
void denoptim.programs.RunTimeParameters.readParameterLine | ( | String | line | ) | throws DENOPTIMException |
line | the line to try to interpret. |
DENOPTIMException | if 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().
|
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.
s | the string to interpret. |
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().
void denoptim.programs.RunTimeParameters.setLogFilePathname | ( | String | pathname | ) |
Sets the pathname to the log file.
pathname | the new value of pathname to the log file. |
Definition at line 331 of file RunTimeParameters.java.
|
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.
logger | the new logger. |
Definition at line 354 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.logger, and denoptim.programs.RunTimeParameters.otherParameters.
void denoptim.programs.RunTimeParameters.setParameters | ( | RunTimeParameters | otherParams | ) |
otherParams | the parameters to add/set as other in this collection. |
Definition at line 800 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.paramType.
Referenced by denoptim.ga.PopulationTest.prepare(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.processParameters(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.ga.EAUtilsTest.testAvoidRedundantXOver(), denoptim.ga.EAUtilsTest.testBuildGraphFromTemplateScaffold(), denoptim.ga.GraphOperationsTest.testExtendGraph(), and denoptim.io.DenoptimIOTest.testReadGenerationFromSummary().
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().
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().
void denoptim.programs.RunTimeParameters.setWorkDirectory | ( | String | pathname | ) |
Gets the pathname to the working directory.
pathname | the 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().
Logger denoptim.programs.RunTimeParameters.startConsoleLogger | ( | String | loggerIdentifier | ) |
Starts a program-specific logger that prints to System.err stream.
loggerIdentifier |
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().
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.
loggerIdentifier | the string identifying the program-specific logger. |
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().
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.
loggerIdentifier | the string identifying the program-specific logger. |
toLogFile | with 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. |
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().
Randomizer denoptim.programs.RunTimeParameters.startRandomizer | ( | ) |
Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions.
seed | the 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().
Randomizer denoptim.programs.RunTimeParameters.startRandomizer | ( | long | seed | ) |
Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions.
seed | the random seed. |
Definition at line 663 of file RunTimeParameters.java.
References denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.rng.
|
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().
|
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().
|
protected |
Log file.
Definition at line 86 of file RunTimeParameters.java.
Referenced by denoptim.programs.combinatorial.CEBLParameters.createWorkingDirectory(), denoptim.programs.fragmenter.FragmenterParameters.createWorkingDirectory(), denoptim.programs.RunTimeParameters.getLogFilePathname(), denoptim.programs.grapheditor.GraphEdParameters.interpretKeyword(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.interpretKeyword(), denoptim.programs.combinatorial.CEBLParameters.processParameters(), denoptim.programs.denovo.GAParameters.processParameters(), denoptim.programs.fragmenter.FragmenterParameters.processParameters(), denoptim.programs.denovo.GAParameters.setWorkingDirectory(), and denoptim.programs.RunTimeParameters.startProgramSpecificLogger().
|
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().
final String denoptim.programs.RunTimeParameters.NL = System.getProperty("line.separator") |
New line character.
Definition at line 262 of file RunTimeParameters.java.
Referenced by denoptim.fragmenter.FragmentClusterer.cluster(), 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(), and denoptim.programs.RunTimeParameters.printParameters().
|
protected |
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().
|
private |
The type of parameters collected in this instance.
Definition at line 118 of file RunTimeParameters.java.
Referenced by denoptim.fragspace.FragmentSpaceParameters.FragmentSpaceParameters(), denoptim.programs.RunTimeParameters.getInstanceFor(), denoptim.programs.RunTimeParameters.interpretKeyword(), denoptim.programs.RunTimeParameters.paramTypeName(), denoptim.programs.RunTimeParameters.readParameterLine(), denoptim.programs.RunTimeParameters.RunTimeParameters(), and denoptim.programs.RunTimeParameters.setParameters().
|
private |
Program-specific random numbers and random decisions generator.
Definition at line 100 of file RunTimeParameters.java.
Referenced by denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.programs.RunTimeParameters.getRandomSeed(), denoptim.programs.RunTimeParameters.setRandomizer(), and denoptim.programs.RunTimeParameters.startRandomizer().
|
protected |
Verbosity level for logger.
This is used to help the user setting the Level
of the Logger
without knowing the names of the logging levels.
Definition at line 107 of file RunTimeParameters.java.
Referenced by denoptim.graph.rings.RingClosureParameters.getVerbosity(), denoptim.programs.RunTimeParameters.getVerbosity(), denoptim.fragspace.FragmentSpaceParameters.interpretKeyword(), denoptim.graph.rings.RingClosureParameters.interpretKeyword(), denoptim.programs.combinatorial.CEBLParameters.interpretKeyword(), denoptim.programs.denovo.GAParameters.interpretKeyword(), denoptim.programs.fitnessevaluator.FRParameters.interpretKeyword(), denoptim.programs.fragmenter.FragmenterParameters.interpretKeyword(), denoptim.programs.grapheditor.GraphEdParameters.interpretKeyword(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.interpretKeyword(), denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.interpretKeyword(), denoptim.programs.RunTimeParameters.startConsoleLogger(), denoptim.programs.RunTimeParameters.startProgramSpecificLogger(), and denoptim.programs.RunTimeParameters.verbosityTologLevel().
|
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().