Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D51A51864E for ; Thu, 7 Jan 2016 20:01:24 +0000 (UTC) Received: (qmail 46713 invoked by uid 500); 7 Jan 2016 20:01:23 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 46573 invoked by uid 500); 7 Jan 2016 20:01:23 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 46555 invoked by uid 99); 7 Jan 2016 20:01:23 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 20:01:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9663EC1041 for ; Thu, 7 Jan 2016 20:01:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=spaceroots.org Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Amu-0pZTzAKI for ; Thu, 7 Jan 2016 20:01:20 +0000 (UTC) Received: from smtp.spaceroots.org (smtp.spaceroots.org [80.67.176.229]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id CF80120515 for ; Thu, 7 Jan 2016 20:01:19 +0000 (UTC) Received: from [192.168.163.2] (lehrin.spaceroots.org [192.168.163.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.spaceroots.org (Postfix) with ESMTPSA id CD3D3540A0 for ; Thu, 7 Jan 2016 21:01:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spaceroots.org; s=mail; t=1452196869; bh=d8ekch5eRkcpexXzpgJ0vnfQz6fWNmRJem9hOM/z8wM=; h=Subject:To:References:From:Date:In-Reply-To; b=OqUe6PDueolfrFiIvjMsSXLUDWeWEY1lMWOCebK38He2o8ghMDMeHs3dWZ2FLw4J1 zOlVAld7DyHgQtl5fAjkvUmzhQhabbt0eRKeTTa/r4y30IFaMwPiAwF405uVhmittu V60TkdCbYArBa/SBe4WX8BAHZDUpkx283lvsas5g= Subject: Re: [math] Multivariate solver - constrained optimization To: Commons Users List References: From: Luc Maisonobe X-Enigmail-Draft-Status: N1110 Message-ID: <568EC3FA.4040708@spaceroots.org> Date: Thu, 7 Jan 2016 21:00:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Le 07/01/2016 16:16, Carlos M. Casas Cuadrado a écrit : > Hi all, Hi Carlos, > there is an interface for univariate solvers and several implementations of > it. Is it planned to add an interface for multivariate solvers (for zeroes > of functions R^n -> R^n i.e. a set of n multivariate functions)? No. For multivariate functions, it is often not realistic to find multidimensional zeros. One coordinate may be zero while the other is not zero. So the classical way is either to separate the variables or to use an optimizer and try to minimize the norm. If there really is a zero on all output coordinates, an optimizer for the norm should find it. > > Another issue: is it foreseen to add any method capable of optimising a > non-linear cost function with non-linear equality and inequality > constraints? Even if it's just a simple gradient method that would only > find local minima under very specific conditions... This is something we want to have since years ... Up to now, we did not implement it. There are several workarounds, but they are only workarounds, not perfect solutions. The first workaround is for simple constraints (boundary constraints, linear constraints, equality constraints). For these, instead of solving the raw problem you can wrap it in some transformation layer that will take care of the constraint and propose to the optimizer an unconstrained view of the transformed problem. As an example, if initial problem has a variable e that should remain between 0 and 1, the transformed problem will use instead a variable transformedE between minus infinity and plus infinity with a mapping function from [0;1] to (-inf; +inf), such as logit. There are also possible mappings for semi-infinite intervals. This works quite well, especially when the optimum is not at the constraint. Numerical problems arise when you come close, which obvisouly happens if the optimum is on the constraint. The second workaround is for non-linear constraints. Here, it is even more awkward. The principle in this case is to use an optimizer with a direct method (i.e. that use only function value and not derivatives), and to implement the constraint as a additive penalty on the cost (which may be linear, or finite, or even infinite depending on your problem). This is typically used with methods like Torczon's multidirectional search or CMAES. In fact, CMAES is really well suited for this kind of application, as it was designed to handle problems with a large number of local minimums and discontinuities. I have seen a presentation by CMAES inventor in Toulouse where he presented slides showing optimizations of curves looking exactly like white noise. So these are workarounds. We would love to have a real implementation of non-linear constraints optimization (KKT conditions, Lagrange multipliers, all this stuff). As always, contributions are welcome ... best regards, Luc > > Regards, > Carlos. > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org