Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 46955 invoked from network); 14 Oct 2010 18:03:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Oct 2010 18:03:44 -0000 Received: (qmail 89853 invoked by uid 500); 14 Oct 2010 18:03:43 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 89762 invoked by uid 500); 14 Oct 2010 18:03:42 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 89754 invoked by uid 99); 14 Oct 2010 18:03:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 18:03:42 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [194.206.126.239] (HELO smtp.nordnet.fr) (194.206.126.239) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 18:03:35 +0000 Received: from lehrin (11.239.146.195.dynamic.adsl.abo.nordnet.fr [195.146.239.11]) by smtp.nordnet.fr (Postfix) with ESMTP id 20BCF3411E for ; Thu, 14 Oct 2010 20:03:11 +0200 (CEST) Received: by lehrin (Postfix, from userid 5001) id 5CD104179; Thu, 14 Oct 2010 20:03:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lehrin.spaceroots.local X-Spam-Level: Received: from lehrin.spaceroots.local (lehrin.spaceroots.local [127.0.0.1]) by lehrin (Postfix) with ESMTP id 25CE64177 for ; Thu, 14 Oct 2010 20:01:52 +0200 (CEST) Message-ID: <4CB74590.1080302@free.fr> Date: Thu, 14 Oct 2010 20:01:52 +0200 From: Luc Maisonobe User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [math] SimplexTableau.java References: <142547.65954.qm@web53504.mail.re2.yahoo.com> In-Reply-To: <142547.65954.qm@web53504.mail.re2.yahoo.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Old-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,FREEMAIL_FROM autolearn=unavailable version=3.3.1 Le 12/10/2010 17:10, LEONID ILYEVSKY a �crit : > Hi, Hi Leonid, > > I have two questions. > > I was going through the SimplexTableau.java code, tried to understand every line > of it. In the dropPhase1Objective() method I was puzzled a little bit, maybe you > can explain. > You are dropping positive cost non-artificial variables, which means that some > original decision variable may be dropped in the process. However, that decision > variable may be > > still there in the main objective Z and the constraints. Or is it now > substituted by a basic artificial variable? > Also, according to the getSolution() code, I see that the dropped variable will > be assumed to have zero value. Again, I don't quite understand how that is going > to work. Do you have some explicit example that show some weird behavior ? > I would understand if in dropPhase1Objective() you would examine the positive > cost of the variable regarding the main Z objective, but you do it for the > phase1 W objective (row # 0): > > > // positive cost non-artificial variables > for (int i = getNumObjectiveFunctions(); i < getArtificialVariableOffset(); i++) > { > if (MathUtils.compareTo(tableau.getEntry(0, i), 0, epsilon) > 0) { > columnsToDrop.add(i); > } > } > > Another question. I actually need to solve the quadratic optimization, which is > done by modified simplex method. This is why I was studying the code. Are there > any plans to add it in the apache.commons.math? This would probably be a good addition to [math]. We don't currently have plans on this feature, but if you want to contribute it, you're welcome to do so. The best thing would be to discuss a bit about it on this list before to make sure everybody agree on the way it would better fit in the library. Luc > I saw a few free implementations, but each of them uses there own libraries for > basic matrix/vector math, and I would really prefer to stick with apache. So I > was thinking of doing it myself based on your current code. > > Thanks, > > Leonid > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org