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,127 thoughts on “Help”

  1. Hi, I wanted to know if OpenSolver will work on Excel for Office 365. I read that it has been tested till Excel 2016, so I just wanted to know if I should install Excel 2016 and then use OpenSolver. I currently use Excel for Office 365 on a Windows 10 device.

  2. Hello, I am doing a considerably large optimization model for a university project, whereI try to find the optimal solution based on different criteria (reduce costs, reduce time, etc.).

    The problem I’m facing is that I solve the model only minimizing cost, for which I would theoretically get the minimum cost possible (let´s say 100.000 USD). Then, I solve the model using another criteria (for example, reducing time), without modifying any parameters, and the cost that I then get is actually lower than the one calculated before (let’s say 97.000 USD).

    How can that be possible? Could it be that the model has too high tolerance / error and is not finding the actual minimum value?

    Thank you for your time,
    Jordi

    1. You may be finding a bad solution that is within the solution tolerance; try making the tolerance smaller. Andrew

  3. Hello,
    I’m running OpenSolver for google sheets. Works great, but I would like to run a sensitivity analysis. I looked up “sensitivity analysis” on the OpenSolver website, and it looks like none of the solvers mentioned are available on my version. How do I find the version/solvers of google sheets that’ll run a sensitivity analysis?

    Thanks,
    Isaiah E.

  4. Sorry it is not working; you must have a complex formula somewhere in your s/sheet. Sorry, but we need to update that message as we don’t currently have a developer who can look at such issues. Try simplifying your s/sheet. Andrew

  5. Hi. First, thank you for your work on this solver package! My issue: when I try to use OpenSolver in Excel using the ‘NEOS using Bonim solver’, I am getting the following error:

    “Error -2147220504: NEOS was unable to solve the model because there was an error while running AMPL. Please let us know and send us a copy of your spreadsheet so that we can try to fix this error.”

    Do you know how to fix this issue? It may be easiest if I send you my Excel spreadsheet. Thank you!

  6. I am curious about how the solver module can wait until the calculation of the target cell is completed, know that the calculation of the target cell is completed, and then retrieve the value of the target cell in real-time?

  7. Hi. I am getting the following error message:

    Error -2147220504: NOMAD was unable to open the specified log file for writing:

    C:\Users\DIRK\AppData\Local\Temp\OpenSolver-99C9\log1.tmp

    Any thoughts on what is going on? Thank you!

  8. Are any other OpenSolver users experiencing EXTREMELY slow running symptoms all of a sudden? Normally, my program using runs from start to finish in just under 10 minutes. Now it taking 90 minutes + for the same process. Although my program has lots of variables, it used to load them to OpenSolver in groups of 15 whereas it is loading them just three at a time. Nothing has changed with my computer, on the program, or even the data, it is just taking forever (AMD Ryzen 7 2700X, 32 GB RAM, and EXCEL 2019) in the last few days. I strongly suspect it was the latest MicroSoft update that is wrecking havoc to this. Has anyone else seen any strange behavior arise recently?

    1. Yes, further testing indicates that a recent MicroSoft update did indeed cause my problems… just in case anyone else is noticing strange behaviors from their OpenSolver models. The initial symptoms I experienced were really, really slow variable loading at greatly decreased volumes. Another odd symptom was that if more than one macro-containing workbooks was opened, closing any of these workbooks only ‘closed’ the workbook itself – all of the closed workbook’s VBA code still still remained in the VBA project window and was completely accessible. Also, at this same time, I was suddenly seeing ‘out of memory’ warnings whereas this has never occurred before – I suspect all the orphan code was causing this particular issue. After lots of testing and investigation the only solution I discovered was to go to an earlier restore point which FINALLY allowed my computer to run the project as before.

      1. Thanks for your work exploring this. It would be great if you wanted to report this to Microsoft…. it seems a pretty major issue. Andrew

  9. Hi,

    Thank you very much for such a useful plugin. However, when I try to build and solve a model with the solver, I get a “Subscript out of range” error. There are no details as to where the error originated. How can I solve it?

    1. You are using the non-linear solvers, which are still experimental. Sorry, but the code does not give a helpful error at the moment. It is probably a formula that we don’t recognise. Try something simple to start with. Andrew

  10. Last update of opensolver for Spreadsheet is not usable :
    – at each change it’s forget about objective cell, variables cells
    – can not put a binary constraint on a variable cell (get a message saying that my cell is not a variable)

    1. We have not made any changes, so any new issues are probably the result of Google making changes. In our experience, Google tends to spot these problems and then fix them. Sorry I can’t be more helpful. Andrew

  11. Hello I am very interested in using OpenSolver, but I would like to know if anyone has quantitatively tested OpenSolver vs. Frontline’s Standard Solver. How does OpenSolver compare to Frontline’s Standard solver in terms of speed and accuracy (especially the non-linear optimization engines)?

    Further, is there someone who can provide consulting and even setup a test and compare for me? Or modify my spreadsheet to pull in or call the OpenSourceSolver instead of Excel’s Solver in VBA?

    I’m looking for a resource who can help who is knowledgeable about non-linear optimization and the various engines to best solve them in a timely manner and accurate manner.

  12. Installed OS 2.9.0 Advanced. Getting a stacks error message with each of the non-linear engines.

    With the NEOS engines I’m getting an error that it can’t upload.

    Any suggestions?

    Thanks in advance.

  13. I am examining the ‘View Last Model File’ and came across a question. Using the EXCEL ‘len’ function, I see that there are currently nine cells in this worksheet that contain 32,759 characters. It also appears that if this apparent maximum character length is encountered, subsequent rows following this will capture any additional characters.

    For example, there are two areas named ‘MINIMIZE’ and ‘BINARY’ within the ‘View Last Model File’ worksheet. Below each of these have multiple rows that have 32,759 characters in column ‘A’ for my particular model. The questionable issue that I am seeing is that sometimes the last value of cell reference is incorrectly truncated… ie, the last three binary cell references in cell A10785 are ‘OF4867 OF4868 OF486’ – the last value is missing its last digit (it should be ‘OF4869’). The next row, A10785, picks up to the next binary references of ‘ OF4870 OF4871 OF4872’ and so on (note that this next row begins with a space). The problem is that the binary cell reference of ‘OF4869’ value has not been included and apparently the ‘OF486’ may have been included twice.

    Yes, my model is large and has lots of changeable variables including both binary and integer values. I get a nice solution; however, I am concerned that a few of the references are being possibly overlooked. I would be happy to send the ‘View Last Model File’ for this model.

    1. Thanks for your comment. Have you looked at the file using a text editor like Notepad++? Excel may do strange things when it opens the file, but it should still work OK when CBC reads it. Andrew

      1. Thanks Dr. Mason! I just took a look at the file in Notepad and ALL is there. Crisis averted… well, OpenSolver was doing exactly what it is supposed to do so there never was a crisis.

    1. NM. I had the wrong version.

      What are the files called that are uploading to NEOS? Uploading isn’t working, so I thought I’d try sending them manually.

      Thanks.

Leave a Reply to Andrew Mason (Team OpenSolver) Cancel reply

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