Help

Welcome to the OpenSolver on-line help.

We hope that most of your questions will be answered on the Using OpenSolver page. However, if you still have a question, please post it below.

Building  Linear Programming models

Writing optimisation models that only use linear mathematical equations and inequalities is not easy. However, most of the time you want to build these “linear programming” models (and avoid non-linear models) because these are easier and more reliable to solve using packages such as OpenSolver. (OpenSolver uses CBC by default to solve these linear programmes.) Check out this Wiki page on linear programming.

The AIMMS folks have a great online chapter describing how to take non-linear requirements (local copy of pdf) and model them using linear programming. (Thanks to Stu Mitchell of PuLP fame for pointing out this resource.) The NEOS guide is also a great resource. If you still have a modelling question (e.g., how do I express this requirement using the rules for a linear program), please ask it on https://www.or-exchange.org/.

Common Software Problems

Excel can have problems dealing with add-ons. Visit http://www.add-ins.com/how_to_repair_office.htm for a guide on fixing these.

1. OpenSolver not loading – July 2016 Office update (no error message)

In July 2016, MicroSoft released an update to Office 365 which prevents OpenSolver from loading unless the .zip file is “unblocked” before the files are extracted. (We expect this change to appear in other versions of Excel.) The symptoms are simply that OpenSolver does not appear in the Data tab; there is no error message shown. To fix this, delete your old OpenSolver files (but not the downloaded .zip file), right click the downloaded OpenSolver .zip file, choose Properties, and click the Unblock button which will show if the file is blocked. Once the file is unblock, close the properties dialog, and then un-zip the files and open up OpenSolver.xlam as usual.

2. Unable to find the external solver …

If OpenSolver reports this problem, then it could not find a solver file that comes with OpenSolver. Please check that you have extracted (i.e. un-zipped or uncompressed) all the files from the OpenSolver download.

3. The solver did not create a solution file.

If this error is reported, then it is likely that OpenSolver was unable to run the solver executable. This may happen if the OpenSolver files  are in an ‘untrusted’ location, and so Windows will not let them be run. First check whether the solver is shown as found in the “About OpenSolver” form. If not, go to the folder identified in the “About OpenSolver” form and double click on this solver file. You should then see a command window open that gives the solver name and version information etc. If you don’t see this, then Windows should give you an error message to help you diagnose the problem. It may help to move the OpenSolver folder (and all the files it contains) into a location such as your Documents, or even into Program Files, and try again.

4. Solver crashes; OpenSolver reports no solution file

The files in the “Solver” folder provided with OpenSolver contain the actual solver code. These solvers are being continually upgraded as bugs are reported and fixed. If OpenSolver reports that no solution file was generated, then the solver may have crashed. This can happen on big problems when the solver runs out of memory, but also on smaller problems that happen to hit a solver bug. In such cases, you should check if a newer version of OpenSolver is available since we regularly update the solvers included with OpenSolver as they are released.

With CBC, a typical OpenSolver error for thois problem message might be: ‘The CBC solver did not complete, but aborted with the error code -1073741510’

If needed, you can download the latest version of CBC, Bonmin or Couenne from AMPL. Download the either the Windows or Mac version as appropriate. For Windows, get the 32-bit version if you have 32-bit Windows, or the 64-bit version otherwise. (The 64 bit version will solve much larger problems than the standard 32 bit version included in OpenSolver, so always choose this if possible. Right-clicking on Computer, and choosing Properties, will tell you if have a 32 or 64 bit system type.) Right click on the downloaded .zip file, choose Properties, and click the Unblock button if there is one. Then, open the .zip file, and drag the files into the right location in your OpenSolver Solvers folder (the win32, win64 or osx folder as appropriate), replacing the existing files. This may fix your problem.

Report a CBC bug

If after installing the latest version of CBC, CBC still crashes on you, then you may wish to report a bug. Please be sure to include the .lp file produced by OpenSolver; you can open this file using “View Last Model .lp File”. CBC bugs can be reported by either:

  1. The online CBC TRAC bug reporting system (which you will have to register for), or
  2. The CBC mail list

