public class OptimizationIni
extends java.lang.Object
implements java.lang.Cloneable
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
FS
System dependent file separator
|
protected int |
nInpFil
number of input files
|
protected int |
nLogFil
number of simulation log files
|
protected int |
nOutFil
number of output files
|
protected OrderedMap |
objFunMap
delimiter of the objective function value in the output file
|
protected boolean |
objFunMapIsSet
flag indicating whether the objective function value is set or not
|
protected java.lang.String |
OptComFilNam
file name: Optimization command file
|
protected java.lang.String |
OptComPat
path name: Optimization command
|
protected java.lang.String |
OptIniPat
path name: Optimization initialization
|
protected java.lang.String |
SimCalPre
simulation call prefix
|
protected java.lang.String |
SimCalSuf
simulation call suffix
|
protected java.lang.String |
SimConFilNam
file name: Simulation program configuration
|
protected java.lang.String |
SimConPat
path name: Simulation program configuration
|
protected java.lang.String[] |
SimInpFilNam
file name: Simulation input
|
protected java.lang.String[] |
SimInpPat
path name: Simulation input
|
protected java.lang.String[] |
SimInpSavPat
path name of save directory: Simulation input (String "" indicates no save required)
|
protected java.lang.String[] |
SimInpTemFilNam
file name: Simulation input template
|
protected java.lang.String[] |
SimInpTemPat
path name: Simulation input template
|
protected java.lang.String[] |
SimLogFilNam
file name: Simulaton log file (contains error messages)
|
protected java.lang.String[] |
SimLogPat
path name: Simulaton log file (contains error messages)
|
protected java.lang.String[] |
SimLogSavPat
path name of save directory: Simulaton log file (String "" indicates no save required)
|
protected java.lang.String[] |
SimOutFilNam
file name: Simulation output
|
protected java.lang.String[] |
SimOutPat
path name: Simulation output
|
protected java.lang.String[] |
SimOutSavPat
path name of save directory: Simulation output (String "" indicates no save required)
|
Constructor and Description |
---|
OptimizationIni(java.lang.String[] SimulationInputTemplateFileName,
java.lang.String[] SimulationInputTemplatePath,
java.lang.String[] SimulationInputFileName,
java.lang.String[] SimulationInputPath,
java.lang.String[] SimulationInputSavePath,
java.lang.String[] SimulationOutputFileName,
java.lang.String[] SimulationOutputPath,
java.lang.String[] SimulationOutputSavePath,
java.lang.String[] SimulationLogFileName,
java.lang.String[] SimulationLogPath,
java.lang.String[] SimulationLogSavePath,
java.lang.String SimulationConfigFileName,
java.lang.String SimulationConfigPath,
java.lang.String OptimizationInitializationPath,
java.lang.String OptimizationCommandFileName,
java.lang.String OptimizationCommandPath,
java.lang.String SimulationCallPrefix,
java.lang.String SimulationCallSuffix)
constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertToTemporaryPath(java.lang.String path,
java.lang.String dirName)
converts the argument
path to the temporary path that will be used
for the simulation |
ObjectiveFunctionLocation[] |
getFunctionObjects()
gets the function objects for the objective function
|
int |
getNumberOfFunctionObjects()
gets the number of function objects for the objective function
|
int |
getNumberOfInputFiles()
gets the number of simulation input files
|
int |
getNumberOfLogFiles()
gets the number of simulation log files
|
int |
getNumberOfOutputFiles()
gets the number of simulation output files
|
java.lang.String |
getObjFunDel(java.lang.String name)
gets the delimiter of the objective function in the simulation output file
|
java.lang.String |
getObjFunFun(java.lang.String name)
gets the function definining the objective function
|
java.lang.String |
getOptComFilNam()
gets the optimization command file name
|
java.lang.String |
getOptComPat()
gets the optimization command path
|
java.lang.String |
getOptIniPat()
gets the optimization initialization path
|
java.lang.String |
getSimCalPre()
gets the simulation call prefix
|
java.lang.String |
getSimCalSuf()
gets the simulation call suffix
|
java.lang.String |
getSimConFilNam()
gets the simulation configuration file name
|
java.lang.String |
getSimConPat()
gets the simulation configuration path
|
java.lang.String[] |
getSimInpFilNam()
gets the simulation input file names
|
java.lang.String |
getSimInpFilNam(int i)
gets the simulation input file name
|
java.lang.String[] |
getSimInpPat()
gets the simulation input path names
|
java.lang.String |
getSimInpPat(int i)
gets the simulation input path
|
java.lang.String[] |
getSimInpSavPat()
gets the simulation input save paths
|
java.lang.String |
getSimInpSavPat(int i)
gets the path where the simulation input file has to be saved
|
java.lang.String |
getSimInpTemFilNam(int i)
gets the simulation input template file name
|
java.lang.String |
getSimInpTemPat(int i)
gets the simulation input template path
|
java.lang.String[] |
getSimLogFilNam()
gets the simulation log file names
|
java.lang.String |
getSimLogFilNam(int i)
gets the simulation log file name
|
java.lang.String[] |
getSimLogPat()
gets the simulation log paths
|
java.lang.String |
getSimLogPat(int i)
gets the simulation log path
|
java.lang.String[] |
getSimLogSavPat()
gets the simulation log save paths
|
java.lang.String |
getSimLogSavPat(int i)
gets the path where the simulation log file has to be saved
|
java.lang.String[] |
getSimOutFilNam()
gets the simulation output file names
|
java.lang.String |
getSimOutFilNam(int i)
gets the simulation output file name
|
java.lang.String[] |
getSimOutPat()
gets the simulation output paths
|
java.lang.String |
getSimOutPat(int i)
gets the simulation output path
|
java.lang.String[] |
getSimOutSavPat()
gets the simulation output save paths
|
java.lang.String |
getSimOutSavPat(int i)
gets the path where the simulation output file has to be saved
|
boolean |
isFunction(java.lang.String name)
returns
true if name is the name
of an objective function that is defined by a function object,
rather than by a direct simulation output |
boolean |
isObjectiveFunctionDelimiterSet()
checks whether the objective function delimiter is set or not
|
void |
setObjectiveFunctionLocation(OrderedMap objectiveFunctionDelimiter)
Sets the entry of the section ObjectiveFunctionLocation
|
protected static final java.lang.String FS
protected java.lang.String[] SimInpTemFilNam
protected java.lang.String[] SimInpFilNam
protected java.lang.String[] SimOutFilNam
protected java.lang.String[] SimLogFilNam
protected java.lang.String SimConFilNam
protected java.lang.String[] SimInpTemPat
protected java.lang.String[] SimInpPat
protected java.lang.String[] SimInpSavPat
protected java.lang.String[] SimOutPat
protected java.lang.String[] SimOutSavPat
protected java.lang.String[] SimLogPat
protected java.lang.String[] SimLogSavPat
protected java.lang.String SimConPat
protected java.lang.String OptIniPat
protected java.lang.String OptComFilNam
protected java.lang.String OptComPat
protected java.lang.String SimCalSuf
protected java.lang.String SimCalPre
protected OrderedMap objFunMap
protected boolean objFunMapIsSet
protected int nInpFil
protected int nLogFil
protected int nOutFil
public OptimizationIni(java.lang.String[] SimulationInputTemplateFileName, java.lang.String[] SimulationInputTemplatePath, java.lang.String[] SimulationInputFileName, java.lang.String[] SimulationInputPath, java.lang.String[] SimulationInputSavePath, java.lang.String[] SimulationOutputFileName, java.lang.String[] SimulationOutputPath, java.lang.String[] SimulationOutputSavePath, java.lang.String[] SimulationLogFileName, java.lang.String[] SimulationLogPath, java.lang.String[] SimulationLogSavePath, java.lang.String SimulationConfigFileName, java.lang.String SimulationConfigPath, java.lang.String OptimizationInitializationPath, java.lang.String OptimizationCommandFileName, java.lang.String OptimizationCommandPath, java.lang.String SimulationCallPrefix, java.lang.String SimulationCallSuffix) throws java.io.IOException
SimulationInputTemplateFileName
- File name of
the template input files of the simulation inputSimulationInputTemplatePath
- Path where
the template input files of the simulation areSimulationInputFileName
- File names of
the input files of the simulation inputSimulationInputPath
- Paths where
the input files of the simulation areSimulationInputSavePath
- Path where
the input files of the simulation have to be saved,
or ""
if they should not be savedSimulationOutputFileName
- File names of
the output files of the simulation that contains the resultsSimulationOutputPath
- Path where
the output files of the simulation areSimulationOutputSavePath
- Path where
the output files of the simulation have to be saved,
or ""
if they should not be savedSimulationLogFileName
- File names of
the log files of the simulation that contains the error messagesSimulationLogPath
- Path where
the log files of the simulation areSimulationLogSavePath
- Path where
the log files of the simulation have to be saved,
or ""
if they should not be savedSimulationConfigFileName
- File name of
the configuration file of the simulation program that is used by the
optimization engine. This file contains specific informations
about the simulation programSimulationConfigPath
- Path where
the configuration file for the simulation engine isOptimizationInitializationPath
- Path where
the optimization configuration file isOptimizationCommandFileName
- File name of
the command file of the optimizationOptimizationCommandPath
- Path where
the command file of the optimization isSimulationCallPrefix
- prefix for simulation call
might be a blank characterSimulationCallSuffix
- suffix for simulation call
might be a blank characterjava.io.IOException
- If an I/O error occurs, which is possible because the construction of the
canonical pathname may require filesystem queriespublic void setObjectiveFunctionLocation(OrderedMap objectiveFunctionDelimiter)
objectiveFunctionDelimiter
- OrderedMap
with objective function delimiterspublic final int getNumberOfInputFiles()
public final int getNumberOfFunctionObjects()
public final ObjectiveFunctionLocation[] getFunctionObjects()
public final int getNumberOfOutputFiles()
public final int getNumberOfLogFiles()
public final java.lang.String getSimInpTemFilNam(int i)
i
- the number of the filepublic final java.lang.String getSimInpTemPat(int i)
i
- the number of the filepublic final java.lang.String getSimInpFilNam(int i)
i
- the number of the filepublic final java.lang.String[] getSimInpFilNam()
public final java.lang.String getSimInpPat(int i)
i
- the number of the filepublic final java.lang.String[] getSimInpPat()
public final java.lang.String getSimInpSavPat(int i)
i
- the number of the filenull
if no save is requiredpublic final java.lang.String[] getSimOutFilNam()
public final java.lang.String getSimOutFilNam(int i)
i
- the number of the filepublic final java.lang.String[] getSimOutPat()
public final java.lang.String getSimOutPat(int i)
i
- the number of the filepublic final java.lang.String[] getSimInpSavPat()
public final java.lang.String[] getSimOutSavPat()
public final java.lang.String getSimOutSavPat(int i)
i
- the number of the filenull
if no save is requiredpublic final java.lang.String getSimLogFilNam(int i)
i
- the number of the filepublic final java.lang.String[] getSimLogFilNam()
public final java.lang.String[] getSimLogPat()
public final java.lang.String getSimLogPat(int i)
i
- the number of the filepublic final java.lang.String[] getSimLogSavPat()
public final java.lang.String getSimLogSavPat(int i)
i
- the number of the filenull
if no save is requiredpublic final java.lang.String getSimConFilNam()
public final java.lang.String getSimConPat()
public final java.lang.String getOptIniPat()
public final java.lang.String getOptComFilNam()
public final java.lang.String getOptComPat()
public final java.lang.String getObjFunDel(java.lang.String name)
name
- name of the objective functionpublic final java.lang.String getObjFunFun(java.lang.String name)
name
- name of the objective functionpublic final boolean isFunction(java.lang.String name)
true
if name
is the name
of an objective function that is defined by a function object,
rather than by a direct simulation outputname
- name of the objective functiontrue
if name
is the name
of an objective function that is defined by a function object,
false
otherwisepublic final java.lang.String getSimCalPre()
public final java.lang.String getSimCalSuf()
public final boolean isObjectiveFunctionDelimiterSet()
true
if it is set, false
otherwisepublic final java.lang.String convertToTemporaryPath(java.lang.String path, java.lang.String dirName)
path
to the temporary path that will be used
for the simulationpath
- the original path as specified in GenOpt's filesdirName
- the name of the temporary directory (without the full path name)