commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MATH-1230) SimplexSolver returning wrong answer from optimize
Date Tue, 09 Jun 2015 15:24:01 GMT

    [ https://issues.apache.org/jira/browse/MATH-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579068#comment-14579068
] 

Thomas Neidhart edited comment on MATH-1230 at 6/9/15 3:23 PM:
---------------------------------------------------------------

You have a typo here:

{quote}
\{ -1, 2 -6 \} 
{quote}

it should be

{code}
{-1, 2, -6}
{code}

then the solver returns the correct solution.


was (Author: tn):
You have a typo here:

{quote}
{ -1, 2 -6 } 
{quote}

it should be

{code}
{-1, 2, -6}
{code}

then the solver returns the correct solution.

> SimplexSolver returning wrong answer from optimize
> --------------------------------------------------
>
>                 Key: MATH-1230
>                 URL: https://issues.apache.org/jira/browse/MATH-1230
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.5
>            Reporter: David Kopp
>
> SimplexSolver fails for the following linear program:
> min 2x1 +15x2 +18x3
> Subject to
>   -x1 +2x2  -6x3 <=-10
>             x2  +2x3 <= 6
>    2x1      +10x3 <= 19
>     -x1  +x2       <= -2
>     x1,x2,x3 >= 0
> Solution should be
> x1 = 7
> x2 = 0
> x3 = 1/2
> Objective function = 23
> Instead, it is returning
> x1 = 9.5
> x2 = 1/8
> x3 = 0
> Objective function = 20.875
> Constraint number 1 is violated by this answer



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message