Created attachment 154900 [details] issue_solver.ods Please open the attached spreadsheet. It contains all steps... Version: 6.3.2.2 Build-ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c CPU-Threads: 8; BS: Linux 4.4; UI-Render: Standard; VCL: gtk2; Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE Calc: threaded
Yep, as described Version: 6.1.6.3 Build ID: 6.1.6.3-4.fc29 CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: kde4; Locale: en-US (en_US.UTF-8); Calc: group threaded
@Katarina: Thanks for confirming. I think a patch should NOT be very complicated...
The bug still exists. I have track it to two possible reasons: m_success = (m_objectiveCell.getError() == 0 && checkConstraints()); The model has no constraints. It seems that some fake error appears in the objective cell.
Created attachment 174132 [details] Test file with missing values in the constraints range.
Created attachment 174133 [details] Test setup screen 1.
Created attachment 174134 [details] Test setup screen 2.
Created attachment 174135 [details] Test setup screen 3.
Created attachment 174136 [details] Test setup screen 4.
Created attachment 174137 [details] Test setup screen 5.
Created attachment 174138 [details] Test setup screen 6.
Created attachment 174139 [details] Test setup screen 7.
Created attachment 174140 [details] Test setup screen 8.
Created attachment 174141 [details] Test setup screen 9.
I have checked the functions calls and the problem comes from the fact that the exact value is searched. https://github.com/LibreOffice/core/blob/2484de6728bd11bb7949003d112f1ece2223c7a1/sc/source/ui/miscdlgs/optsolver.cxx#L966 The equality target is converted to extra constraint, which gives not found solution after that. if ( m_xRbValue->get_active() ) { // handle "value of" with an additional constraint (and then minimize) sheet::SolverConstraint aConstraint; aConstraint.Left = aObjective; aConstraint.Operator = sheet::SolverConstraintOperator_EQUAL; OUString aValStr = m_xEdTargetValue->GetText(); ScRange aRightRange; if ( ParseRef( aRightRange, aValStr, false ) ) aConstraint.Right <<= table::CellAddress( aRightRange.aStart.Tab(), aRightRange.aStart.Col(), aRightRange.aStart.Row() ); else { sal_uInt32 nFormat = 0; //! explicit language? double fValue = 0.0; if ( mrDoc.GetFormatTable()->IsNumberFormat( aValStr, nFormat, fValue ) ) aConstraint.Right <<= fValue; else { ShowError( false, m_xEdTargetValue.get() ); return false; } } aConstraints.realloc( nConstrPos + 1 ); aConstraints[nConstrPos++] = aConstraint; } The problem does not exists if target is converted to minimization of absolute difference.
Created attachment 175778 [details] Minimization of absolute difference.
Dear OfficeUser, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
The bug is still there. Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 73229b441f0f0aa6ab4e3ae051f9d09f683361fc CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: CL threaded