You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michał Skrzypczak (Created JIRA)" <ji...@apache.org> on 2011/11/25 17:35:39 UTC
[jira] [Created] (MATH-713) Negative value with restrictNonNegative
Negative value with restrictNonNegative
---------------------------------------
Key: MATH-713
URL: https://issues.apache.org/jira/browse/MATH-713
Project: Commons Math
Issue Type: Bug
Affects Versions: 2.2
Environment: commons-math-2.2
Reporter: Michał Skrzypczak
Problem: commons-math-2.2 SimplexSolver.
A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);
Function
1 * x + 1 * y + 0
Constraints:
1 * x + 0 * y = 1
Result:
x = 1; y = -1;
Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (MATH-713) Negative value with
restrictNonNegative
Posted by "Luc Maisonobe (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157713#comment-13157713 ]
Luc Maisonobe edited comment on MATH-713 at 11/27/11 9:29 AM:
--------------------------------------------------------------
Could you please check this against the latest development version from the subversion repository ?
There have been several fixes concerning these coefficients in simplex solver since 2.2
was (Author: luc):
Could you please check this agains the latest development version from the subversion repository ?
There have been several fixes concerning these coefficients in simplex solver since 2.2
> Negative value with restrictNonNegative
> ---------------------------------------
>
> Key: MATH-713
> URL: https://issues.apache.org/jira/browse/MATH-713
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: commons-math-2.2
> Reporter: Michał Skrzypczak
> Labels: nonnegative, simplex, solver
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> Problem: commons-math-2.2 SimplexSolver.
> A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
> SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);
> Function
> 1 * x + 1 * y + 0
> Constraints:
> 1 * x + 0 * y = 1
> Result:
> x = 1; y = -1;
> Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-713) Negative value with
restrictNonNegative
Posted by "Michał Skrzypczak (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13158340#comment-13158340 ]
Michał Skrzypczak commented on MATH-713:
----------------------------------------
I'm quite busy at work now... When I'll find some time, I'll try to test it. Of course I'd be glad if one of developers would do it before :)
> Negative value with restrictNonNegative
> ---------------------------------------
>
> Key: MATH-713
> URL: https://issues.apache.org/jira/browse/MATH-713
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: commons-math-2.2
> Reporter: Michał Skrzypczak
> Labels: nonnegative, simplex, solver
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> Problem: commons-math-2.2 SimplexSolver.
> A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
> SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);
> Function
> 1 * x + 1 * y + 0
> Constraints:
> 1 * x + 0 * y = 1
> Result:
> x = 1; y = -1;
> Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (MATH-713) Negative value with
restrictNonNegative
Posted by "Luc Maisonobe (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luc Maisonobe resolved MATH-713.
--------------------------------
Resolution: Fixed
Fix Version/s: 3.0
Fixed in subversion repository as of r1207566.
Patch applied directly.
Thanks to Michal for the report and thanks to Thomas for the patch.
> Negative value with restrictNonNegative
> ---------------------------------------
>
> Key: MATH-713
> URL: https://issues.apache.org/jira/browse/MATH-713
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: commons-math-2.2
> Reporter: Michał Skrzypczak
> Labels: nonnegative, simplex, solver
> Fix For: 3.0
>
> Attachments: MATH-713.patch
>
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> Problem: commons-math-2.2 SimplexSolver.
> A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
> SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);
> Function
> 1 * x + 1 * y + 0
> Constraints:
> 1 * x + 0 * y = 1
> Result:
> x = 1; y = -1;
> Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-713) Negative value with
restrictNonNegative
Posted by "Luc Maisonobe (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157713#comment-13157713 ]
Luc Maisonobe commented on MATH-713:
------------------------------------
Could you please check this agains the latest development version from the subversion repository ?
There have been several fixes concerning these coefficients in simplex solver since 2.2
> Negative value with restrictNonNegative
> ---------------------------------------
>
> Key: MATH-713
> URL: https://issues.apache.org/jira/browse/MATH-713
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: commons-math-2.2
> Reporter: Michał Skrzypczak
> Labels: nonnegative, simplex, solver
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> Problem: commons-math-2.2 SimplexSolver.
> A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
> SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);
> Function
> 1 * x + 1 * y + 0
> Constraints:
> 1 * x + 0 * y = 1
> Result:
> x = 1; y = -1;
> Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-713) Negative value with restrictNonNegative
Posted by "Thomas Neidhart (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Neidhart updated MATH-713:
---------------------------------
Attachment: MATH-713.patch
I have tested this problem with the latest trunk, and the problem still remains.
The attached patch handles the case of unconstrained variables that still occur in the objective function. I have also added a unit test.
> Negative value with restrictNonNegative
> ---------------------------------------
>
> Key: MATH-713
> URL: https://issues.apache.org/jira/browse/MATH-713
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: commons-math-2.2
> Reporter: Michał Skrzypczak
> Labels: nonnegative, simplex, solver
> Attachments: MATH-713.patch
>
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> Problem: commons-math-2.2 SimplexSolver.
> A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
> SimplexSolver.optimize(function, constraints, GoalType.MINIMIZE, true);
> Function
> 1 * x + 1 * y + 0
> Constraints:
> 1 * x + 0 * y = 1
> Result:
> x = 1; y = -1;
> Probably variables with 0 coefficients are omitted at some point of computation and because of that the restrictions do not affect their values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira