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

  1. HELP!
    Used OpenSolver several years ago with no problems – a slick application.
    Present problem may be Windows 10 OneDrive issue.
    I am not using OneDrive and have uninstalled it. Solver files are in my Documents on my PC in a folder named OpenSolver, not on OneDrive, yet error message indicates that OpenSlover is looking in OneDrive for files.
    Any suggestions would be greatly appreciated.
    Please insert any other information you think might be relevant here.
    You may want to paste in the content of the solver log file, which you can open by going to the OpenSolver menu.
    ———- Error log follows ———-
    29 Dec 20 09:53:52 [OpenSolver.xlam] OpenSolverStoredNames.SetAnyMissingDefaultExcel2007SolverOptions: Line 8
    29 Dec 20 09:53:52 [OpenSolver.xlam] FModel.UserForm_Activate: Line 11
    Error 1004: The syntax of this name isn’t correct.
    Verify that the name:
    -Starts with a letter or underscore (_)
    -Doesn’t include a space or character that isn’t allowed
    -Doesn’t conflict with an existing name in the workbook.
    OpenSolver version 2.9.0 (2017.11.10); Distribution=Linear
    Location: “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\OpenSolver.xlam”
    Excel 16.0; build 13426; 64-bit; VBA7
    Excel product code = {90160000-000F-0000-1000-0000000FF1CE}
    Excel language: English – US
    OS: Windows 10.0; 64-bit
    Username: John
    CBC v2.9.4 (64-bit) at “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64\cbc.exe”
    No Gurobi installation was detected. The value of %GUROBI_HOME% was not set.
    Unable to find Bonmin (‘bonmin.exe’). Folders searched:
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64”
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win32”
    Unable to find Couenne (‘couenne.exe’). Folders searched:
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64”
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win32”
    Unable to find NOMAD (‘OpenSolverNomad.dll’). Folders searched:
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64”

    29 Dec 20 09:54:45 [OpenSolver.xlam] OpenSolverStoredNames.SetAnyMissingDefaultExcel2007SolverOptions: Line 8
    29 Dec 20 09:54:45 [OpenSolver.xlam] FModel.UserForm_Activate: Line 11
    Error 1004: The syntax of this name isn’t correct.
    Verify that the name:
    -Starts with a letter or underscore (_)
    -Doesn’t include a space or character that isn’t allowed
    -Doesn’t conflict with an existing name in the workbook.
    OpenSolver version 2.9.0 (2017.11.10); Distribution=Linear
    Location: “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\OpenSolver.xlam”
    Excel 16.0; build 13426; 64-bit; VBA7
    Excel product code = {90160000-000F-0000-1000-0000000FF1CE}
    Excel language: English – US
    OS: Windows 10.0; 64-bit
    Username: John
    CBC v2.9.4 (64-bit) at “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64\cbc.exe”
    No Gurobi installation was detected. The value of %GUROBI_HOME% was not set.
    Unable to find Bonmin (‘bonmin.exe’). Folders searched:
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64”
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win32”
    Unable to find Couenne (‘couenne.exe’). Folders searched:
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64”
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win32”
    Unable to find NOMAD (‘OpenSolverNomad.dll’). Folders searched:
    “C:\Users\jhamm\OneDrive\Documents\OpenSolver\OpenSolver2.9.0_LinearWin\Solvers\win64”

    1. Hi there John,

      Thanks for your detailed error message. Including the error log is very helpful for us when trying to assist people with OpenSolver.
      Based on the content of the error message, it seems you may be including special/non-alphanumeric characters in your spreadsheet name.
      If this is the case, you could either try removing non-alphanumeric characters from the sheet name or you could try our new v2.9.4 beta release, which has greatly enhanced support for special and non-alphanumeric characters.

      As to the OneDrive issue, it seems that if you’ve moved OpenSolver into ‘Documents’ on your PC, ‘Documents’ is by default a subdirectory of the OneDrive directory, so will still be tracked by OneDrive. If you’d prefer that OpenSolver not be tracked by OneDrive, you could move your installation of OpenSolver from ‘Documents’ into a directory outside OneDrive e.g.: into the directory ‘C:\Users\jhamm’.

      Hope this helps,
      Taiji.

  2. Hi there,
    I added Opensolver from Google Marketplace to my account a couple of years ago, and it was working just fine. Now that add-in does not work and I cannot open the sidebar. I receive an error, declaring that the application tries to access sensitive information, and that Google blocks it. Could you please advice?
    Regards,
    ilker

    1. OpenSolver for Google Sheets is currently unavailable because of issues with changes made by Google that we are working through. We don’t access sensitive information but for some reason the Google checker is flagging this to users (but not on our dashboard). Sorry about this, Andrew

  3. I need to minimize the variance of a financial portfolio. This classical (non-linear) problem requires to calculate a quadratic form of the type x’*V*x, where x=vector of portfolio percentages, V=variance-covariance matrix. In Excel this can be calculated with the following matrix functions:
    mmult(mtranspose(x);mmult(V;x)) or alternatively
    sumproduct(x;mmult(V;x))
    The problem is that both engines COIN-OR Couenne and Bonmin stop with the error:
    “unknown function transpose” or “unknown function mmult”.
    Any workaround?
    Thanks a lot.

  4. Hi all, very interesting site!! I have a question, because I’m not so expert in all these tools. I have a huge excel with many formulas (few thousands of variables), in some cells (as variables) we have some binary entries and some integer , on other different cells calculated through excel formulas and on the variables we have the constraints. Most of the excel functions are not linear (“IF”, etc.). I tried to use bonmin and couenne but I have problems with the parsing. I changed many formulas (avoiding volatiles) and it went on and stopped again and finally I realize that also “IF” with arguments is a problem and I have many of them. Have you any suggestion for me to use the Opensolver? Thanks a lot!! Michele

  5. This is a great tool, thanks and congrats, I appreciate a lot your work.

    I am using OpenSolver (the advanced version 2.9.0) with BONMIN in two computers that run Win10, and have the same version of Excel installed (365, 16.0.13328.20408, 64 bit). I open the .xlam file first and then open my excel file with the model.
    In one computer the model runs fine and it can be triggered from a sub without issues. In the other computer the model cannot be run from a sub (when the macro is triggered it changes a few cells but not much else, and sometimes after a while it spits error 400). When running Opensolver from the interface, the first time it runs, it runs fine, but the second time it spits the error: “opensolver encountered an error : subscript out of range” There is not much information in “more details” just that it is runtime error 9. Also, sometimes when running Opensolver from the interface, it gives a message to check for updates and often after this it spits the error mentioned above.
    I have unblocked the .zip, I have copied the opensolver files to the Excel addin folder, and I have repaired by Excel installation without success. Any other suggestions to try? Any help is highly appreciated.

    1. Thanks for your question. You are, I think, encountered what we think is a bug in Excel. Another of our users tracked this down to a timing quirk, which we addressed (we hope) in the beta 2.9.3 release you can download. Please try this, and let us know. Andrew

      1. Thanks for the prompt reply.
        With version 2.9.3 it now runs smoothly from the interface!, thanks. However, the macro still doesn’t work. I am using the one suggested in another section of this website:
        Sub DoRunOpenSolver()
        ‘ Run OpenSolver assuming it has been opened (but without requiring a reference to OpenSolver). Ask the user to open OpenSolver if it is not currently open.
        Dim resultOpt As Long
        On Error GoTo errHandler_NoOpenSolver
        resultOpt = Application.Run(“OpenSolver.xlam!RunOpenSolver”)
        On Error GoTo errHandler
        ‘ if result 0 then … ‘ Something went wrong; not optimal
        ‘ if result = 5 then … ‘ infeasible
        Exit Sub
        errHandler:
        Err.Raise Err.Number, Err.Source, Err.Description, Err.HelpFile, Err.HelpContext
        errHandler_NoOpenSolver:
        Err.Clear
        MsgBox “This workbook requires OpenSolver Advanced (non-linear), a free Excel addin available at https://opensolver.org/installing-opensolver/” + vbCrLf + vbCrLf + “Please download, unpack, open OpenSolver.xlam, open the Excel sheet and then try again.”, vbOKOnly, “OpenSolver”
        End Sub

      2. Sorry, my bad, the macro button for some reason got reset. Everything is working as intended with v 2.9.3. Thanks again .

  6. I am using window Excel 2016. After installed OpenSolver and follow every single steps you guided, I did still can not see the OpenSolver-Model icon. It just only shows
    ?->Solver

  7. How many decision variables can OpenSolver handle? How many can it handle if i use the gurobi engine?

    I need to handle ~180.000 decision variables in an MIP problem.
    Either using my laptop I7-101610U @ 1.8GHz 4 cores with 32 gb ram.
    Or using a cloud computing solution with 64 cores and 512gb ram.

    Would either of those options suffice?
    Or can OpenSolver simply not handle that many decision variables?

    1. There are much better tools for such a problem than OpenSolver. I personally would use Julia and JuMP, but Python and PuLP might also work. SolverStudio (http://solverstudio.org) might be able to handle such a model if the data is compact. Ignoring how hard the problem is to solve, OpenSolver will take a very long time to just extract the model; that’s the step that SolverStudio can bypass, at the cost of more work by you. Can I ask what the problem is for? Andrew

  8. Hi, are there any good ways to improve solve times? Also, does adding or subtracting constraints improve solve times?

    Thanks,
    Nathan

    1. Having lots of integer variables tends to make problems slow to solve. Reducing constraints can help. The study of when problems are hard is a complicated one… people work hard to change the maths they use to make the problems easier to solve. You can try searching for “strong formulations”. Cheers, Andrew

  9. Hey!
    “An unexpected error occurred in solver or memory exhausted ” . I got this when I tried 150k+ decision variables and 150k+ constraints.

  10. Hi,

    I have successfully installed the academic version of Gurbobi solver on my system. But when I try to run it using OpenSolver, I get the following error:
    ‘No Gurobi installation was detected. The following file was not found: “C:/gurobi903/win64/python27/bin/python.exe” ‘

    I had a look at the Gurobi installation directory and found that I had “python.exe” in “C:/gurobi903/win64/python37/bin/” directory instead.

    Why is opensolver looking into the wrong directory? and how to fix this?

    Any help will be appreciated.

    Thanks!

    1. Please use the latest beta version of OpenSolver; that updates OpenSolver for Gurobi changes. Andrew

  11. Hi,

    I have successfully installed the academic version of Gurbobi solver on my system. But when I try to run it using OpenSolver, I get the following error:
    ‘No Gurobi installation was detected. The following file was not found: “C:/gurobi903/win64/python27/bin/python.exe” ‘

    I had a look at the Gurobi installation directory and found that I had “python.exe” in “C:/gurobi903/win64/python27/bin/” directory instead since python37″ instead.

    Why is opensolver looking into the wrong directory? and how to fix this?

    Any help will be appreciated.

    Thanks!

    1. Please use the latest beta version of OpenSolver; this version updates OpenSolver for Gurobi changes. Andrew

  12. Hi Andrew,

    I don’t believe I have seen this model file (the .lp) of which you speak. Do I need to download OpenSolver differently in order to find it?

  13. I am attempting to use OpenSolver to create two parallel test forms but running into one issue with which I hope you can help me.

    I have the overlap constraint set to 1 for each test question and uses “<=" in the model interface when setting up the constraints. But I have some test questions that are still being loaded onto both test forms. I just want each question to load onto one form. How can I fix this? I really hope to hear from you. Thank you very much.

    1. I suggest you look carefully at the model file (the .lp) to find your modelling mistake. Good luck, Andrew

      1. Hi Andrew,

        Do you know where I can find exercises/lessons on using OpenSolver? I have to create a lesson showing the difference between Excel Solver and Open-Solver for Excel. I can’t find anything solid online that comes with a data file and instructions. Any help is appreciated. my email is.

        Andre

        1. Andre: The main differences between Solver and OpenSolver are the range of solvers they offer, OpenSolver’s visualisation, a different Model dialog, and the suite of built-in examples included in the latest OpenSolver beta release. OpenSolver also offers ‘parsing’ solvers which extract equations dirrectly from the formulae cells in the spreadsheet. OpenSolver also has no artificual limit on maximum problem size. Hope this helps, Andrew

  14. I am running OpenSolver 2.9.0_LinearWin. I am trying to find the optimal NPV for a 50×3 variable cell array where rows are companies and columns are Invest, Buy or Sell decisions (can pick only one). When run the solver, I get following error(s):
    OpenSolver could not find optimal solution and reported:
    i) No solution found (unbounded)
    ii) No solution was available to load into the spreadsheet

    Can you please suggest what I should be doing. I tried to reduce array to 10×3, but get same error.

    1. Unbounded means it could make unlimited profit, perhaps by buying negative amounts of something and very positive amounts of something else? I suggest you check your model. Andrew

Leave a Reply to Chamnab Nhel Cancel reply

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