Switch from CBC to Gurobi
Since August 2014, OpenSolver has also supported solving models using the Gurobi solver. You can obtain a copy of this solver at no charge if you are at a university. Gurobi is faster and more stable than CBC, and comes highly recommended.

5. Repairing Excel

Sometimes it is useful (if all else fails) to repair your Office installation:

Windows

See these Microsoft Office 2010 and later instructions (or in Excel 2007, use Excel’s application menu, then Excel Options, then Resources, then “run Microsoft Office Diagnostics”). You might also want to look at http://support.microsoft.com/kb/166273, which talks about this.

Mac

Unfortunately there is no easy way to repair the Office 2011 installation. The best option is to follow these instructions to completely uninstall Office. You can then install Office again from scratch to get a clean version installed.

6. ‘Can’t find project or library’ : Missing Reference Errors

OpenSolver uses the “RefEdit” control, which we need but which can cause problems because of missing references caused by version changes. To check for missing references, using the VBA editor (which you access using Alt-F11), select OpenSolver (openSolver.xlam) in the Project window, choose Tools… References, and look for a “Missing:” line. If you see this, un-check that line, close the dialog, and choose File … Save OpenSolver.xlam to update the file. If this doesn’t help, try the above steps for repairing Excel.

7. Error 70: Unable to delete the file: C:\Users\XXXXXX\AppData\Local\Temp\log1.tmp

This errors happens if Excel crashes while OpenSolver is running, leaving log1.tmp open. Please restart your computer, which will close this file, and try again.

8. OpenSolver was working on my Mac. Then I updated to Excel 16.16.7 (released late 2018) and OpenSolver stopped working. What do I do?

We have had numerous users report this issue. We are looking for a Mac user with VBA experience to help us diagnose this problem. Please contact us at email hidden; JavaScript is required if you can help.

9. OpenSolver does not work in Excel installed from the Windows Store

Windows Store versions of Office applications do not support Add-ins such as OpenSolver; see this link, or this support page for another add-in, or this technical article from Add-in Express. This Dell article explains a little more. If you have a Windows Store version, it will display this in the Excel Version information, such as in the following example:

Version 1807 (Build 10325.20082 Microsoft Store)

The solution is to un-install Excel, and install the click-to-run versions, in which case the Excel version will change from ‘Microsoft Store’ to ‘Click-to-Run’. Standard installs (meaning not Office 365) don’t have this issue.

