[SciPy-user] Generating tuples and lists connected with
optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1)
nwagner at mecha.uni-stuttgart.de
Fri Jul 1 06:43:32 CDT 2005
Christian Kristukat wrote:
> Nils Wagner wrote:
>> Is it possible to solve constrained optimization problems of the form
>> min f(x)
>> 0 < x_1 < =1
>> 0 < x_2 < =1
>> n(x) = 0
>> with scipy. n(x) denotes a nonlinear function of the design
>> variables x^T=[x_1,\dots,x_n]
>> So we have both equality and inequality constraints.
> Might be stupid, but as we are limited to machine precision, one could
> take the machine precision as lower limit:
> eps <= x_1 <= 1
> That should be equal to 0 < x_1. Correct me if I'm wrong.
> Regards, Christian
I agree, but how about the nonlinear equality constraint.
As far as I understand it, I have to use fmin_cobyla which offers an
argument cons for constraints.
However these constraints must be >=0 insetad of = 0 in my case.
Am I missing something ?
fmin_tnc(func, x0, fprime=None, args=(), approx_grad=False, bounds=None,
epsilon=1e-08, scale=None, messages=15, maxCGit
=-1, maxfun=None, eta=-1, stepmx=0, accuracy=0, fmin=0, ftol=0, rescale=-1)
Minimize a function with variables subject to bounds, using gradient
fmin_cobyla(func, x0, cons, args=(), consargs=None, rhobeg=1.0,
rhoend=0.0001, iprint=1, maxfun=1000)
Minimize a function using the Contrained Optimization BY Linear
func -- function to minimize. Called as func(x, *args)
x0 -- initial guess to minimum
cons -- a list of functions that all must be >=0 (a single function
if only 1 constraint)
args -- extra arguments to pass to function
consargs -- extra arguments to pass to constraints (default of None
use same extra arguments as those passed to func). Use
() for no
rhobeg -- reasonable initial changes to the variables
rhoend -- final accuracy in the optimization (not precisely guaranteed)
iprint -- controls the frequency of output: 0 (no output),1,2,3
maxfun -- maximum number of function evaluations.
x -- the minimum
> SciPy-user mailing list
> SciPy-user at scipy.net
More information about the SciPy-user