[
https://issues.apache.org/jira/browse/MATH-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17160875#comment-17160875
]
Mohammad Rezaei commented on MATH-1549:
---------------------------------------
(Sorry, I didn't realize Github was not part of your workflow). Can we discuss
the changes here?
I replied on MATH-1550.
Let me explain the rationale for the placing of the code changes:
I initially tried to just deal with LinearConstraint. It was difficult and
ultimately futile because we also need the objective coefficients. The whole
setup with constraints is very copy heavy. On typical usage, this happens:
# Application code create a double array for each constraint.
# The constraint copies that array in to a vector. (My personal impression is
that these vectors are hard to work with.)
# The tableau setup code copies the vector back out into an array.
# The tableau then copies the array into its own matrix (another array).
So I figured I'd rather not add another copy into that. Many realistic problems
have 1000's even 100's of thousands of variables and copying all this stuff
around is not good for anything.
I chose to insert the work between steps 3 and 4 for two reasons:
a. I had all the data I needed (all constraints and the objective coefficients)
in one place.
b. I could do the work without an extra copy.
I'm not quite sure how you see SimplexTableau changing. If there is anything I
can do to the PR to make it acceptable, I'll be happy to do it.
> 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
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> *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)