I have been using LibreOffice Calc for linear optimization with CoinMP. However, it does not save solver settings onto the ODS file. Hence, whenever I close and reopen the file, I have to configure the solver all over again. This is a major problem when working with optimization, because the normal workflow is to create a model sheet, save it and then send to other people to load data and execute the model. But if the model is not persistent in the file, it breaks the workflow. I am submitting this as an enhancement request instead of a bug report because I think LibreOffice has not tried to implement this feature yet. But I would like to emphasize its importance, because the use of spreadsheets for optimization has become very popular in the last few years. I think this is an area where LibreOffice can be superior to all other office suites.
Solver is an extension. I'm not sure how to treat this. Asking design team for help.
(In reply to Buovjaga from comment #1) > Solver is an extension. I'm not sure how to treat this. Asking design team > for help. Actually, only the Non-Linear solver is implemented as an extension, which is installed by default. The linear solvers and the swarm solver are implemented in C++. The solvers are located in the following files: /core/hwpfilter/source/solver.cxx /core/sccomp/source/solver/LpsolveSolver.cxx /core/sccomp/source/solver/CoinMPSolver.cxx /core/sccomp/source/solver/SolverComponent.cxx /core/sccomp/source/solver/SwarmSolver.cxx What needs to be done is to save, for each sheet, the solver configurations filled in by the user, so that when the file is saved, closed, and reopened, the settings can be recovered when the user goes to Tools -> Solver again. In short, I'm proposing to implement the same method MS Excel uses to deal with solver configuration. I have a great interest in this being implemented, because I use the Solver all the time in my classes. If someone can supervise/guide me, I volunteer to implement this feature. My main concern is how to save these settings in the ODF format.
*** This bug has been marked as a duplicate of bug 38948 ***
All solvers use the same UNO API for the parameters (a solver defines which parameters it has), so you would just have to remember those parameters and save them in an ODF file. I would start with changing the UI and add the functionality, so you can use saved parameters, then save the parameters to a file into user profile folder so they survive the restart and then think about adding it into a ODS file.
> The linear solvers and the swarm solver are implemented in C++. The solvers > are located in the following files: > /core/hwpfilter/source/solver.cxx > /core/sccomp/source/solver/LpsolveSolver.cxx > /core/sccomp/source/solver/CoinMPSolver.cxx > /core/sccomp/source/solver/SolverComponent.cxx > /core/sccomp/source/solver/SwarmSolver.cxx > hwpfilter/source/solver.cxx has nothing to do with Calc solvers :)
(In reply to Tomaz Vajngerl from comment #4) > I would start with changing the UI... save the parameters to a file... We started with a three-column layout that could be useful here too. Left is a list box with a couple of pre- and user-defined options, you can add and remove. In the (large) middle column the individual attributes are listed as loaded from the preset left-hand. And, if applicable, we show a preview right-hand. The dialog has some more usability traps, like a dynamical list of attributes which spoils the scrollbar and this tiny, not resizable "Options..." dialog with a huge amount of complicated options. If these options are global it needs a different place, could be a dedicated command/dialog or a Tools > Options tab.
One way to be done is by the Export/Import button in the solver settings dialog. Most of the settings can be exported as a regular sheet. The import can be done from the same sheet. These are the common variables that need saving: targetedit m_xEdObjectiveCell aObjRange aObjective max m_xRbMax min m_xRbMin value m_xRbValue valueedit m_xEdTargetValue changeedit m_xEdVariableCells aVarRanges aVariables ref1edit m_xEdLeft1 aConstraints op1list m_xLbOp1 val1edit m_xEdRight1 ok m_xBtnSolve BtnHdl CallSolver() close m_xBtnClose BtnHdl m_xBtnResetAll