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.

1,924 thoughts on “Help”

  1. Hello.

    I tried to solve a linear programming problem using Gurobi as the solver engine. I have made sure that the model had been constructed right and I found an optimum solution using the graphical technique. However, my Excel showed the following error report.

    The Gurobi solver did not complete, but aborted with the error code – 1073741515.

    Could you please provide me some information about this error?

    Your help would be very much appreciated. Thank you.

  2. I installed Gurobi on Python 3.7 through Anaconda Prompt and when I tried to use the engine on OpenSolver it said:

    No Gurobi installation was detected. The following file was not found: “C:\gurobi901\win64\python27\bin\python.exe”

    Previously i installed Anaconda 2.7 but have removed it and downloaded Anaconda 3.7 and reinstalled the gurobi package again. So I am confused why it’s trying to find python 2.7.

    Any ideas on what to do? Thank you

    1. Please try the new beta version of OpenSolver that we have just released…. this knows about Gurobi’s change to Python 3. Andrew

  3. I have a simple question that hopefully has a simple solution – I checked the API info and did not see this topic so here it goes: How can I go about hiding (Hide Model) the previous colored annotated variables, objective cell, and constraints from one run to the next using VBA (essentially using the ‘Show/Hide Model’ programmatically)? The ‘ResetModel’ certainly removes all of the earlier constraints yet the colored annotations still exist from the earlier run (yes, clicking the ‘Show/Hide Model’ twice will do this but I am curious about doing this operation automatically via VBA code). Also, on the other end, is it also possible to be able to ‘Show Model’ as part of the VBA code AFTER a solution has been achieved?

    1. Our API is more for building and solving models, not controlling the interface. But, if you look thru the VBA OpenSolver code, you will find the hide and show methods; you can then just call these methods yourself. (Sorry, but I cannot remember their names.) Andrew

      1. Dr. Mason,
        Many thanks! I found it and I love the naming convention used: ‘HideSolverModel’ and ‘ShowSolverModel’. It works perfectly. This is certainly an ABSOLUTELY wonderful tool that you and your team developed!!!

  4. I’m not a big programmer; nor a mathematician. I’m reasonably good with Excel Solver. I defined a rather simple problem for Solver, although there are 3650 variables, and there is a constraint that they must be binary (0 or 1). There are no complex functions in the model — only Sum.

    I’ve had a few questions with the solver, as it still seems to be running after 10 hours, and trying to find a place to help me understand the outputs (Num, Status, Obj, It time) a bit better.
    The latest outputs:
    Num Status Obj It time Location
    NLP0014I 461 OPT -503 6 32.888
    NLP0014I 462 OPT -502 6 104.167
    NLP0014I 463 OPT -503 6 31.846
    NLP0014I 464 OPT -503 6 30.677

    A second question has to do with the solvers that send to the NEOS server. If my workbook has information that needs to be kept private, but my Solver model is only anonymous numbers — does the data of the whole workbook get sent off?

    Besides this, I’d really benefit from any other support channel :S Can anyone point in the best direction?

  5. Opensolver with NOMAD on excel doesn’t go beyond 20~30 iteration and stops. It doesn’t show the result I need, it just stops before it finds it. Any solution to this?

  6. Hello. My open solver does not run enough time to find the target value during tests. (It has a solution, but it doesn’t find using nolinear models. NOMAD doesn’t find because it stop running too soon).
    Any solution to this?

  7. Is there a workaround to get Gurobi 9 working with Opensolver? On switching from Gurobi 8 to Gurobi 9, Opensolver does not locate the Gurobi 9 solver correctly.

    1. Thank you for your message. We are aware of this issue and the fix will be implemented in the next release which is coming real soon.

      A quick workaround for now would be going to the VBA editor (Alt+F11), Class Modules -> CSolverGurobi -> PythonPath() function. In line 2, “PythonPath = JoinPaths(GetGurobiHomeDir(), “python27”, “bin”, “python” & ExecExtension)”, change the “python27” to “python37” and it should work with Gurobi9.0.

      Hope this helps, Lucas

  8. Hello. Grand thanks for your product.
    I have a problem.
    Sometimes on one of our PC OpenSolver gives a strange result
    It is a number, 1.5116429 for example and Zeros in other 150 Variable Cells.

    When I try to repeat this result on my PC with the same dataset the solver works and gives a good result.
    But I noticed that it did not perform some constraints. For example

    3 >= 3,00000000455218

    It means solver finds X1=343 and X2=126 and X3=…. but after we calculate it how X1/469 + X2/606 +X3/303….
    In the end, Excel gives the result 3,00000000455218

    May it be a reason for Zeroes in solver result?

    Do I understand right I can’t use “round” in formulas with X if I use Coin-OR CBC?

    1. CBC uses a numerical algorithm which has a ‘tolerance’ because numbers are never exact. Within this tolerance, it is true that “3 >= 3.00000000455218”. You cannot and should not expect anything more accurate – this is true for essentially all calculations done on a computer.
      You are right; you cannot use round() within a model, but you can use round() elsewhere in the spreadsheet.
      Optimisation problems often have multiple optimal solutions, and so one PC may get a different result, but it should have the same objective function value as any other optimal solution.
      Hope this helps, Andrew

      1. Thanks, Andrew.
        I used your advice and did all figures in constraints integer. Because I saw that many of than had many numbers after point. And i was afraid that it can be the reason of mistake in solving.
        Ok. I am going use your advice and see what will happen.

        May this error occur due to a busy PC?
        I mean it is strange that if you try solve this task again on the same PC it will be work well. Just sometimes we see this result as zeros for all variable cells.

  9. Hi,

    I’m getting this message when i’m trying to use and can’t get any further: “Sign in with Google temporarily disabled for this app”.

    Is there any way around this?

  10. Hello. I used OpenSolver for Excel with Satalia’s SolveEngine. After modelling my LP problem and starting the SolveEngine I receive the optimal solution in OpenSolver. So far, so good.

    Unfortunately figures of the optimal solution that are transferred from SolveEngine to OpenSolver are shown with all decimal digits but without decimal point. That means all transferred figures seem to be very large integers, but in fact some of them are real figures.

    How can I fix this problem of data transfer between OpenSolver and Satalia’s SolveEngine? Every help is welcome! Unfortunately I have not received an answer from Satalia.

  11. Hello, I use Satalia’s SolveEngine with OpenSolver for Excel. After modelling my LP problem and starting the SolveEngine from OpenSolver I receive the optimal solution in OpenSolver. Great work!

    Unfortunately figures that are transferred from SolveEngine to OpenSolver are without decimal point. That means all transferred figures are integers, but some of them are in fact real figures with decimals.

    Is this problem known? How can I fix this problem?

    Thank you for your help!

  12. I keep getting a notice that says sign in with google temporarily disabled for this app. How can I get past this?

  13. Hello Mr. Mason,
    Still having issues getting the open solver. I can download the file now after the “new user” problem was fixed. The Opensolver tab does appear in my google sheets now but when I try to open it i get a “A script attached to this document needs your permission to run.” After I hit the continue button I am once again asked to choose an account to sign in with to run the Opensolver. After I select my account I get the “Sign in with Google temporarily disabled for this app. This app has not been verified”. Any ideas?

    Thank You

  14. Hello.

    I am working on a week scheduling helper for the manager of a store, I set the day in 4 shift and I want the solver to give me the min cost solution for the shift, so far is working fine, but there is one constraint I don’t know how to model, as I have 4 shift sometimes the solution is results show something like this:

    Monday Shift 1: Empl1, Empl2
    Monday Shift 2:Empl1, Empl3
    Monday Shift 3:Empl2, Empl3
    Monday Shift 4:Empl1, Empl4

    So the Empl2 comes in the 1 shift then leave and come back later, how can I set the model to avoid that kind of situations.

    The model returns the values as a matrix with rows as Shifts and Columns as Employees, where 1 means assign and 0 means not assign

    Something like this:
    Schedule Emp1 Emp2 Emp3
    Monday 1 0 0 0
    Monday 2 0 1 0
    Monday 3 0 1 0
    Monday 4 0 1 0
    Tuesday 1 0 0 1
    Tuesday 2 1 1 0
    Tuesday 3 1 0 1
    Tuesday 4 1 1 0

    Any ideas it is welcome.

    Regards

  15. I have a model where the variable cells contain several permutations of 1 to 24. In Excel’s Solver, these are modeled as “dif” constraints. When I see the corresponding model in OpenSolver, it shows them as “alldif” constraints, but in the spreadsheet, OpenSolver indicates that they are “unknown”, and it produces errors when I try to solve. Are such constraints allowed by OpenSolver? If so, which optimization engine should I use?

    1. Sorry, but we don’t handle alldiff (yet). We need to write code to create the equivalent IP variables and constraints, and add these to the model. Any volunteers? Andrew

      1. Thanks. I modeled my problem in a different way, using a lot of binary variables. The objective is unfortunately nonlinear, using IF functions. What’s the best OpenSolver engine to use on such a model?

Leave a Reply

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