2,138 thoughts on “Help”

  1. Hello. I have got a “strange” behaviour from a model which I am not able to understand. The model works as it is and it’s linear (I can get a good solution using COIN-OR CBC ). there is target (a cell) which needs to be minimized. I have just tried to add a further constraint on this target: the aim is still the same (minimize the cell $B$3) but obtaining a value not lower than a specif number (in $B$4). This number is higher than solution which I got without such constraint. The solver cannot find a “feasible solution”. That sounds not logic ( changing manually variables I got a solution which matches all constraints without problem). what’s wrong?

  2. I would also like to raise a different question for another model (which is read as linear): a range of constraints where I set >=0 is not obeyed and the engine (both Nomad and Coin-Or) “solves” but result presents negative values of constraints. What could be the problem here? thanks

    1. How negative are they? Small negative values are not unexpected in any solution because of numerical representations. Andrew

  3. Hello. First of all thanks for your high value tooling. I am trying to use it because of limits of standard “solver” coming with Excel, in particular because of limit of variables (200) and constraints (100).
    Now, I try to use one of my current model but I get this error:
    “the model contains references to cells on other sheets, …..” . My model is no-linear. I’ve tried all engines available (COIN, NOMAD, NEOS) but I get same error (I understand because of parsing solvers).
    All the variables and constraints are “obviously” on the same sheet. So, is there any way to manage model with more than one sheets? medium/complex model cannot be managed on one sole sheet, mainly because of number of columns available in Excel and difficulties to have a “clean” model. Thanks

    1. Sorry it is not working. Please build a one-sheet spreadsheet that shows this error (and really contains just one sheet) and send it to us to debug. Thanks. andrew

      1. For non linear models, we do not handle spreadsheets with formulae referencing more than one sheet, sorry. Nomad is an exception to this rule. Andrew

  4. I’m finding open solver is not adhering to the constraints set by the model. I have a constraint setting a range of cells (say A1:F1) set as being greater than or equal to a second range of cells (A2:F2) with the aim to minimise a target value. The solver executes and displays an approximate solution, but this solution does not strictly adhere to the constraints set. The majority of cells are greater than or equal to their counterparts, however there are some which are false (i.e. the value of 8,753 is not greater than or equal to 11,423).

    It’s as though the solver is checking an individual constraint once and then not reconfirming that all constraints are satisfied again after further tweaks to meet alternative constraints on the model.

    Frustrating, as otherwise it’s a brilliant piece of software. Any ideas?

    1. Sorry it is not working for you. Are the values very small? Is the model linear? If you view the model file after solving does it have the correct constraints? If not then please send us your spreadsheet to email hidden; JavaScript is required Andrew

      1. Never mind. Turns out my equation was indeed non-linear.

        It’s a shame because open solver is awesome and it seems that it can do a great job very close to the desired answer in most cases. The only non-linear aspect is that the values cannot be below zero, hence I’m getting errors for non-linearity for -$VALUE != $VALUE during the linearity checks.

        In this case, trying to solve for minimising price, it doesn’t hold that negative values will “give” me money I’m afraid.

        1. Being non negative is still linear, e.g. x >= 0…. I am puzzled! Our non linear solvers may be able to solve the model if the Excel cell formulae are simple. Andrew

  5. GoogleSheets add-on solver error #DIV/0 or #VALUE. The constraints I use are there to exclude just this division by zero error. The formula is simple, target cell, =B14*B13/(B12+B13); constraints: B12 and B13 both >= 0.00001.

    What is wrong?

    1. This is non-linear; OpenSolver on Google Sheets only handles linear models, sorry. Andrew

  6. I am using open eolbwr in Google sheets and with my current constraints and everything it was working fine now every time I goto solve it says at the end.
    Open solver could not find an optimal solution, and reported.

    No feasible solution was found.
    No solution was available to load into spreadsheet.

    Please can you help.

  7. Hello,

    Is any of the solvers supporting optimization of a function that involves randomness like the below exmaple. Maximize Y
    Y=51*(x^3)-157*(x^2)+3*(x)+900+RANDBETWEEN(-150,+150)

    Thanks,
    Alex

    1. Not without going into the world of stochastic optimization. However, you should think carefully what you want to minimise: the expected value, the worrst case value, some percentile…?

  8. I want to the VBA code to set open solver engine as NOMAD and uncheck the box for making unconstrained variable cells non negative

  9. Hi,

    I need to know a formula used for a variable that it is used in a model. Opensolver, as I could see, overwrites every formula after solving. Is there any way of knowing the formulas which are overwritten?

    Thank you.

  10. Hi, this is brilliant tool, but one thing is not working at google spreadsheet – when I reopen the sheet my model is missing, and when I click “import previous model” it won’t import anything, there is a blank model. How can I save my progress?

  11. Hello, does OpenSolver work with excel localized formulas? Or OpenSolver engines don’t depend on Excel localisation?

    1. It should just work for linear models. It may not with non-linear models; we have never tested it. Andrew

  12. Pingback: Vb Error 70
  13. Hi,
    I’ve been using OpenSolver for a few years but I would like to know how to get the shadow values reported or at least to have access to them to review.

  14. Hi Team Opensolver,

    My colleagues are using the add-in without any problems and are very happy with the add-in.
    However when I click on ‘Model’ to start building the model I get the error ‘Compile error: Variable not defined’. The debugger is highlighting ‘refObj.Text = “” ‘ in the Userform_activate() sub.

    Any ideas as to how I could fix this issue?

    1. Probably a refedit problem. Try repairing your Excel (and Googling this otherwise). Hope this helps. Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *