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

Gilles Sadowski commented on MATH-1549:
---------------------------------------

Thanks for the report.
Test added in [commit 
4108f5f35e22db3401a11fbbf93f85be21394f5c|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=commit;h=4108f5f35e22db3401a11fbbf93f85be21394f5c].
By adapting the test to figure out when the bug shows up, it appeared that a 
different type of exception is raised for smaller values of the scaling factor.

Help is welcome in order to determine the cause of the issue. 
It seems it could be a usage issue: Can the argument to the {{SimplexSolver}} 
instance remain the same, whatever the scale of the numbers involved in the 
definition of the problem to solve?
The bug could then be in the code or in the failing to document some limitation 
of the algorithm (e.g. due to floating-point inaccuracies in parts of the 
computation).


> Simplex solver report unbounded solution when solvable constraints scaling up
> -----------------------------------------------------------------------------
>
>                 Key: MATH-1549
>                 URL: https://issues.apache.org/jira/browse/MATH-1549
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.6.1
>         Environment: macOS catalina
>            Reporter: Fan Zhang
>            Priority: Major
>         Attachments: CommonsMathSimplexSolverTest.java
>
>
> *scenario 1:*
> {code:java}
> min: x + y
> x, y >= 0
> 9000x + y >= 0
> 10000x + y >= 2000
> x >= 2{code}
> *scenario 2:*
> {code:java}
> min: x + y
> x, y >= 0
> 9.0E15x + 1.0E12y >= 0
> 1.1e16x + 1.0e12y >= 2.0e15
> 1.0e12x >= 2e12{code}
> for scenario 1, it works out. but for scenario 2 whose constrains are just 
> scaled up by 1e12, the solver reports unbounded solution.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to