def __init__(self, dat=None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "PSUADE" self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p><b>PSUADE Optimiation Library</b></p></html>") self.available = True self.description = "PSUADE Optimzation solvers" self.mp = False #can be parallel? self.mobj = False #handles multiobjective? self.minVars = 2 #minimum number of decision variables self.maxVars = 10000 #max variables self.options.add( name='upper', default=10.0, dtype=float, #don't need this if default is proper type desc="Upper bound on scaled variables (usually 10.0)") self.options.add(name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add(name="tol", default=None, desc="Some termination crieria", dtype=float) self.options.add(name="Results name", default="Opt_PSUADE", desc="The name assigned to the flowsheet result set.")
def __init__(self, dat = None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "SciPy-SLSQP" self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p>Developer: Dieter Kraft</p>" "<p>Algorithm Type: Han–Powell quasi–Newton method</p>" "<p>Optimization Problems handling Capability: Nonlinear Optimization Problems with general equality & inequality constraints, and variable bounds.</p>" "</html>") self.options.add( name='upper', default=10.0, dtype=float, desc="Upper bound on scaled variables (usually 10.0)") self.options.add( name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add( name="ftol", default=1.0e-9, desc="Function abs tolerance termiantion condition", dtype=float) self.options.add( name="eps", default=1.0e-11, desc="Jacobian approximation step size", dtype=float) self.options.add( name="maxiter", default=1000000, desc="maximum number of iterations", dtype=int) self.options.add( name="maxtime", default=48.0, desc="maximum time to allow for optimization (hours)", dtype=float) self.options.add( name="Save results", default=True, desc="Save all flowsheet results?") self.options.add( name='Set Name', default="SciPy-SLSQP", dtype=str, desc="Name of flowsheet result set to store data")
def __init__(self, dat = None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "SciPy-BFGS" self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p><b>SciPy BFGS</b></p>" "</html>") self.options.add( name='upper', default=10.0, dtype=float, desc="Upper bound on scaled variables (usually 10.0)") self.options.add( name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add( name="ftol", default=1.0e-9, desc="Function abs tolerance termiantion condition", dtype=float) self.options.add( name="eps", default=1.0e-11, desc="Jacobian approximation step size", dtype=float) self.options.add( name="maxeval", default=1000000, desc="maximum number of objective function evaluations", dtype=int) self.options.add( name="maxtime", default=48.0, desc="maximum time to allow for optimization (hours)", dtype=float) self.options.add( name="Save results", default=True, desc="Save all flowsheet results?") self.options.add( name='Set Name', default="SciPy-BFGS", dtype=str, desc="Name of flowsheet result set to store data")
def __init__(self, dat=None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "SciPy-BFGS" self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p>Developer: Charles George Broyden, Roger Fletcher, Donald Goldfarb and David Shanno</p>" "<p>Algorithm Type: Quasi Newton</p>" "<p>Optimization Problems handled: Unconstrained Nonlinear Optimization, with variables > 1000 (L-BFGS)</p>" "</html>") self.options.add(name='upper', default=10.0, dtype=float, desc="Upper bound on scaled variables (usually 10.0)") self.options.add(name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add(name="ftol", default=1.0e-9, desc="Function abs tolerance termiantion condition", dtype=float) self.options.add(name="eps", default=1.0e-11, desc="Jacobian approximation step size", dtype=float) self.options.add( name="maxeval", default=1000000, desc="maximum number of objective function evaluations", dtype=int) self.options.add(name="maxtime", default=48.0, desc="maximum time to allow for optimization (hours)", dtype=float) self.options.add(name="Save results", default=True, desc="Save all flowsheet results?") self.options.add(name='Set Name', default="SciPy-BFGS", dtype=str, desc="Name of flowsheet result set to store data")
def __init__(self, dat=None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "CMA-ES" self.methodDescription = \ ("This plugin just runs samples evaluetes all the flowsheet " "samples and picks out the best one. If any samples have " "not been evaluted (status -1), they will be evaluted. " "This works with the currently selected data filter, and " "is mostly used for testing.") self.mp = True self.mobj = False self.requireScaling = False self.minVars = 0 self.maxVars = 500 self.options.add( name="Backup interval", default=0, desc=("Time between saving FOQUS session backups (sec)" " ( < 15 no backup)"))
def __init__(self, dat=None): ''' Initialize NLOPT optimization module Args: dat = foqus session object ''' optimization.__init__(self, dat) # base class __init__ self.name = "NLopt" # Plugin name is actually comming from file # name at this point so give file same name # (with a *.py). # Next is the description of the optimization # Unfortunatly not all the HTML below works self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p>Steven G. Johnson, The NLopt nonlinear-optimization" " package, http://ab-initio.mit.edu/nlopt <\p>" "<p>Algorithm Type: Both derivative free & gradient based</p>" "<p>Optimization Problems handling Capability: Nonlinear Optimization Problems with Nonlinear inequality constraints.</p>" "<p>AUGLAG, COBYLA, and ISRES algorithms support nonlinear equality constraints as well.</p>" "<p>NLopt contains several solvers by various authors" "see the NLopt documentation for more information</p>" "</html>") self.available = nlopt_available # If plugin is available self.description = "NLopt" #Short description self.mp = False #Can evaluate objectives in parallel? self.mobj = False #Can do multi-objective optimzation? self.minVars = 2 #Minimum number of decision variables self.maxVars = 10000 #Maximum number of decision variables # # Next up is the solver options appearing on the solver options # page. If the dtype is not specified the option will guess it # from the default value. Providing a list of valid values # creates a dropdown box. # self.options.add( #NLopt contains a bunch of slovers this is the name='Solver', #list of solvers DFO to select from default="BOBYQA", dtype=str, validValues=[ "BOBYQA", "COBYLA", "Nelder-Mead", "NEWUOA", "PRAXIS", "Sbplx", "CRS2", "DIRECT", "DIRECT-L", "DIRECT-L-RAND", "ESCH", "ISRES"], desc="Solver") self.options.add( name='pop', default=0, dtype=int, desc=("Initial Population size for CRS2 or ISRES other " "methods do not use this paramter (<= 0 for default)")) self.options.add( name='init step', default=0, dtype=float, desc="Initial step size for some local DFOs (<=0 default)") self.options.add( name='upper', default=10.0, dtype=float, desc="Upper bound on scaled variables (usually 10.0)") self.options.add( name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add( name="tolfunabs", default=1.0e-9, desc="Function abs tolerance termiantion condition", dtype=float) self.options.add( name="tolfunrel", default=1.0e-9, desc="Function relative tolerance termiantion condition", dtype=float) self.options.add( name="tolxabs", default=1.0e-9, desc="X abs tolerance termiantion condition", dtype=float) self.options.add( name="tolxrel", default=1.0e-9, desc="X relative tolerance termiantion condition", dtype=float) self.options.add( name="maxeval", default=0, desc="maximum number of objective function evaluations", dtype=int) self.options.add( name="maxtime", default=48.0, desc="maximum time to allow for optimization (hours)", dtype=float) self.options.add( name="Save results", default=True, desc="Save all flowsheet results?") self.options.add( name='Set Name', default="NLopt", dtype=str, desc="Name of flowsheet result set to store data") self.options.add( name='Backup Interval', default=1.0, dtype=float, desc="How often (in hours) to save a backup session while " " optimization is running. Less than 0.03 disables")
def __init__(self, dat=None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "CMA-ES" self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p><b>Covariacne Matrix Adaptation Evolutionary Strategy" " (CMA-ES)</b></p>" " Hansen, N. (2006). The CMA Evolution Strategy: A " "Comparing Review. In J.A. Lozano, P. Larranga, I. Inza " "and E. Bengoetxea (eds.). Towards a new evolutionary " "computation. Advances in estimation of distribution " "algorithms. pp. 75-102, Springer.<\p>" "<p>This plugin makes use of the CMA-ES Python module " "https://www.lri.fr/~hansen/cmaes_inmatlab.html#python. " "This plugin provides a wrapper for the CMA-ES code " "allowing it to work with FOQUS.</p></html>") self.available = cma_available self.description = "CMA-ES from ..." self.mp = True self.mobj = False self.minVars = 2 self.maxVars = 10000 self.options.add( name='upper', default=10.0, dtype=float, #don't need this if default is proper type desc="Upper bound on scaled variables (usually 10.0)") self.options.add(name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add( name="tolfun", default=None, desc="Function range tolerance termiantion condition, "\ "The range of function values of the best objective "\ "over the last 10 + 30*N/popsize and all the "\ "evaluations in the most recent iteration, "\ "N=number of decision variables "\ "(null solver default 10**-11)", dtype=float) self.options.add( name="tolstagnation", default=None, desc="stop after this number of iterations without "\ "improvment (null solver default, "\ "100+100*N**1.5/popsize, N = number of variables)", dtype=float) self.options.add( name="tolx", default=None, desc="Tolerance for changes in decision variables, "\ "termiantion condition, stop if standard deviation of "\ "the distribution in all directions is less that tolx "\ "(null solver default 10**-11)", dtype=float) self.options.add(name="seed", default=0, desc="Random number seed (0 uses clock)") self.options.add( name="itmax", default=0, desc="Maximum number of iterations (0 go until converges)", dtype=int) self.options.add( name="popsize", default=6, desc="Number of samples per iteration. The suggested"\ "number lacking another information and on a single "\ "processor is 4 + floor(3*loge(N)) where N is the "\ "number of decision variables" ) self.options.add( name="sd0", default=2, desc="Initial standard deviation about starting point") self.options.add(name="Results name", default="CMA_Results", desc="The name assigned to the flowsheet result set.") self.options.add( name="Restart out", default="", desc="Restart file for, {n} replaced by iteration index") self.options.add( name="Restart modulus", default=1, desc="Create restart file every x iterations (0 no restart)") self.options.add( name="Restart in", default="", desc="A file to restart from. (if empty string start new)") self.options.add(name="It timeout", default=3600, desc="Iteration timeout (sec). unfinished sims fail") self.options.add( name="Max time", default=0.0, desc="Max time allowed for optimization (hours), "\ "not exact, but will not terminate sooner (0 for "\ "no time limit") self.options.add(name="Save results", default=True, desc="Save all flowsheet results?") self.options.add( name="Backup interval", default=10, desc="Iterations between saving FOQUS session backup"\ " (0 no backup)") self.options.add(name="Log Objective", default="", desc="Append objective mix/max after every iteration")
def __init__(self, dat=None): ''' Initialize Snobfit optimization module Args: dat = foqus session object ''' optimization.__init__(self, dat) # base class __init__ self.name = "Snobfit" # Plugin name is actually comming from file # name at this point so give file same name # (with a *.py). # Next is the description of the optimization self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p>Developer: WALTRAUD HUYER and ARNOLD NEUMAIER</p>" "<p>Algorithm Type: Branch & Local Fit</p>" "<p>Optimization Problems handling Capability: Unconstrained Noisy Optimization problems with box bounds, and optional soft constraints</p>" "</html>") self.available = snobfit_available # If plugin is available self.description = "Optimization Solver" #Short description self.mp = False #Can evaluate objectives in parallel? self.mobj = False #Can do multi-objective optimzation? self.minVars = 2 #Minimum number of decision variables self.maxVars = 10000 #Maximum number of decision variables # Next up is the solver options appearing on the solver options # page. If the dtype is not specified the option will guess it # from the default value. Providing a list of valid values # creates a dropdown box. #******** FROZEN OPTIONS FOR NOW***************** # self.options.add( # name='bounds', # dtype=object, # desc="Box Bounds of decision variables") # self.options.add( # name='nreq', # default=2, # dtype=int, # desc="Required Number of Suggested Evaluation Points Generated by SnobFit") # self.options.add( # name='p', # default=0.5, # dtype=float, # desc="Probability of Generating a Class 4 Point") #****************************************************** self.options.add(name='budget', default=10000, dtype=int, desc="Limit on the number of function calls") self.options.add( name='minfcall', default=500, dtype=int, desc="Minimum number of function values before considering stopping" ) self.options.add( name='nstop', default=5, dtype=int, desc= "Number of snobfit calls upto which no improvement is tolerated") self.options.add(name="maxtime", default=48.0, desc="maximum time to allow for optimization (hours)", dtype=float) self.options.add(name="Save results", default=True, desc="Save all flowsheet results?") self.options.add(name='Set Name', default="SNOBFIT", dtype=str, desc="Name of flowsheet result set to store data") self.options.add( name='Backup Interval', default=0.5, dtype=float, desc="How often (in hours) to save a backup session while " " optimization is running. Less than 0.03 disables")
def __init__(self, dat=None): ''' Initialize Snobfit optimization module Args: dat = foqus session object ''' optimization.__init__(self, dat) # base class __init__ self.name = "Snobfit" # Plugin name is actually comming from file # name at this point so give file same name # (with a *.py). # Next is the description of the optimization self.methodDescription = \ ("This solver provides robust and fast solution of noisy optimization problems with continuous variables varying within box bounds, possibly subject to additional soft constraints. Discrete variables are not supported") self.available = snobfit_available # If plugin is available self.description = "Optimization Solver" #Short description self.mp = False #Can evaluate objectives in parallel? self.mobj = False #Can do multi-objective optimzation? self.minVars = 2 #Minimum number of decision variables self.maxVars = 10000 #Maximum number of decision variables # Next up is the solver options appearing on the solver options # page. If the dtype is not specified the option will guess it # from the default value. Providing a list of valid values # creates a dropdown box. #******** FROZEN OPTIONS FOR NOW***************** # self.options.add( # name='bounds', # dtype=object, # desc="Box Bounds of decision variables") # self.options.add( # name='nreq', # default=2, # dtype=int, # desc="Required Number of Suggested Evaluation Points Generated by SnobFit") # self.options.add( # name='p', # default=0.5, # dtype=float, # desc="Probability of Generating a Class 4 Point") #****************************************************** self.options.add( name='budget', default=10000, dtype=int, desc="Limit on the number of function calls") self.options.add( name='minfcall', default=500, dtype=int, desc="Minimum number of function values before considering stopping") self.options.add( name='nstop', default=5, dtype=int, desc="Number of snobfit calls upto which no improvement is tolerated") self.options.add( name="maxtime", default=48.0, desc="maximum time to allow for optimization (hours)", dtype=float) self.options.add( name="Save results", default=True, desc="Save all flowsheet results?") self.options.add( name='Set Name', default="SNOBFIT", dtype=str, desc="Name of flowsheet result set to store data") self.options.add( name='Backup Interval', default=0.5, dtype=float, desc="How often (in hours) to save a backup session while " " optimization is running. Less than 0.03 disables")
def __init__(self, dat=None): ''' Initialize CMA-ES optimization module ''' optimization.__init__(self, dat) self.name = "CMA-ES" self.methodDescription = \ ("<html>\n<head>" ".hangingindent {\n" " margin-left: 22px ;\n" " text-indent: -22px ;\n" "}\n" "</head>\n" "<p class=\"hangingindent\">" "<p><b>Covariance Matrix Adaptation Evolutionary Strategy" " (CMA-ES)</b></p>" "<p>Developer: Nikolaus Hansen</p>" "<p>Algorithm Type: Genetic/Evolutionary</p>" "<p>Optimization Problems handling Capability: Nonlinear, Non Convex, Unconstrained Optimization problems, with optional bounds on variables. Variable limit: 3-100</p>" "<p>More Details found here: http://cma.gforge.inria.fr/" "</html>") self.available = cma_available self.description = "CMA-ES from ..." self.mp = True self.mobj = False self.minVars = 2 self.maxVars = 10000 self.options.add( name='upper', default=10.0, dtype=float, #don't need this if default is proper type desc="Upper bound on scaled variables (usually 10.0)") self.options.add(name='lower', default=0.0, desc="Lower bound on scaled variables (usually 0.0)") self.options.add( name="tolfun", default=None, desc="Function range tolerance termiantion condition, "\ "The range of function values of the best objective "\ "over the last 10 + 30*N/popsize and all the "\ "evaluations in the most recent iteration, "\ "N=number of decision variables "\ "(null solver default 10**-11)", dtype=float) self.options.add( name="tolstagnation", default=None, desc="stop after this number of iterations without "\ "improvment (null solver default, "\ "100+100*N**1.5/popsize, N = number of variables)", dtype=float) self.options.add( name="tolx", default=None, desc="Tolerance for changes in decision variables, "\ "termiantion condition, stop if standard deviation of "\ "the distribution in all directions is less that tolx "\ "(null solver default 10**-11)", dtype=float) self.options.add(name="seed", default=0, desc="Random number seed (0 uses clock)") self.options.add( name="itmax", default=0, desc="Maximum number of iterations (0 go until converges)", dtype=int) self.options.add( name="popsize", default=6, desc="Number of samples per iteration. The suggested"\ "number lacking another information and on a single "\ "processor is 4 + floor(3*loge(N)) where N is the "\ "number of decision variables" ) self.options.add( name="sd0", default=2, desc="Initial standard deviation about starting point") self.options.add(name="Results name", default="CMA_Results", desc="The name assigned to the flowsheet result set.") self.options.add( name="Restart out", default="", desc="Restart file for, {n} replaced by iteration index") self.options.add( name="Restart modulus", default=1, desc="Create restart file every x iterations (0 no restart)") self.options.add( name="Restart in", default="", desc="A file to restart from. (if empty string start new)") self.options.add(name="It timeout", default=3600, desc="Iteration timeout (sec). unfinished sims fail") self.options.add( name="Max time", default=0.0, desc="Max time allowed for optimization (hours), "\ "not exact, but will not terminate sooner (0 for "\ "no time limit") self.options.add(name="Save results", default=True, desc="Save all flowsheet results?") self.options.add( name="Backup interval", default=10, desc="Iterations between saving FOQUS session backup"\ " (0 no backup)") self.options.add(name="Log Objective", default="", desc="Append objective mix/max after every iteration")