public class GenOpt
extends java.lang.Thread
This project was carried out at:
and supported byThe version numbering format is M.m.P.s, where M is the major version number, m is the minor version number, P is the patch level, and s is the snapshot number. Full releases have P set to zero, and it is incremented for each subsequent bug fix release on the post-release stable branch. The snapshot number s is present only for between-release snapshots of the development and stable branches.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Technology Transfer Department at TTD@lbl.gov.
NOTICE. This software was developed under partial funding from the U.S. Department of Energy. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, prepare derivative works, and perform publicly and display publicly. Beginning five (5) years after the date permission to assert copyright is obtained from the U.S. Department of Energy, and subject to any subsequent five (5) year renewals, the U.S. Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
(3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form.
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | ACKNOWLEDGMENTDescribe constant  ACKNOWLEDGMENThere. | 
| static java.lang.String | AUTHORDescribe constant  AUTHORhere. | 
| ContinuousParameter[] | conParcontinuous parameters | 
| static java.lang.String | COPYRIGHTDescribe constant  COPYRIGHThere. | 
| static boolean | DEBUGFlag whether we are in debug mode or not. | 
| static java.lang.String | DEBUG_WARNINGString containing the debug warning. | 
| protected int | dimCondimension of the continuous parameters | 
| protected int | dimDisdimension of the discrete parameters | 
| protected int | dimInpFundimension of the input functions | 
| DiscreteParameter[] | disPardiscrete parameters | 
| static java.lang.String | DIVIDERDivider for output. | 
| ErrorChecker | ErrCheerror checker | 
| private static int | exiFlaexit flag of the optimization | 
| InfoManager | infManinfo manager | 
| InputFunction[] | inpFuninput functions | 
| IOSettings | ioSetio settings | 
| private static java.lang.String | LSLine separator | 
| private java.lang.String | maiAlgname of the main algorithm | 
| OptimizationIni | OptInioptimization initialization | 
| private java.lang.String | optIniFilNamname of optimization ini file | 
| private java.lang.String | optIniPatpath of optimization ini file | 
| OptimizationSettings | OptSetoptimization settings | 
| private Preference | prefuser preference | 
| static java.lang.String | PROGRAMINFOProgram information. | 
| ResultChecker | resCheresult Checker | 
| ResultManager | ResManresult manager | 
| static java.lang.String | RUNHEADERDescribe constant  RUNHEADERhere. | 
| SimulationStarter | SimStasimulation starter | 
| protected java.util.Date | startDatedate when the optimization started | 
| private static boolean | stopGenOptflag to indicate whether GenOpt has to be stopped
 after the current simulation | 
| private static boolean | suspendflag to indicate whether GenOpt has to be suspended | 
| static java.lang.String | USER_STOP_MESSAGEMessage that appears if the user stops GenOpt. | 
| java.lang.String | USERDIRUser directory (working directory). | 
| static java.lang.String | VERSIONDescribe constant  VERSIONhere. | 
| static java.lang.String | VERSION_IDDescribe constant  VERSION_IDhere. | 
| static java.lang.String | VERSION_NUMBERDescribe constant  VERSION_NUMBERhere. | 
| static java.lang.String | VERSIONINFOVersion string. | 
| WarningManager | warManwarning manager | 
| protected WinGenOpt | wgoreference to WinGenOpt | 
| Constructor and Description | 
|---|
| GenOpt()allocates a new GenOpt Object containing nothing | 
| GenOpt(java.lang.String optIniFileName,
      InputFormatException inpForExc,
      WinGenOpt windowVersion)allocates a new GenOpt Object | 
| Modifier and Type | Method and Description | 
|---|---|
| private void | flushLogFile(java.lang.String content)writes physically the log file  GenOpt.logto
 the log directory. | 
| java.io.StreamTokenizer | getAlgorithmSection()gets a StreamTokenizer whereas its pointer points to the start of
 the  AlgorithmsectionThe pointer in the StreamTokenizer is moved beyond the section start character ('{'). | 
| java.io.StreamTokenizer | getAlgorithmSection(InputFormatException e)gets a StreamTokenizer whereas its pointer points to the start of
 the  AlgorithmsectionThe pointer in the StreamTokenizer is moved beyond the section start character ('{'). | 
| int | getDimensionContinuous()gets the number of the continuous parameters | 
| int | getDimensionDiscrete()gets the number of discrete parameters | 
| int | getExitFlag()gets the exit flag of the optimization run | 
| private void | getFunctionInput(java.io.StreamTokenizer optComStrTok,
                InputFormatException inpForExc,
                java.lang.String fn)makes an instance of a function input. | 
| protected java.io.File | getIniStartUpFile()gets the initialization startup file | 
| static javax.swing.JFileChooser | getInitializationFileChooser(java.io.File IniStartUpFile)gets an optimization initialization file chooser | 
| java.lang.String | getMainAlgorithm()gets the name of the main algorithm | 
| private java.lang.String[] | getMultipleStringPairs(java.lang.String[] keys,
                      boolean[] required,
                      java.io.StreamTokenizer st,
                      InputFormatException ife,
                      java.lang.String fn)gets the entries of the  keyspair in a string array. | 
| private OrderedMap | getObjectiveFunctionDelimiter(java.io.StreamTokenizer st,
                             InputFormatException ife,
                             java.lang.String fn)gets the entries of the objective function delimiter | 
| java.io.File | getOptimizationIniFile()gets the optimization ini file | 
| private Optimizer | getOptimizer()gets a new instance of the Optimizer object | 
| private void | getParameterInput(java.io.StreamTokenizer optComStrTok,
                 InputFormatException inpForExc,
                 java.lang.String fn)makes an instance of a free Parameter. | 
| protected java.lang.String | getRunInfo()gets the GenOpt run info for output report | 
| java.lang.String | getRuntime(java.util.Date now)gets the current runtime of the optimization in the format  xhh:mm:ss | 
| java.lang.String | getSeparator()gets the separator, as specified in properties.txt | 
| java.util.Date | getStartDate()gets the start date of the optimization | 
| private void | initializeOptimizationIniName(java.lang.String optIniFileName)initializes the optimization ini file name and path | 
| private void | instantiateErrChe_SimSta(InputFormatException inpForExc)makes an instance of ErrorChecker, SimulationStarter, and sets the data
 member 'ObjectiveFunctionLocation' in the instance of OptimizationIni | 
| private void | instantiateErrorChecker(java.io.StreamTokenizer optCfgStrTok,
                       InputFormatException inpForExc,
                       java.lang.String fn)makes an instance of ErrorChecker | 
| private void | instantiateFreePar_OptSet_ResChe_maiAlg(InputFormatException inpForExc,
                                       int maxEqualResults)makes an instance of FreePar, OptimizationSettings, and
   ResultChecker | 
| private void | instantiateFreePar(java.io.StreamTokenizer optComStrTok,
                  InputFormatException inpForExc,
                  java.lang.String fn)makes all instances of FreePar and input functions | 
| private void | instantiateIOSettings(java.io.StreamTokenizer optCfgStrTok,
                     InputFormatException inpForExc,
                     java.lang.String fn)sets the accuracy of the file writing (number format) | 
| private OrderedMap | instantiateOptimizationIni(InputFormatException inpForExc)makes an instance of OptimizationIni, and returns the objective function delimiters | 
| private void | instantiateOptimizationSettings_ResultChecker(java.io.StreamTokenizer optComStrTok,
                                             InputFormatException inpForExc,
                                             java.lang.String fn,
                                             int maxEqualResults)makes an instance of OptimizationSettings and ResultChecker | 
| private void | instantiateResultManager(InputFormatException inpForExc)makes an instance of ResultManager | 
| (package private) void | instantiateSimulationStarter(java.io.StreamTokenizer optCfgStrTok,
                            InputFormatException inpForExc,
                            java.lang.String fn)makes an instance of SimulationStarter | 
| boolean | isDebug()checks whether we should run in debug mode | 
| static void | main(java.lang.String[] args)Main routine | 
| boolean | mustStopOptimization()returns a flag whether GenOpt must be stopped after the current simulation | 
| private static boolean | parseBoolean(java.io.StreamTokenizer st,
            java.lang.String keyWord,
            java.lang.String value,
            InputFormatException inpForExc,
            java.lang.String fileName)parses a String to a boolean an writes error into the InputFormatException | 
| private static ContinuousParameter | parseContinuousPar(java.lang.String[] val,
                  InputFormatException e,
                  int lineNumber,
                  java.lang.String fileName)gets a new instance of a ContinuousParameter Object based on the value in 'val'. | 
| private static DiscreteParameter | parseDiscretePar(java.io.StreamTokenizer optComStrTok,
                java.lang.String[] key,
                java.lang.String[] val,
                InputFormatException inpForExc,
                java.lang.String fileName)gets a new instance of a DiscreteParameter Object. | 
| private static double | parseDouble(java.io.StreamTokenizer st,
           java.lang.String keyWord,
           java.lang.String value,
           double minVal,
           double maxVal,
           InputFormatException inpForExc,
           java.lang.String fileName)parses a String to a double and writes error into the InputFormatException | 
| private static double | parseDouble(java.io.StreamTokenizer st,
           java.lang.String variableName,
           java.lang.String keyWord,
           java.lang.String value,
           double minVal,
           double maxVal,
           InputFormatException inpForExc,
           java.lang.String fileName)parses a String to a double and writes error into the InputFormatException | 
| private static int | parseInteger(java.io.StreamTokenizer st,
            java.lang.String keyWord,
            java.lang.String value,
            int minVal,
            int maxVal,
            InputFormatException inpForExc,
            java.lang.String fileName)parses a String to an int and writes error into the InputFormatException | 
| private static int | parseInteger(java.io.StreamTokenizer st,
            java.lang.String variableName,
            java.lang.String keyWord,
            java.lang.String value,
            int minVal,
            int maxVal,
            InputFormatException inpForExc,
            java.lang.String fileName)parses a String to an int and writes error into the InputFormatException | 
| void | print(java.lang.String text)prints a message to the output device without finishing the line | 
| void | printError(java.lang.String text)prints an error to the output device | 
| void | println(java.lang.String text)prints a message to the output device, and then finishs the line | 
| static void | printStackTrace(java.lang.Throwable t)prints a stackTrace to the output and error stream | 
| void | run()runs the optimization method | 
| void | setNewTrial()reports a new optimization trial to the GUI | 
| private void | setupProperties()sets up the properties | 
| private static void | setWrongClassTypeInputFormatException(java.io.StreamTokenizer st,
                                     java.lang.String keyWord,
                                     java.lang.String value,
                                     InputFormatException inpForExc,
                                     java.lang.Object wrapperClass,
                                     java.lang.String fileName)sets an error message in the InputFormatException instance indicating that a wrong
 data type has been received | 
| void | sleepGenOpt(boolean susp)suspends GenOpt if  suspistrue, otherwise
 resume GenOpt | 
| void | stopOptimization()forces GenOpt to stop the optimization after the current simulation | 
| void | writeLogFile()writes the log file  GenOpt.logto
 the log directory. | 
| void | writeLogFile(java.lang.String errorMessage)writes the log file  GenOpt.logto
 the log directory. | 
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprivate static final java.lang.String LS
public static final java.lang.String VERSION_NUMBER
VERSION_NUMBER here.public static final java.lang.String VERSION_ID
VERSION_ID here.public static final java.lang.String VERSION
VERSION here.public static final java.lang.String COPYRIGHT
COPYRIGHT here.public static final java.lang.String AUTHOR
AUTHOR here.public static final java.lang.String ACKNOWLEDGMENT
ACKNOWLEDGMENT here.public static final java.lang.String VERSIONINFO
public static final java.lang.String PROGRAMINFO
public static final java.lang.String DIVIDER
public static final java.lang.String RUNHEADER
RUNHEADER here.public static final java.lang.String USER_STOP_MESSAGE
public static boolean DEBUG
public static final java.lang.String DEBUG_WARNING
public java.lang.String USERDIR
protected WinGenOpt wgo
protected int dimCon
protected int dimDis
protected int dimInpFun
public WarningManager warMan
public InfoManager infMan
public ContinuousParameter[] conPar
public DiscreteParameter[] disPar
public InputFunction[] inpFun
public OptimizationIni OptIni
public OptimizationSettings OptSet
public IOSettings ioSet
public SimulationStarter SimSta
public ErrorChecker ErrChe
public ResultManager ResMan
public ResultChecker resChe
private java.lang.String maiAlg
protected java.util.Date startDate
private java.lang.String optIniPat
private java.lang.String optIniFilNam
private static int exiFla
private static boolean stopGenOpt
private static volatile boolean suspend
private Preference pref
public GenOpt()
public GenOpt(java.lang.String optIniFileName,
              InputFormatException inpForExc,
              WinGenOpt windowVersion)
       throws java.io.FileNotFoundException,
              java.io.IOException
optIniFileName - a String valueinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectwindowVersion - reference to WinGenOpt Object or null pointerjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic static javax.swing.JFileChooser getInitializationFileChooser(java.io.File IniStartUpFile)
IniStartUpFile - a File valueJFileChooser valueprotected java.io.File getIniStartUpFile()
private void initializeOptimizationIniName(java.lang.String optIniFileName)
                                    throws java.io.IOException
optIniFileName - name of optimization ini file or null pointerjava.io.IOException - If an I/O error occurs, which is possible because the construction of the
                        canonical pathname may require filesystem queriesprivate OrderedMap instantiateOptimizationIni(InputFormatException inpForExc) throws java.io.FileNotFoundException, java.io.IOException
inpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectOrderedMap of the form [[Name1, Delimiter1]
         , ... , [NameN, DelimiterN]]
         if present or a null pointer otherwisejava.io.FileNotFoundExceptionjava.io.IOException - If the canonical path of the user directory cannot be obtainedprivate OrderedMap getObjectiveFunctionDelimiter(java.io.StreamTokenizer st, InputFormatException ife, java.lang.String fn) throws java.io.IOException
st - StreamTokenizer where pointer is set before the section startife - refernce to InputFormatException. InputFormatException will be
        written in this Objectfn - associated file name. Used for error report onlyjava.io.IOExceptionprivate void instantiateErrChe_SimSta(InputFormatException inpForExc) throws java.io.FileNotFoundException
inpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectjava.io.FileNotFoundExceptionprivate java.lang.String[] getMultipleStringPairs(java.lang.String[] keys,
                                                  boolean[] required,
                                                  java.io.StreamTokenizer st,
                                                  InputFormatException ife,
                                                  java.lang.String fn)
keys pair in a string array. The order of
  the keys in the file is arbitrary.keys - a pair of Strings where each String is a keyword for the entry
        to be readrequired - true if key must be specified, false if key
        is optionalst - StreamTokenizer from which will be readife - reference to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of file that is being read[val1(key[1]), val1(key[2]), val2(key[1]), ....].
         If a key is not required and was not specified, then the current
         element is set to nullprivate void instantiateErrorChecker(java.io.StreamTokenizer optCfgStrTok,
                                     InputFormatException inpForExc,
                                     java.lang.String fn)
optCfgStrTok - StreamTokenizer of the optimization configuration fileinpForExc - reference to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization configuration fileprivate void instantiateIOSettings(java.io.StreamTokenizer optCfgStrTok,
                                   InputFormatException inpForExc,
                                   java.lang.String fn)
optCfgStrTok - StreamTokenizer of the optimization configuration fileinpForExc - reference to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization configuration filevoid instantiateSimulationStarter(java.io.StreamTokenizer optCfgStrTok,
                                  InputFormatException inpForExc,
                                  java.lang.String fn)
optCfgStrTok - StreamTokenizer of the optimization configuration fileinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization configuration fileprivate void instantiateFreePar_OptSet_ResChe_maiAlg(InputFormatException inpForExc, int maxEqualResults) throws java.io.FileNotFoundException, java.io.IOException
inpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectmaxEqualResults - default value for maximum number of equal result
            before GenOpt terminates with an errorjava.io.FileNotFoundExceptionjava.io.IOExceptionprivate void instantiateFreePar(java.io.StreamTokenizer optComStrTok,
                                InputFormatException inpForExc,
                                java.lang.String fn)
optComStrTok - StreamTokenizer of the optimization command fileinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization command fileprivate void getFunctionInput(java.io.StreamTokenizer optComStrTok,
                              InputFormatException inpForExc,
                              java.lang.String fn)
optComStrTok - StreamTokenizer of the optimization command fileinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization command fileprivate void getParameterInput(java.io.StreamTokenizer optComStrTok,
                               InputFormatException inpForExc,
                               java.lang.String fn)
optComStrTok - StreamTokenizer of the optimization command fileinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization command fileprivate void instantiateOptimizationSettings_ResultChecker(java.io.StreamTokenizer optComStrTok,
                                                           InputFormatException inpForExc,
                                                           java.lang.String fn,
                                                           int maxEqualResults)
optComStrTok - StreamTokenizer of the optimization command fileinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectfn - file name (including path) of optimization command filemaxEqualResults - default value for maximum number of equal result
            before GenOpt terminates with an errorprivate static boolean parseBoolean(java.io.StreamTokenizer st,
                                    java.lang.String keyWord,
                                    java.lang.String value,
                                    InputFormatException inpForExc,
                                    java.lang.String fileName)
st - the StreamTokenizerkeyWord - the keyWord associated with the value valvalue - the value received for keyWordinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectfileName - name of the file where input comes fromprivate static int parseInteger(java.io.StreamTokenizer st,
                                java.lang.String keyWord,
                                java.lang.String value,
                                int minVal,
                                int maxVal,
                                InputFormatException inpForExc,
                                java.lang.String fileName)
st - the StreamTokenizerkeyWord - the keyWord associated with the value valvalue - the value received for keyWordminVal - minimal allowed valuemaxVal - maximal allowed valueinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectfileName - name of the file where input comes fromint value of valprivate static int parseInteger(java.io.StreamTokenizer st,
                                java.lang.String variableName,
                                java.lang.String keyWord,
                                java.lang.String value,
                                int minVal,
                                int maxVal,
                                InputFormatException inpForExc,
                                java.lang.String fileName)
st - the StreamTokenizervariableName - the variable name associated with the value valkeyWord - the keyWord associated with the value valvalue - the value received for keyWordminVal - minimal allowed valuemaxVal - maximal allowed valueinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectfileName - name of the file where input comes fromint value of valprivate static double parseDouble(java.io.StreamTokenizer st,
                                  java.lang.String variableName,
                                  java.lang.String keyWord,
                                  java.lang.String value,
                                  double minVal,
                                  double maxVal,
                                  InputFormatException inpForExc,
                                  java.lang.String fileName)
st - the StreamTokenizervariableName - the variable name associated with the value valkeyWord - the keyWord associated with the value valvalue - the value received for keyWordminVal - minimal allowed valuemaxVal - maximal allowed valueinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectfileName - name of the file where input comes fromdouble value of valprivate static double parseDouble(java.io.StreamTokenizer st,
                                  java.lang.String keyWord,
                                  java.lang.String value,
                                  double minVal,
                                  double maxVal,
                                  InputFormatException inpForExc,
                                  java.lang.String fileName)
st - the StreamTokenizerkeyWord - the keyWord associated with the value valvalue - the value received for keyWordminVal - minimal allowed valuemaxVal - maximal allowed valueinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectfileName - name of the file where input comes fromprivate static void setWrongClassTypeInputFormatException(java.io.StreamTokenizer st,
                                                          java.lang.String keyWord,
                                                          java.lang.String value,
                                                          InputFormatException inpForExc,
                                                          java.lang.Object wrapperClass,
                                                          java.lang.String fileName)
st - the StreamTokenizerkeyWord - the keyWord associated with the value valvalue - the value received for keyWordinpForExc - refernce to InputFormatException. InputFormatException will be
        written in this ObjectwrapperClass - any of the wrapper class of the primitive Java typefileName - name of the file where input comes fromprivate void instantiateResultManager(InputFormatException inpForExc)
inpForExc - refernce to InputFormatException. InputFormatException will be
        written in this Objectprivate static ContinuousParameter parseContinuousPar(java.lang.String[] val, InputFormatException e, int lineNumber, java.lang.String fileName)
val - String array with following elements:
           val[0] = Name; val[1] = Min ; val[2] = Ini;
           val[3] = Max ; val[4] = Step;e - reference to InputFormatException. Error messages are written into
         this ObjectlineNumber - line number to which the error report will be referred tofileName - name of file (for error report only) or null pointerprivate static DiscreteParameter parseDiscretePar(java.io.StreamTokenizer optComStrTok, java.lang.String[] key, java.lang.String[] val, InputFormatException inpForExc, java.lang.String fileName)
optComStrTok - StreamTokenizer of the optimization command filekey - String array with the keywords:
           key[0] = Name; key[1] = Min ; key[2] = Ini;
           key[3] = Max ; key[4] = Step; key[5] = Type;
           key[6] = Values;val - String array the values for keyinpForExc - reference to InputFormatException. Error messages are written into
         this ObjectfileName - name of file (for error report only)public java.lang.String getMainAlgorithm()
String valuepublic java.io.StreamTokenizer getAlgorithmSection()
                                            throws InputFormatException,
                                                   java.io.IOException
Algorithm sectionStreamTokenizer valueInputFormatExceptionjava.io.IOExceptionpublic java.io.StreamTokenizer getAlgorithmSection(InputFormatException e) throws java.io.IOException
Algorithm sectione - reference to InputFormatException. Error messages are written into
         this ObjectStreamTokenizer valuejava.io.IOExceptionpublic void writeLogFile(java.lang.String errorMessage)
GenOpt.log to
 the log directory.errorMessage - the error messagepublic void writeLogFile()
GenOpt.log to
 the log directory.private void flushLogFile(java.lang.String content)
GenOpt.log to
 the log directory.content - the content of the filepublic java.io.File getOptimizationIniFile()
protected java.lang.String getRunInfo()
public java.lang.String getRuntime(java.util.Date now)
xhh:mm:ssnow - a Date valuepublic java.util.Date getStartDate()
public void setNewTrial()
public void print(java.lang.String text)
text - the text to be printedpublic void println(java.lang.String text)
text - the text to be printedpublic void printError(java.lang.String text)
text - the text to be printedpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void stopOptimization()
public void sleepGenOpt(boolean susp)
susp is true, otherwise
 resume GenOptsusp - a boolean valuepublic boolean mustStopOptimization()
true if GenOpt has to be stopped, false
        otherwisepublic int getDimensionContinuous()
public int getDimensionDiscrete()
private Optimizer getOptimizer() throws java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, InputFormatException, java.io.IOException
java.lang.InstantiationExceptionjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionInputFormatExceptionjava.io.IOExceptionpublic int getExitFlag()
public static void printStackTrace(java.lang.Throwable t)
t - Throwableprivate void setupProperties()
public java.lang.String getSeparator()
public boolean isDebug()
true if we run in debug mode, false otherwisepublic static void main(java.lang.String[] args)
args - optional parameter for optimization initialization file