You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
285 lines
13 KiB
Python
285 lines
13 KiB
Python
# This file was automatically generated by SWIG (http://www.swig.org).
|
|
# Version 1.3.36
|
|
#
|
|
# Don't modify this file, modify the SWIG interface instead.
|
|
# This file is compatible with both classic and new-style classes.
|
|
|
|
"""
|
|
NLopt is a multi-language library for nonlinear optimization (local or
|
|
global, with or without derivatives, and supporting nonlinear
|
|
constraints). Complete documentation, including a Python tutorial,
|
|
can be found at the NLopt web page: http://ab-initio.mit.edu/nlopt
|
|
"""
|
|
|
|
import _nlopt
|
|
import new
|
|
new_instancemethod = new.instancemethod
|
|
try:
|
|
_swig_property = property
|
|
except NameError:
|
|
pass # Python < 2.2 doesn't have 'property'.
|
|
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
|
|
if (name == "thisown"): return self.this.own(value)
|
|
if (name == "this"):
|
|
if type(value).__name__ == 'PySwigObject':
|
|
self.__dict__[name] = value
|
|
return
|
|
method = class_type.__swig_setmethods__.get(name,None)
|
|
if method: return method(self,value)
|
|
if (not static) or hasattr(self,name):
|
|
self.__dict__[name] = value
|
|
else:
|
|
raise AttributeError("You cannot add attributes to %s" % self)
|
|
|
|
def _swig_setattr(self,class_type,name,value):
|
|
return _swig_setattr_nondynamic(self,class_type,name,value,0)
|
|
|
|
def _swig_getattr(self,class_type,name):
|
|
if (name == "thisown"): return self.this.own()
|
|
method = class_type.__swig_getmethods__.get(name,None)
|
|
if method: return method(self)
|
|
raise AttributeError,name
|
|
|
|
def _swig_repr(self):
|
|
try: strthis = "proxy of " + self.this.__repr__()
|
|
except: strthis = ""
|
|
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
|
|
|
|
import types
|
|
try:
|
|
_object = types.ObjectType
|
|
_newclass = 1
|
|
except AttributeError:
|
|
class _object : pass
|
|
_newclass = 0
|
|
del types
|
|
|
|
|
|
class PySwigIterator(_object):
|
|
__swig_setmethods__ = {}
|
|
__setattr__ = lambda self, name, value: _swig_setattr(self, PySwigIterator, name, value)
|
|
__swig_getmethods__ = {}
|
|
__getattr__ = lambda self, name: _swig_getattr(self, PySwigIterator, name)
|
|
def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
|
|
__repr__ = _swig_repr
|
|
__swig_destroy__ = _nlopt.delete_PySwigIterator
|
|
__del__ = lambda self : None;
|
|
def value(*args): return _nlopt.PySwigIterator_value(*args)
|
|
def incr(*args): return _nlopt.PySwigIterator_incr(*args)
|
|
def decr(*args): return _nlopt.PySwigIterator_decr(*args)
|
|
def distance(*args): return _nlopt.PySwigIterator_distance(*args)
|
|
def equal(*args): return _nlopt.PySwigIterator_equal(*args)
|
|
def copy(*args): return _nlopt.PySwigIterator_copy(*args)
|
|
def next(*args): return _nlopt.PySwigIterator_next(*args)
|
|
def previous(*args): return _nlopt.PySwigIterator_previous(*args)
|
|
def advance(*args): return _nlopt.PySwigIterator_advance(*args)
|
|
def __eq__(*args): return _nlopt.PySwigIterator___eq__(*args)
|
|
def __ne__(*args): return _nlopt.PySwigIterator___ne__(*args)
|
|
def __iadd__(*args): return _nlopt.PySwigIterator___iadd__(*args)
|
|
def __isub__(*args): return _nlopt.PySwigIterator___isub__(*args)
|
|
def __add__(*args): return _nlopt.PySwigIterator___add__(*args)
|
|
def __sub__(*args): return _nlopt.PySwigIterator___sub__(*args)
|
|
def __iter__(self): return self
|
|
PySwigIterator_swigregister = _nlopt.PySwigIterator_swigregister
|
|
PySwigIterator_swigregister(PySwigIterator)
|
|
|
|
class nlopt_doublevector(_object):
|
|
__swig_setmethods__ = {}
|
|
__setattr__ = lambda self, name, value: _swig_setattr(self, nlopt_doublevector, name, value)
|
|
__swig_getmethods__ = {}
|
|
__getattr__ = lambda self, name: _swig_getattr(self, nlopt_doublevector, name)
|
|
__repr__ = _swig_repr
|
|
def iterator(*args): return _nlopt.nlopt_doublevector_iterator(*args)
|
|
def __iter__(self): return self.iterator()
|
|
def __nonzero__(*args): return _nlopt.nlopt_doublevector___nonzero__(*args)
|
|
def __len__(*args): return _nlopt.nlopt_doublevector___len__(*args)
|
|
def pop(*args): return _nlopt.nlopt_doublevector_pop(*args)
|
|
def __getslice__(*args): return _nlopt.nlopt_doublevector___getslice__(*args)
|
|
def __setslice__(*args): return _nlopt.nlopt_doublevector___setslice__(*args)
|
|
def __delslice__(*args): return _nlopt.nlopt_doublevector___delslice__(*args)
|
|
def __delitem__(*args): return _nlopt.nlopt_doublevector___delitem__(*args)
|
|
def __getitem__(*args): return _nlopt.nlopt_doublevector___getitem__(*args)
|
|
def __setitem__(*args): return _nlopt.nlopt_doublevector___setitem__(*args)
|
|
def append(*args): return _nlopt.nlopt_doublevector_append(*args)
|
|
def empty(*args): return _nlopt.nlopt_doublevector_empty(*args)
|
|
def size(*args): return _nlopt.nlopt_doublevector_size(*args)
|
|
def clear(*args): return _nlopt.nlopt_doublevector_clear(*args)
|
|
def swap(*args): return _nlopt.nlopt_doublevector_swap(*args)
|
|
def get_allocator(*args): return _nlopt.nlopt_doublevector_get_allocator(*args)
|
|
def begin(*args): return _nlopt.nlopt_doublevector_begin(*args)
|
|
def end(*args): return _nlopt.nlopt_doublevector_end(*args)
|
|
def rbegin(*args): return _nlopt.nlopt_doublevector_rbegin(*args)
|
|
def rend(*args): return _nlopt.nlopt_doublevector_rend(*args)
|
|
def pop_back(*args): return _nlopt.nlopt_doublevector_pop_back(*args)
|
|
def erase(*args): return _nlopt.nlopt_doublevector_erase(*args)
|
|
def __init__(self, *args):
|
|
this = _nlopt.new_nlopt_doublevector(*args)
|
|
try: self.this.append(this)
|
|
except: self.this = this
|
|
def push_back(*args): return _nlopt.nlopt_doublevector_push_back(*args)
|
|
def front(*args): return _nlopt.nlopt_doublevector_front(*args)
|
|
def back(*args): return _nlopt.nlopt_doublevector_back(*args)
|
|
def assign(*args): return _nlopt.nlopt_doublevector_assign(*args)
|
|
def resize(*args): return _nlopt.nlopt_doublevector_resize(*args)
|
|
def insert(*args): return _nlopt.nlopt_doublevector_insert(*args)
|
|
def reserve(*args): return _nlopt.nlopt_doublevector_reserve(*args)
|
|
def capacity(*args): return _nlopt.nlopt_doublevector_capacity(*args)
|
|
__swig_destroy__ = _nlopt.delete_nlopt_doublevector
|
|
__del__ = lambda self : None;
|
|
nlopt_doublevector_swigregister = _nlopt.nlopt_doublevector_swigregister
|
|
nlopt_doublevector_swigregister(nlopt_doublevector)
|
|
|
|
ForcedStop = _nlopt.ForcedStop
|
|
RoundoffLimited = _nlopt.RoundoffLimited
|
|
|
|
nlopt_get_initial_step = _nlopt.nlopt_get_initial_step
|
|
GN_DIRECT = _nlopt.GN_DIRECT
|
|
GN_DIRECT_L = _nlopt.GN_DIRECT_L
|
|
GN_DIRECT_L_RAND = _nlopt.GN_DIRECT_L_RAND
|
|
GN_DIRECT_NOSCAL = _nlopt.GN_DIRECT_NOSCAL
|
|
GN_DIRECT_L_NOSCAL = _nlopt.GN_DIRECT_L_NOSCAL
|
|
GN_DIRECT_L_RAND_NOSCAL = _nlopt.GN_DIRECT_L_RAND_NOSCAL
|
|
GN_ORIG_DIRECT = _nlopt.GN_ORIG_DIRECT
|
|
GN_ORIG_DIRECT_L = _nlopt.GN_ORIG_DIRECT_L
|
|
GD_STOGO = _nlopt.GD_STOGO
|
|
GD_STOGO_RAND = _nlopt.GD_STOGO_RAND
|
|
LD_LBFGS_NOCEDAL = _nlopt.LD_LBFGS_NOCEDAL
|
|
LD_LBFGS = _nlopt.LD_LBFGS
|
|
LN_PRAXIS = _nlopt.LN_PRAXIS
|
|
LD_VAR1 = _nlopt.LD_VAR1
|
|
LD_VAR2 = _nlopt.LD_VAR2
|
|
LD_TNEWTON = _nlopt.LD_TNEWTON
|
|
LD_TNEWTON_RESTART = _nlopt.LD_TNEWTON_RESTART
|
|
LD_TNEWTON_PRECOND = _nlopt.LD_TNEWTON_PRECOND
|
|
LD_TNEWTON_PRECOND_RESTART = _nlopt.LD_TNEWTON_PRECOND_RESTART
|
|
GN_CRS2_LM = _nlopt.GN_CRS2_LM
|
|
GN_MLSL = _nlopt.GN_MLSL
|
|
GD_MLSL = _nlopt.GD_MLSL
|
|
GN_MLSL_LDS = _nlopt.GN_MLSL_LDS
|
|
GD_MLSL_LDS = _nlopt.GD_MLSL_LDS
|
|
LD_MMA = _nlopt.LD_MMA
|
|
LN_COBYLA = _nlopt.LN_COBYLA
|
|
LN_NEWUOA = _nlopt.LN_NEWUOA
|
|
LN_NEWUOA_BOUND = _nlopt.LN_NEWUOA_BOUND
|
|
LN_NELDERMEAD = _nlopt.LN_NELDERMEAD
|
|
LN_SBPLX = _nlopt.LN_SBPLX
|
|
LN_AUGLAG = _nlopt.LN_AUGLAG
|
|
LD_AUGLAG = _nlopt.LD_AUGLAG
|
|
LN_AUGLAG_EQ = _nlopt.LN_AUGLAG_EQ
|
|
LD_AUGLAG_EQ = _nlopt.LD_AUGLAG_EQ
|
|
LN_BOBYQA = _nlopt.LN_BOBYQA
|
|
GN_ISRES = _nlopt.GN_ISRES
|
|
AUGLAG = _nlopt.AUGLAG
|
|
AUGLAG_EQ = _nlopt.AUGLAG_EQ
|
|
G_MLSL = _nlopt.G_MLSL
|
|
G_MLSL_LDS = _nlopt.G_MLSL_LDS
|
|
LD_SLSQP = _nlopt.LD_SLSQP
|
|
NUM_ALGORITHMS = _nlopt.NUM_ALGORITHMS
|
|
FAILURE = _nlopt.FAILURE
|
|
INVALID_ARGS = _nlopt.INVALID_ARGS
|
|
OUT_OF_MEMORY = _nlopt.OUT_OF_MEMORY
|
|
ROUNDOFF_LIMITED = _nlopt.ROUNDOFF_LIMITED
|
|
FORCED_STOP = _nlopt.FORCED_STOP
|
|
SUCCESS = _nlopt.SUCCESS
|
|
STOPVAL_REACHED = _nlopt.STOPVAL_REACHED
|
|
FTOL_REACHED = _nlopt.FTOL_REACHED
|
|
XTOL_REACHED = _nlopt.XTOL_REACHED
|
|
MAXEVAL_REACHED = _nlopt.MAXEVAL_REACHED
|
|
MAXTIME_REACHED = _nlopt.MAXTIME_REACHED
|
|
class roundoff_limited:
|
|
__swig_setmethods__ = {}
|
|
__setattr__ = lambda self, name, value: _swig_setattr(self, roundoff_limited, name, value)
|
|
__swig_getmethods__ = {}
|
|
__getattr__ = lambda self, name: _swig_getattr(self, roundoff_limited, name)
|
|
__repr__ = _swig_repr
|
|
def __init__(self, *args):
|
|
this = _nlopt.new_roundoff_limited(*args)
|
|
try: self.this.append(this)
|
|
except: self.this = this
|
|
__swig_destroy__ = _nlopt.delete_roundoff_limited
|
|
__del__ = lambda self : None;
|
|
roundoff_limited_swigregister = _nlopt.roundoff_limited_swigregister
|
|
roundoff_limited_swigregister(roundoff_limited)
|
|
|
|
class forced_stop:
|
|
__swig_setmethods__ = {}
|
|
__setattr__ = lambda self, name, value: _swig_setattr(self, forced_stop, name, value)
|
|
__swig_getmethods__ = {}
|
|
__getattr__ = lambda self, name: _swig_getattr(self, forced_stop, name)
|
|
__repr__ = _swig_repr
|
|
def __init__(self, *args):
|
|
this = _nlopt.new_forced_stop(*args)
|
|
try: self.this.append(this)
|
|
except: self.this = this
|
|
__swig_destroy__ = _nlopt.delete_forced_stop
|
|
__del__ = lambda self : None;
|
|
forced_stop_swigregister = _nlopt.forced_stop_swigregister
|
|
forced_stop_swigregister(forced_stop)
|
|
|
|
class opt(_object):
|
|
__swig_setmethods__ = {}
|
|
__setattr__ = lambda self, name, value: _swig_setattr(self, opt, name, value)
|
|
__swig_getmethods__ = {}
|
|
__getattr__ = lambda self, name: _swig_getattr(self, opt, name)
|
|
__repr__ = _swig_repr
|
|
__swig_destroy__ = _nlopt.delete_opt
|
|
__del__ = lambda self : None;
|
|
def __init__(self, *args):
|
|
this = _nlopt.new_opt(*args)
|
|
try: self.this.append(this)
|
|
except: self.this = this
|
|
def optimize(*args): return _nlopt.opt_optimize(*args)
|
|
def last_optimize_result(*args): return _nlopt.opt_last_optimize_result(*args)
|
|
def last_optimum_value(*args): return _nlopt.opt_last_optimum_value(*args)
|
|
def get_algorithm(*args): return _nlopt.opt_get_algorithm(*args)
|
|
def get_algorithm_name(*args): return _nlopt.opt_get_algorithm_name(*args)
|
|
def get_dimension(*args): return _nlopt.opt_get_dimension(*args)
|
|
def set_min_objective(*args): return _nlopt.opt_set_min_objective(*args)
|
|
def set_max_objective(*args): return _nlopt.opt_set_max_objective(*args)
|
|
def remove_inequality_constraints(*args): return _nlopt.opt_remove_inequality_constraints(*args)
|
|
def remove_equality_constraints(*args): return _nlopt.opt_remove_equality_constraints(*args)
|
|
def add_inequality_constraint(*args): return _nlopt.opt_add_inequality_constraint(*args)
|
|
def add_equality_constraint(*args): return _nlopt.opt_add_equality_constraint(*args)
|
|
def add_inequality_mconstraint(*args): return _nlopt.opt_add_inequality_mconstraint(*args)
|
|
def add_equality_mconstraint(*args): return _nlopt.opt_add_equality_mconstraint(*args)
|
|
def get_lower_bounds(*args): return _nlopt.opt_get_lower_bounds(*args)
|
|
def set_lower_bounds(*args): return _nlopt.opt_set_lower_bounds(*args)
|
|
def get_upper_bounds(*args): return _nlopt.opt_get_upper_bounds(*args)
|
|
def set_upper_bounds(*args): return _nlopt.opt_set_upper_bounds(*args)
|
|
def get_stopval(*args): return _nlopt.opt_get_stopval(*args)
|
|
def set_stopval(*args): return _nlopt.opt_set_stopval(*args)
|
|
def get_ftol_rel(*args): return _nlopt.opt_get_ftol_rel(*args)
|
|
def set_ftol_rel(*args): return _nlopt.opt_set_ftol_rel(*args)
|
|
def get_ftol_abs(*args): return _nlopt.opt_get_ftol_abs(*args)
|
|
def set_ftol_abs(*args): return _nlopt.opt_set_ftol_abs(*args)
|
|
def get_xtol_rel(*args): return _nlopt.opt_get_xtol_rel(*args)
|
|
def set_xtol_rel(*args): return _nlopt.opt_set_xtol_rel(*args)
|
|
def get_xtol_abs(*args): return _nlopt.opt_get_xtol_abs(*args)
|
|
def set_xtol_abs(*args): return _nlopt.opt_set_xtol_abs(*args)
|
|
def get_maxeval(*args): return _nlopt.opt_get_maxeval(*args)
|
|
def set_maxeval(*args): return _nlopt.opt_set_maxeval(*args)
|
|
def get_maxtime(*args): return _nlopt.opt_get_maxtime(*args)
|
|
def set_maxtime(*args): return _nlopt.opt_set_maxtime(*args)
|
|
def get_force_stop(*args): return _nlopt.opt_get_force_stop(*args)
|
|
def set_force_stop(*args): return _nlopt.opt_set_force_stop(*args)
|
|
def force_stop(*args): return _nlopt.opt_force_stop(*args)
|
|
def set_local_optimizer(*args): return _nlopt.opt_set_local_optimizer(*args)
|
|
def get_population(*args): return _nlopt.opt_get_population(*args)
|
|
def set_population(*args): return _nlopt.opt_set_population(*args)
|
|
def set_initial_step(*args): return _nlopt.opt_set_initial_step(*args)
|
|
def set_default_initial_step(*args): return _nlopt.opt_set_default_initial_step(*args)
|
|
def get_initial_step(*args): return _nlopt.opt_get_initial_step(*args)
|
|
def get_initial_step_(*args): return _nlopt.opt_get_initial_step_(*args)
|
|
opt_swigregister = _nlopt.opt_swigregister
|
|
opt_swigregister(opt)
|
|
|
|
srand = _nlopt.srand
|
|
srand_time = _nlopt.srand_time
|
|
version = _nlopt.version
|
|
version_major = _nlopt.version_major
|
|
version_minor = _nlopt.version_minor
|
|
version_bugfix = _nlopt.version_bugfix
|
|
algorithm_name = _nlopt.algorithm_name
|
|
|
|
|