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. The objective cell appears to contain an error (eg #DIV/0! or #VALUE!). This could have occurred if there is a divide by zero error or if you have used the wrong function. Please fix this and try again.

    I obtain this error when the objetive cel has a division. so when OpenSolver puts Zero on variable cells the objetive cells takes #DIV

  2. Dear developers,

    First of all, I would like to thank you for your contribution in building such a useful program. It really helpes me a lot for my Master study. However, I started to use Gurobi as the solving tool then this happened. I am not sure what causes this problem. Please advice, thank you so much.

    122 Aug 18 11:44:26 [OpenSolver.xlam] SolverCommon.RunLocalSolver: Line 7
    22 Aug 18 11:44:26 [OpenSolver.xlam] SolverCommon.SolveModel: Line 44
    22 Aug 18 11:44:26 [OpenSolver.xlam] OpenSolverAPI.RunOpenSolver: Line 11

    Error -2147220504: The Gurobi solver did not complete, but aborted with the error code 1.

    The last log file can be viewed under the OpenSolver menu and may give you more information on what caused this error.

    Solver: Gurobi

    OpenSolver version 2.8.6 (2017.03.06); Distribution=Advanced
    Location: “D:\OpenSolver2.8.6_AdvancedWin\OpenSolver.xlam”

    Excel 15.0; build 4420; 32-bit; VBA7
    Excel product code = {91150000-0011-0000-0000-0000000FF1CE}
    Excel language: English – US
    OS: Windows 6.2; 64-bit
    Username: USER

    CBC v2.9.4 (64-bit) at “D:\OpenSolver2.8.6_AdvancedWin\Solvers\win64\cbc.exe”

    Gurobi v7.5.2 (64-bit) at “D:\program\Gurobi\win64\bin\gurobi_cl.exe”

    Bonmin v1.8.4 (64-bit) at “D:\OpenSolver2.8.6_AdvancedWin\Solvers\win64\bonmin.exe”

    Couenne v0.5.6 (64-bit) at “D:\OpenSolver2.8.6_AdvancedWin\Solvers\win64\couenne.exe”

    NOMAD v3.7.1 (32-bit) using OpenSolverNomad v1.3.1 at “D:\OpenSolver2.8.6_AdvancedWin\Solvers\win32\OpenSolverNomad.dll”

    1. Dear Pavinee,

      I would like to know that you have any solution for this error? Cause I got the same error. Please let me know if you have a solution. Thank you so much.

  3. I’m attempting to install OpenSolver for the first time and have run into a hiccup. Any time I right click on the zip file, I am prompted by a message stating that my security settings have blocked these files from being opened and if I want to open them anyway. I select yes and click properties where I find no “unblock” option, so I extracted the files and attempted to launch opensolver.xlam. At this point, excel attempts to launch, but never finishes and simpy stays stuck on a blank screen without a worksheet visible.
    I’ve tried repairing Excel, but the problem persists.

  4. Hello,

    I’m using the OpenSolver add on for Google Sheets and am running into an issue. I set up the model, run it successful and obtain a solution; however, if I exit the browser and reopen the file and OpenSolver add on, the model variables, constraints, objective, etc. are gone. This means I have to re-set up the model each time I want to run it, which is very time intensive.

    Is there any way to fix this so that my parameters stay within the Open Solver sidebar? I haven’t had this issue when using Open Solver with Excel.

    1. The model should be saved. Can I ask the community if anyone else has seen this behaviour?

  5. Hi Andrew,

    About my previous comment, setting the objective to maximize or minimize while setting a constraint on the variable to be integer and positive numbers works fine, but changing to any target number will ignore any of the constraints and give variables with impossible numbers like -7.129475, which is not ideal for me.

    Any fix for that?

  6. Hi,

    COIN-OR’s non-linear solver engines, both Bonmin and Couenne can’t run on protected excel sheet but COIN-OR linear, Nomad and Satalia can.
    I wish to protect the excel sheet, is there any solution? My total variables is too large to run by Nomad’s 1000 limit.

    1. If you find why Bonmin/Couenne fails on a protected sheet we could look at changing this in the future. Andrew

  7. Hi,

    I was trying with Satalia.
    I changed the API key to prevent someone else miss use my “solve time”. However I cant use Satalia anymore the key-in API key function didn’t pop-up after changing the API key.

    Error message as below:
    OpenSolver 2.9.0 encountered an error:
    Invalid API key, please check at https://se.satalia.com/api

    An error log with more details has been saved, which you can see by clicking ‘More Details’. If you continue to have trouble, please use the ‘Report Issue’ button or visit the OpenSolver website for assistance:

    1. You can go to the Open Solver.xlam, and run the sub to delete the saved API key manually.
      The sub name is “DeleteSolveEngineApiKey”.

  8. Hi,

    I am trying to solve a non-linear model using NEOS-BONMIN with OpenSolver2.8.6_AdvancedWin, since i only have access to my laptop which is (Toshiba i7, 2.5Ghz, 8GB ram, 64 bit win7, 32bit Excel 2016).

    After opensolver cleans all the decision variables and begins connecting to NEOS I sometimes get the message ” Error -2147220504: Invalid procedure call or argument”. The same file with no changes to it will sometimes work and sometimes not work. I think this may depend on the internet connection.

    I noticed that i always get this error when using the internet in my house, whereas when using the internet at Work or when using my cellphone as a mobilehotspot i am sometimes able to send the model to NEOS.

    I think it also depends on the size of the model. I am sometimes able to solve 150 binary variables & 10 constraints (converts to 92,400 decision variables), but when increasing to 200 binary variables (convert to ~122,000 decision variables) i get the above error even when on mobilehotspot.

    Is there a way to upload the model file that opensolver creates manually to NEOS? I think the upload may be the issue.

    I also tried solving using BONMIN on my laptop, after 5 hours i got the message “Aborted – a failure has occurred but no starting point exists, IPOPT exited with error code -13 Invalid number detected”.

    When i remove the non-linear constraints i am able to solve the problem linearly with CBC quickly no problem.

    I tried making the binary variables contiguous but this did not help in sending to NEOS i get the same “ERROR – Invalid procedure call or argument” and making it contiguous doubles the number of binary varibales i have in my model.

    Also: While Opensovler is setting up the model to send to NEOS, I do not see in the bottom right corner of excel the # of processors that excel is using and it seems i’m only utilizing 1 of the 4 cores in my CPU (which takes a long time to process about 1+ hours). The Calculating: 4 processors pops up when i receive the results from NEOS and it is loading into excel. (sometimes NEOS works, sometimes not) .

    I would appreciate some help as this program is supposed to place 200 kids into 6 kindergartens based on parents preferences. the non-linear constraints are boy/girl ratio ect.

    Thanks in Advance!

    1. Sorry it is proving hard to solve. I suggest you re-design the model to make it linear by changing the way you handle boy/girl ratios. Andrew

  9. Hello – with my version it doesn’t add a reference to rededit, and therefore the plugin doesn’t load. I can’t add the reference and save the project since it is signed.

    Any ideas how to fix this? The plugin just doesn’t load as I receive a reference error. The path to the RefEdit DLL is C:\Program Files (x86)\Kingsoft\WPS Office\9.1.0.5247\office6\refEdit.dll

    1. RefEdit is often problematic. Have you tried repairing Excel? You can make the change to OpenSolver to link to your RefEdit and use OpenSolver unsigned; Excel should just remove the signature if you edit the code.

  10. Hi

    How many variables can solver handle? We are currently trying to solve a model with approx. 250k, and we believe is not working properly.
    Thanks

    1. There is no limit but 250k is a lot for an Excel model. However it should still work. Andrew

  11. Hello,
    I am starting to use Opensolver and I have a dum question :
    When using opensolver trought VBA macro, is it possible to make constraints on VBA variable (ex an multiple dimensions array) instead of on a range ?
    Thanks

    1. No. It builds the same sort of model as you do manually on the sheet. Andrew

  12. I’m using regular Solver to get the parameters for a Weilbull distribution function. This works. When I try to use any of the non-linear solvers in OpenSolver they all crash because of the call to Weilbull.
    How do you set up the solvers so that it can work with this Excel function?

    1. You can use Nomad; as you say, the other solvers do not know about Weibull distributions. Andrew

  13. Hi,

    I’m using Opensolver through VBA. I’ve noticed that when I run the model a few times the set up times takes longer each time. For example, the setup took just a few seconds this morning and takes up to 5min at midday. Is there something I can do to make the setup faster ?

    Thanks !

    1. We have noticed this behaviour as well, and think it is something to do with the VBA garbage collector. Sorry, but we do not have any workarounds. We’d welcome any fixes you may find. Andrew

Leave a Reply to Aphisara Cancel reply

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