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 CBEC2F95F for ; Tue, 9 Apr 2013 06:45:07 +0000 (UTC) Received: (qmail 43285 invoked by uid 500); 9 Apr 2013 06:44:52 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 43095 invoked by uid 500); 9 Apr 2013 06:44:51 -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 43065 invoked by uid 99); 9 Apr 2013 06:44:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Apr 2013 06:44:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thomas.neidhart@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Apr 2013 06:44:44 +0000 Received: by mail-wi0-f172.google.com with SMTP id hr17so3319834wib.11 for ; Mon, 08 Apr 2013 23:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=MWeOCuNYn78j/99AWjjzKy7jzr6pcKWXonjn69bBrrs=; b=t1MM2hIwPAF2gnX5GVu2mL1pIZmqVX2PoV9IsUnf38128pHiMvznULdTmBImsQe1z4 kX+XFNy7VT+YfOev16KndqDJzpCmwxbAMSrP5MQuNyON0ZmjTjYQ9gr4LOVY3KnTWzjk CM2h8PKPNR4SyU8Q8awGX5BQb9uJ6iWi27U4/CzUZA/YCenVQTzCLwCLDDlfF1nPrHND XRkOa+FK99bThahlijqyD1RG2qSnlDRRmYL5vJuKJDH4FY7i3BbnQJbwmEjwvUlsIa6O e6HZgSLwobp0bzkGhr80nEGzyHiTUHD0qQkQ5S2gP6NTYI9xVF8gPcA3Qn+cT1tdz1o9 pfSg== X-Received: by 10.180.188.3 with SMTP id fw3mr17057096wic.33.1365489391626; Mon, 08 Apr 2013 23:36:31 -0700 (PDT) Received: from [192.168.1.2] (ip-81-11-251-209.dsl.scarlet.be. [81.11.251.209]) by mx.google.com with ESMTPS id s2sm26614554wib.4.2013.04.08.23.36.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Apr 2013 23:36:30 -0700 (PDT) Message-ID: <5163B6EC.1020900@gmail.com> Date: Tue, 09 Apr 2013 08:36:28 +0200 From: Thomas Neidhart User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: Commons Users List Subject: Re: [Math] Limitations of the SimplexSolver class? References: <645876A9-0812-4A3F-A1D2-B793F514BF8A@sehlstrom.se> In-Reply-To: <645876A9-0812-4A3F-A1D2-B793F514BF8A@sehlstrom.se> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 04/09/2013 08:23 AM, Alexander Sehlstr�m wrote: > Thomas, > > After writing the pice of code you were asking for I found the error; The max iteration exception was thrown, but swallowed by some part of my code, hence not showing up. So by increasing from maximum 100 to 1000 iterations the SimplexSolver returns a result. > > It is quite slow however and do not come near the computation time I need solving the same problem in Matlab with linprog. Suggestions of other Apache Commons Math classes that are solving the same type of problems as the SimplexSolver do are gratefully accepted. Hi Alexander, good that your example works. The reason its slow is most likely related to your problem setup. The SimplexSolver currently does not support lower/upper bounds for the variables, thus you had to create separate constraints for each variable as suggested before. This makes the calculation quite slow I guess, so we should add direct support for such bounds (similar to matlab or octave). This can be done with the original tableau (see http://homepages.rpi.edu/~mitchj/handouts/upperbounds/). It would be nice to have your example as performance test, so you could add a feature request to the issue tracker yourself. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org