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 Andrew!

    I just discovered your great free Solver. I was wondering wether my model is too big. I downloaded the ZIP file today and I get this error: Error 6: Overflow. My model has about 70,000 decicion variables.

    On the other hand, I would like to ask where to say to Premium Solver “Assume Linear Model” turned on.

    Thanks a lot Andrew!

    1. Juan: If you are happy to send us your spreadsheet, we can see what’s causing the overflow and update OpenSolver. It is a big model (and thus slow to build), but should still work. Can’t help with your Premium Solver question, sorry; I don’t use it. Andrew

      1. I am having the same overflow issue but my file is only 998 rows * 53 columns so I am not sure what could be causing this. I have probabilities from 0 – 1 that I am looking to maximize the overall sum of probabilities by placing 1 per row.

        1. Sorry it is not working. There seems to a strange large value in one of the decision variables (eg -16820558000 in cell AV901). Please clear all the decision variable values before you solve. Or, you can make the following change (from CLng to Round) in line 3 of the VBA code for CheckCurrentVariablesFeasible (or wait for our next release):

          Sub CheckCurrentVariablesFeasible(ShouldSolveRelaxation As Boolean)
          On Error GoTo errHandler

          Dim i As Long, RoundedValue As Double, bound As Double
          1 For i = 1 To NumVars
          ‘ Check value is integral if discrete
          2 If VarCategory(i) <> VarContinuous And Not ShouldSolveRelaxation Then
          ‘ If the starting value is not integer, solution is invalid.
          ‘ Otherwise round starting value to ensure feasibility
          3 RoundedValue = Round(VarInitialValue(i))
          4 If Abs(VarInitialValue(i) – RoundedValue) <= EPSILON Then 5 VarInitialValue(i) = RoundedValue 6 Else 7 GoTo Invalid 8 End If 9 End If Thanks for alerting us to this bug. Andrew

  2. Dears,

    Does it work with Excel 2003 at all? I don’t see any trace of the presumably installed OpenSolver.

    Thanks,
    Max

    1. There is no user interface written for Excel 2003. However, it should work if you call it directly from VBA. Alternatively, we would welcome you writing Excel 2003 menu code….

  3. AND also thank you for the quick response to the changes. I thought it would take several weeks for the changes to be made that’s why I haven’t checked this page until now. When I was browsing the page today, I noticed that the update was already available a few days after my comment a few months back. Thank you very much. I greatly appreciate it, though I admittedly should’ve thanked you a few months ago.

  4. Hi Andrew. Sorry for the late reply. I was hoping to use OpenSolver to balance the inputs from other nodes and outputs to other nodes of a very large network.

  5. I opened the xlam file with macros enabled and the solver button showed up on the ribbon. Then I loaded an excel spreadsheet for an LP for reservoir sizing. This LP would run in the built in solver but only in pieces since there were too many constraints and variables for the built in solver. I tried to run this LP using open solver and I’ve gotten the error message bellow every time.

    1. Jonathon: Would you be able to email me the spreadsheet to: a dot mason at auckland dot ac dot nz? Then I can have a look at the problem. Thanks, Andrew

  6. I’ve been having problems getting OpenSolver to run. Whenever I try to use it I’ve consistantly been getting an error message “OpenSolver encountered error 1004: Application-defined or object-defined error Source = OpenSolver.” Any help with this would be appreciated.

  7. I’m having trouble using OpenSolver, whenever I try to run it I get an error message, “OpenSolver eoncountered error 1004: Application-defined or object-defined error Source = OpenSolver.” Any help would be greatly appreciated.

    1. Jonathon, I think we have found the cause of the 1004 error. (It arises if you have constraints that don’t vary with the decision variables.) A new version of OpenSolver is being prepared to fix this. Andrew

  8. thanks I’ll give it a try,

    i noticed that when you click in the opensolver menu on the “online help…” option, you ‘ll endup on the old pages.

    greetz

  9. Hi there,

    tool looks awsome but it does not seems to work in office 2010?

    msgbox “OpenSolver Error: OpenSolver requires Assume Linear Model and Assume Non Negative to be turned on.”

    in 2010 i still have the option to turn nog negative on, but assume linear is not available (an option i can remember in office 2002 and 2003.

    kind regards

    vdB

    1. Thanks for your interest in OpenSolver. We have explored Office 2010, and worked out what needs to be changed. But this has not yet been incorporated in the code base, sorry. Keep an eye out for this in one of the upcoming releases. In the meantime, if you are happy in VBA, then you could try just commenting out the checks for linearity and non-negativity, and it should work. Cheers, Andrew

  10. Hi Andrew,
    I am getting the following error ( same as Joe’s);
    OpenSolver enountered error 6: Overflow
    Source = Overflow.

    I am trying to solve TSP using a multi commodity formulation. The problem instance has a total of 112 binary variables and 146 constraints. The solver that comes with the excel was able to solve it. However, when I hit the opensolver ( smiley button), I am getting the overflow error. Wondering, isn’t it the problem is too small to get an overflow error? Any help is greatly appreciated. Please let me know when the next version is going to be available and I am looking forward to use it.

    Thank you much,
    Saravanan

    1. Saravanan,
      Thanks for your post, and for your subsequent emails. I’m pleased that downloading the latest version fixed your problem. Good luck with your TSP problems.
      Andrew

  11. I’m trying to solve a minimization problem in a spreadsheet. It should change cells B5:GG192 (35344 decision variables), with constraints GH5:GH192 = GJ5:GJ192 and B193:GG193 = B195:GG195. Is this too big for OpenSolver? I encounter this error: OpenSolver encountered error 6: Overflow Source = OpenSolver.

    1. Joe. You have hit a limit caused by the number of decision variables being declared as an Integer. I will change this (and other) variables to be Long, and upload a new version.
      That’s a pretty big model you are building; OpenSolver will take some time to construct the model from the spreadsheet. You really need the (planned) next version which will parse the formulae directly to build the model much more quickly.
      What does your model do? I’m always interested in how OpenSolver is being used.
      Good luck, Andrew

    1. Hope that OpenSolver is proving useful. Pleased you found what you needed in the code; the RunSolver procedure in OpenSolverMain is probably the best to work from. Good luck, Andrew

    1. Unfortunately not, but I’m sure the CBC code will produce these. This would be a good feature to add… Andrew

  12. I’m a Mac user who is helping my wife who is a PC user. Two questions:

    1. It does not look like you need any kind of Administrator privileges to install OpenSolver, even to make it “Always Available”. Is this correct?

    2. The documentation says, under Using OpenSolver, that you need to create your model in Solver and use Solve to save it. I assume this will work even when your model far exceeds the limitations of the bundled Solver, correct? In my case, I have created a scheduling model that runs extremely fast in glpsol, and which is way too large for free Solver.

    1. Thanks for your interest. To answer your questions:
      1. OpenSolver works fine for us without administrator access on Vista.
      2. Yes, Solver (at least our version in Excel 2007) can build models larger than it can solve.

      Hope this helps. I would be interested to hear how OpenSolver works on your scheduling model. Our focus has also been on scheduling; we developed OpenSolver to solve big set partitioning models for staff scheduling.

      Andrew

Leave a Reply

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