Ask Your Question
1

Is there any way to save a solver model in Calc? [closed]

asked 2012-10-07 05:18:19 +0200

TJ Meneses gravatar image

updated 2015-10-24 19:04:21 +0200

Alex Kemp gravatar image

The single most irritating aspect of the LP feature in Calc is its inability to save the model that I built. Specifically, data on the cells used as the objective function, constraints and variables is lost when the spreadsheet is reloaded.

I've known this problem for a while now, and know that there won't be any straightforward way of saving the model, either through the extension options or Calc's save function. All I want to know is if there's any sane way to store the model in any sort of persistent data such that, upon restart, opening the model will result in the cells previously input to still be there. My first guess is through macros, but I'm both clueless on the basics of macro building as well as dubious that its functionality can extend to extensions.

If anyone could give me not only a simple yes/no answer, but also a step-by-step procedure for saving and restoring model data in a spreadsheet, I'd be incredibly grateful. (And I'd label you as the answer and +1 you.)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-24 19:05:11.387489

4 Answers

Sort by » oldest newest most voted
2

answered 2013-02-27 15:45:42 +0200

santa gravatar image

As TJ Meneses knows, a bug for this has been filed years ago against OpenOffice.org. The same bug for LibreOffice was also filed in mid 2011 but doesn't get any love.

Unfortunately, I cannot provide a way of circumventing the bug inside LibreOffice. I still use Calc for my courses if they don't require a linear solver. For the rest, the sole solution I found was to use other tools.

Gnumeric serves rather nicely and is free software. Using a dedicated linear solver like lpsolve, glpk or coin OR is another alternative. Finally, if closed source is an option, Excel does the job quite well and can nowadays also be installed comfortably in Linux environments using frontends for wine like playonlinux.

edit flag offensive delete link more

Comments

Hm, how's the linear solver of Gnumeric compared to Calc? I might decide to work with it if ever I do need to work with LP models.

TJ Meneses gravatar imageTJ Meneses ( 2013-02-27 16:48:53 +0200 )edit
1

answered 2012-10-07 08:37:49 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I think what you want to do is not possible because no Calc doesn't know where to put the figures. You have for each scenario several parameters. Therefore you need to create a table to store results of various scenarios. By having a separate table you also can compare the different scenarios you created.

In the case of Goal Seak the simulated cell is identified and Calc knows where to put the figures.

edit flag offensive delete link more
0

answered 2013-02-25 05:23:07 +0200

qubit gravatar image

Hi @TJ Meneses,

It sounds like @ROSt52 understands this situation better than I, so I don't have much to add to his advice about how to save the state of your solver model in Calc.

If you believe that there's an alternate way to save this data in the document, please feel free to file an enhancement bug and provide as much information about how the data should be saved. Don't forget to mark your bug as an 'enhancement'. The QA team will be happy to help you triage your feature request in the bugtracker.

Please post a link to any bugs you file in a comment below using the format "fdo#123456".

Thanks!

edit flag offensive delete link more

Comments

Actually, I have absolutely no idea how it might possibly be implemented. =P Although, the OP of the bug report in @santa's link suggested a possible way of doing it using ODF 1.2: https://bugs.freedesktop.org/show_bug.cgi?id=38948#c6

TJ Meneses gravatar imageTJ Meneses ( 2013-02-27 16:51:22 +0200 )edit

@TJ Meneses -- Ah, yes, the comments on that bug definitely help me to understand the problem and how the possible solution might work.

I guess you'll want to keep an eye on fdo#38948 and see if the feature is added soon :-)

qubit gravatar imagequbit ( 2013-02-27 17:01:50 +0200 )edit
0

answered 2013-02-28 02:50:45 +0200

ROSt52 gravatar image

I just tried to make a test using the "solver" and not "goal seek". However I got the message that my Java JRE is not the right one....

A possible workaround could be a screen shot - also it is not a good one.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-10-07 05:18:19 +0200

Seen: 2,561 times

Last updated: Feb 28 '13