Bug 38948

Summary: FILESAVE - Calc does not save the solver's model to files
Product: LibreOffice Reporter: Gerald Senarclens de Grancy <oss>
Component: SpreadsheetAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium CC: alexander.buchner, fabio.fagundez, oss
Version: 3.5.0 Beta2   
Hardware: All   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=32063
Whiteboard:
i915 platform: i915 features:

Description Gerald Senarclens de Grancy 2011-07-04 06:22:10 UTC
Saving a document doesn't save the conditions and changes made in the solver interface. This is an old bug known from OpenOffice: http://openoffice.org/bugzilla/show_bug.cgi?id=93613
The bug is critical because it prevents LibreOffice Calc from being used in (university) courses that rely on the solver. This is particularly sad because it prevents LibreOffice from being shown to students that will otherwise not know about it, which is certainly bad for its widespread use and acceptance.

- reproduce:
open a new file
add a simple solver model, eg.:
max 4x + 4y
s.t. 3x + 5y <= 12
x, y >= 0
save the file
close Libreoffice
open the file again with Libreoffice
click on tools->solver

- expected:
the model is still there

- actual:
the target cell is the current cell, the modifiable cells and constraints are all gone
Comment 1 Gerald Senarclens de Grancy 2011-07-14 01:55:16 UTC
I vote for changing the importance of this bug to be at least "normal" for two reasons:
- it would be critical if after entering a formula in a cell, instead of the formula, only the outcome (number) is saved to file - which is basically what happens with the solver objective and constraints.
- this particular bug prevents (business) schools/ universities from teaching Libreoffice instead of Microsoft (and has been ignored by OpenOffice for about three years).
Comment 2 TJ Meneses 2011-10-07 08:02:52 UTC
(In reply to comment #1)
> I vote for changing the importance of this bug to be at least "normal" for two
> reasons:
> - it would be critical if after entering a formula in a cell, instead of the
> formula, only the outcome (number) is saved to file - which is basically what
> happens with the solver objective and constraints.
> - this particular bug prevents (business) schools/ universities from teaching
> Libreoffice instead of Microsoft (and has been ignored by OpenOffice for about
> three years).

I second this vote. I'm a college student currently going through operations research subjects which require linear programming as part of its syllabus, and so far LO Calc has been a big help in solving cases on integer programming we're being given in class. However, the lack of a save function shocked me when I discovered that my previously lengthy model in one particular problem all but disappeared when I reopened the file at a later time.

This sounds like much more than a feature request. It's functionality that's missing, because no one in their right mind would create anything more than the most basic of LP models using Calc knowing that they would have to rebuild it EVERY SINGLE SESSION.

I read in a similar bug post (32063) that implementing it would require changing the ODF spec. I propose for the solver to simply not save the model in the same *.ods file as the spreadsheet from which it is built, but rather in a separate file. I find this to be an elegant solution, since the implementer of the language solver would use to save the data is unconstrained to pick from any of the plentiful (and open) LP languages out there, with my own preference of GAMS. It would furthermore be highly portable, meaning it could be loaded onto any other spreadsheet and run independent of the original basis of the model.
Comment 3 Björn Michaelsen 2011-12-23 12:25:16 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 4 Gerald Senarclens de Grancy 2011-12-26 05:08:57 UTC
As suggested by the automated comment above I installed
LibO-Dev_3.5.0beta2_Linux_x86-64
and unfortunately, the bug still reproduces as described in the original report - I will thus set it to NEW again (I cannot set it to CONFIRMED).

Also, I'd like to stress the importance of the issue one more time - it basically prevents business schools from using LibreOffice Calc in their courses. Simply not saving a part of the entered data such as a formula or in this case a solver model is a bug and not a lacking enhancement. Unfortunately, afaik the reason for this is that ODF 1.1 does not specify an option to store such models in the file meta data (which vastly complicates things). If anyone could tell me where to file "feature requests" against the ODF specification I'll gladly do so. Thanks.
Comment 5 Gerald Senarclens de Grancy 2012-06-15 01:42:54 UTC
*** Bug 32063 has been marked as a duplicate of this bug. ***
Comment 6 Gerald Senarclens de Grancy 2012-06-15 01:53:05 UTC
I have a question regarding the feasibility of this request. It has been argued over and over that w/ the current version of the odf specification it is not possible to store the solver's model. However, as of January 2012 OASIS has released ODF 1.2 which includes the possibility of storing meta data:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part3.html#__RefHeading__752819_826425813
Shouldn't it be possible to save/ load the model(s) to/from metadata files?
Comment 7 roberto.tavares 2012-06-15 01:58:35 UTC
I have the same problem! I want to use L.O. for teaching, but this bug really gets in the way, and I keep going back to MS Office...

(In reply to comment #2)
> (In reply to comment #1)
> > I vote for changing the importance of this bug to be at least "normal" for two
> > reasons:
> > - it would be critical if after entering a formula in a cell, instead of the
> > formula, only the outcome (number) is saved to file - which is basically what
> > happens with the solver objective and constraints.
> > - this particular bug prevents (business) schools/ universities from teaching
> > Libreoffice instead of Microsoft (and has been ignored by OpenOffice for about
> > three years).
> 
> I second this vote. I'm a college student currently going through operations
> research subjects which require linear programming as part of its syllabus, and
> so far LO Calc has been a big help in solving cases on integer programming
> we're being given in class. However, the lack of a save function shocked me
> when I discovered that my previously lengthy model in one particular problem
> all but disappeared when I reopened the file at a later time.
> 
> This sounds like much more than a feature request. It's functionality that's
> missing, because no one in their right mind would create anything more than the
> most basic of LP models using Calc knowing that they would have to rebuild it
> EVERY SINGLE SESSION.
> 
> I read in a similar bug post (32063) that implementing it would require
> changing the ODF spec. I propose for the solver to simply not save the model in
> the same *.ods file as the spreadsheet from which it is built, but rather in a
> separate file. I find this to be an elegant solution, since the implementer of
> the language solver would use to save the data is unconstrained to pick from
> any of the plentiful (and open) LP languages out there, with my own preference
> of GAMS. It would furthermore be highly portable, meaning it could be loaded
> onto any other spreadsheet and run independent of the original basis of the
> model.
Comment 8 Fabio Fagundez 2012-09-30 01:42:03 UTC
(In reply to comment #1)
> I vote for changing the importance of this bug to be at least "normal" for
> two reasons:
> - it would be critical if after entering a formula in a cell, instead of the
> formula, only the outcome (number) is saved to file - which is basically
> what happens with the solver objective and constraints.
> - this particular bug prevents (business) schools/ universities from
> teaching Libreoffice instead of Microsoft (and has been ignored by
> OpenOffice for about three years).

I second that vote. In order to be a viable option, Calc's Solver must be able to save the model with its constraints, objective function and variables.
Comment 9 Gerald Senarclens de Grancy 2014-11-25 09:17:57 UTC
The issue of not being able to save solver models is still present in 4.2.7.2. Also, it is still not possible to load models saved by Microsoft Excel. A showstopper for using LibreOffice in operations research.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.