$darkmode
DENOPTIM
denoptim.programs.fitnessevaluator.FRParameters Class Reference

Parameters controlling execution of FitnessRunner. More...

Inheritance diagram for denoptim.programs.fitnessevaluator.FRParameters:
[legend]
Collaboration diagram for denoptim.programs.fitnessevaluator.FRParameters:
[legend]

Public Member Functions

 FRParameters ()
 Constructor. More...
 
File getInputFile ()
 
File getOutputFile ()
 
void interpretKeyword (String key, String value) throws DENOPTIMException
 Processes a keyword/value pair and assign the related parameters. More...
 
void checkParameters () throws DENOPTIMException
 Evaluate consistency of input parameters. More...
 
void processParameters () throws DENOPTIMException
 Processes all parameters and initialize related objects. More...
 
String getPrintedList ()
 Returns the list of parameters in a string with newline characters as delimiters. More...
 
long getWallTime ()
 Returns the maximum number of seconds to wait for the fitness provider to deliver a result. More...
 
- Public Member Functions inherited from denoptim.programs.RunTimeParameters
 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...
 

Protected Attributes

boolean addTemplatesToLibraries = false
 Flag controlling attempt to add templates to building block libraries. More...
 
- Protected Attributes inherited from denoptim.programs.RunTimeParameters
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 Attributes

File inpFile = null
 File with input for fitness provider. More...
 
File outFile = new File("output.sdf")
 File where the results of the fitness evaluation will be printed. More...
 
int walltime = 5
 The maximum number of seconds we wait for the fitness provider to return a result. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from denoptim.programs.RunTimeParameters
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 inherited from denoptim.programs.RunTimeParameters
final String NL = System.getProperty("line.separator")
 New line character. More...
 
- Protected Member Functions inherited from denoptim.programs.RunTimeParameters
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...
 

Detailed Description

Parameters controlling execution of FitnessRunner.

Author
Marco Foscato

Definition at line 38 of file FRParameters.java.

Constructor & Destructor Documentation

◆ FRParameters()

denoptim.programs.fitnessevaluator.FRParameters.FRParameters ( )

Constructor.

Parameters
paramType

Definition at line 67 of file FRParameters.java.

References denoptim.programs.RunTimeParameters.ParametersType.FR_PARAMS.

Member Function Documentation

◆ checkParameters()

void denoptim.programs.fitnessevaluator.FRParameters.checkParameters ( ) throws DENOPTIMException

Evaluate consistency of input parameters.

Exceptions
DENOPTIMException

Reimplemented from denoptim.programs.RunTimeParameters.

Definition at line 141 of file FRParameters.java.

References denoptim.files.FileUtils.checkExists(), denoptim.programs.RunTimeParameters.checkOtherParameters(), denoptim.programs.fitnessevaluator.FRParameters.inpFile, denoptim.programs.fitnessevaluator.FRParameters.outFile, and denoptim.programs.RunTimeParameters.workDir.

Referenced by denoptim.programs.fitnessevaluator.FitnessRunner.runProgram().

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

◆ getInputFile()

File denoptim.programs.fitnessevaluator.FRParameters.getInputFile ( )

Definition at line 74 of file FRParameters.java.

References denoptim.programs.fitnessevaluator.FRParameters.inpFile.

Referenced by denoptim.programs.fitnessevaluator.FPRunner.run().

Here is the caller graph for this function:

◆ getOutputFile()

File denoptim.programs.fitnessevaluator.FRParameters.getOutputFile ( )

Definition at line 81 of file FRParameters.java.

References denoptim.programs.fitnessevaluator.FRParameters.outFile.

Referenced by denoptim.programs.fitnessevaluator.FPRunner.run().

Here is the caller graph for this function:

◆ getPrintedList()

String denoptim.programs.fitnessevaluator.FRParameters.getPrintedList ( )

Returns the list of parameters in a string with newline characters as delimiters.

Returns
the list of parameters in a string with newline characters as delimiters.

Reimplemented from denoptim.programs.RunTimeParameters.

Definition at line 191 of file FRParameters.java.

References denoptim.programs.RunTimeParameters.NL, denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.paramTypeName().

Here is the call graph for this function:

◆ getWallTime()

long denoptim.programs.fitnessevaluator.FRParameters.getWallTime ( )

Returns the maximum number of seconds to wait for the fitness provider to deliver a result.

Returns
the wall time.

Definition at line 223 of file FRParameters.java.

References denoptim.programs.fitnessevaluator.FRParameters.walltime.

Referenced by denoptim.programs.fitnessevaluator.FPRunner.run().

Here is the caller graph for this function:

◆ interpretKeyword()

void denoptim.programs.fitnessevaluator.FRParameters.interpretKeyword ( String  key,
String  value 
) throws DENOPTIMException

◆ processParameters()

void denoptim.programs.fitnessevaluator.FRParameters.processParameters ( ) throws DENOPTIMException

Processes all parameters and initialize related objects.

Exceptions
DENOPTIMException

Reimplemented from denoptim.programs.RunTimeParameters.

Definition at line 174 of file FRParameters.java.

References denoptim.files.FileUtils.addToRecentFiles(), denoptim.logging.StaticLogger.appLogger, denoptim.files.FileFormat.GRAPHSDF, denoptim.programs.fitnessevaluator.FRParameters.outFile, denoptim.programs.RunTimeParameters.processOtherParameters(), and denoptim.programs.RunTimeParameters.workDir.

Referenced by denoptim.programs.fitnessevaluator.FitnessRunner.runProgram().

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

Member Data Documentation

◆ addTemplatesToLibraries

boolean denoptim.programs.fitnessevaluator.FRParameters.addTemplatesToLibraries = false
protected

Flag controlling attempt to add templates to building block libraries.

Definition at line 53 of file FRParameters.java.

Referenced by denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), and denoptim.programs.fitnessevaluator.FRParameters.interpretKeyword().

◆ inpFile

File denoptim.programs.fitnessevaluator.FRParameters.inpFile = null
private

◆ outFile

File denoptim.programs.fitnessevaluator.FRParameters.outFile = new File("output.sdf")
private

◆ walltime

int denoptim.programs.fitnessevaluator.FRParameters.walltime = 5
private

The maximum number of seconds we wait for the fitness provider to return a result.

Definition at line 59 of file FRParameters.java.

Referenced by denoptim.programs.fitnessevaluator.FRParameters.getWallTime(), and denoptim.programs.fitnessevaluator.FRParameters.interpretKeyword().


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