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.

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.

Common Problems

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.

1,408 thoughts on “Help”

  1. I have a work computer that can quickly parse and process a large non-linear model (c. 43,000 decision variables) into a model file, but, due to my employer’s policy restrictions, it a) won’t allow opensolver.exe to run, and b) won’t connect to NEOS.
    I have a personal laptop that will do both a) and b) but is extremely slow to parse and process the model.
    Is there a way to process the model on the one computer, and submit it to NEOS on the other? I know I can upload a saved model to the NEOS server using their website, but I don’t know how to then insert the results into my spreadsheet

    1. I suggest you look at the VBA source code, and modify it to handle this case. Please let us know how you get on. Andrew

  2. Hello,

    I would like to know that what is the maximum variables and constraints that Opensolver

    can solve effectively. Thank you.

  3. I am having a problem with OpenSolver, it is trying to solve the Model with NEOS but it won’t solve it. The icon at the bottom of the screen keeps saying “Model is solving…”with the time elapsed. It has gone on for over 15 minutes, when normally it solves within seconds. Can you help?

  4. Hi,

    I’ve recently downloaded OpenSolver and I’m stuck in my programming. I think the problem is simple to solve but I couldn’t find how on Using OpenSolver page. I am trying to loop solver until it finds a feasable solution. Here is an exemple:

    Do Until “find a feasable solution”
    Range(“Cell”)=k
    Call RunOpenSolver(False, True)
    k=k+1 ‘this changes one of the constrains
    Loop

    Hope you can help. Thanks in advance,

    FD

  5. Hi,
    I’m back to using OpenSolver after a few months off. I have met a problem that seems to require a deeper knowledge of VBA than I have: I get the error message “Out of stack memory” (or a pure “excel has stopped running” crash) when running problems that lead to a high depth of recursion when reading formulas.
    OpenSolver crashes when processing a sub that calls itself. The larger the problem size the “deeper” the stack of calls, and OpenSolver ends up crashing in the PUSHDOWN subroutine. Since that one calls itself in a recursive loop I assume that is where the problem comes from.
    However I have plenty of memory on my computer and the memory isn’t full when the crash happens, so I doubt the issue comes from there.
    After having googled a bit the problem it seems that it could be an issue with the parent-child relationship management; or something like the code not cleaning memory after having gone through a tree. Actually, simplifying the model only delays the appearance of the problem rather than solving it.
    Any idea on how to solve that?

    1. This is a limitation of our current parser design; there’s not much you can do to fix it, apart from moving to SolverStudio or waiting for us to re-write the parser (which is on the long-term plan). Sorry about that. ANdrew

      1. Ok. I have started solving the issue. I don’t really know what you mean by “re-writing the parser” but if I redesign the subs currently defined recursively and avoid such an approach then at least this stack error won’t come back! I have already fixed 2 out of the 9 subs that I have isolated as using recursive methods.
        Hopefully when done I can work on larger models without fearing a crash after a couple of hours spent parsing the NL model…

        1. Fantastic. Thanks for looking at the code for this (which has ended up being rather tortuous, and is due for a re-write and simplification). We’d welcome code changes that remove the recursive calls. Please keep in touch. Andrew

          1. Done. Seems to work nicely now (although it takes time ;))
            Let’s see if I meet other crashes as I progress through my study!

            1. Thanks for the update. We’d love to use your code changes if you are happy to share them? Please email us via email hidden; JavaScript is required if are willing to contribute your changes. Thanks, Andrew

              1. I haven’t forgotten you – I am still testing the changes with my models, just in case some bugs are left. So far so good, will send this week!
                J

  6. Hi, I’m new to OpenSolver and was using it in conjunction with the book Data Smart. When I finally started using it for optimization I keep getting this message:

    WARNING :
    The following constraint(s) do not appear to be linear:
    E27:E30 <= F27:F30: instance 2, LHS=E28, RHS=F28, -0.03459828-0.03443449
    E27:E30 >= B27:B30: instance 2, LHS=E28, RHS=B28, 0.020016720.02018051

    Can anyone help me out?

    Running the linearity check when it this message appears gives me a list of 6 instances.

  7. Hello,
    Thanks again for this great software.
    I have just installed OpenSolver Advanced, because I would like to try the nonlinear solvers. However, I still run many linear models using CBC. Does the linear solver in OpenSolver Advanced work as perfectly as in OpenSolver Linear or could any differences occur due to the “larger framework” of the Advanced version?
    Thanks in advance for your reply
    Michael

  8. Is there a way to prevent the message boxes that occur when nomad can’t find a feasible solution?
    My code sets multiple scenarios and automatically runs all of them, but if it get this error then I have to mannualy press OK.

  9. Firstly many thanks for creating OpenSolver. I have a question regarding a particular way of using OpenSolver.

    Unfortunately my spreadsheet is too large to use your solver. I understand that you are working on a parser to convert the spreadsheet into directly accessible formulas. Unfortunately this did not work in my case and is unlikely to work. Therefore I wonder if it is possible to use your solver by supplying a user defined function to calculate the target value.

    Hopefully you can help

    Many thanks in advance
    Kind regards
    Milko Ostendorf

    1. Thanks for your feedback. If by target you mean the target cell given in the model dialog, then no; that must be a constant. If by target you mean the objective, then yes, you could try a user function, as long as the solver is Nomad, and you get Excel to re-calc the function on each s/sheet recalculation (which should happen automatically). Please let us know if this works; we’ve never tried it. Andrew

  10. Hello,
    I am struggling to access the nonlinear solvers provided within OpenSolver. Where do I download the bonmin.exe for the COIN-OR Bonmin Non-Linear solver to run it within excel? When I attempt to access the NEOS using Bonmin solver it states that it cannot connect to the NEOS server at this time. Do all of the non-linear solvers leverage a third party to find the solution? If so how efficient (time-wise) are they at returning solutions. I am looking to iterate through a loop solving multiple problems.

    Thank you so much for taking the time to answer my questions.

      1. Hey Andrew,

        I’ve tried changing the NEOS python script (NeosClient.py) multiple times in order to get Open Solver connected to it, however have been without luck.

        Looking at NeosClient.py, I changed the following:
        NEOS_HOST=”https://neos-server.org”
        NEOS_PORT=3333

        Is that correct? If not, how would you advise it needs to be changed? (I’ve changed the host multiple times as well using different links with http, without http, having the “:3333” at the end, but been without luck)

        Please advise as soon as you can.

        Cheers,
        Qazah S.

        1. NEOSClient.py is only used on a Mac. Are you using a Mac? If not search the VBA code for the NEOS URL. That change looks like the right one to make. Andrew

        2. Hi everyone.
          When I try to use Neos server I get the following:

          Error -2147220504: OpenSolver could not establish a connection to NEOS. Check your internet connection and try again. If this error message persists, NEOS may be down.

          Because the message persists I checked this Help and I found the reference to the NEOS python script (NeosClient.py). But on the zip I used for installation (OpenSolver2.8.5_LinearWin) doesn’t contain NeosClient.py.

          Where I’m wrong?

          Regards.
          Mr. T.

          08 mar 17 14:48:44 [OpenSolver.xlam] SolverNeos.SendToNeos_Windows: Line 0
          08 mar 17 14:48:44 [OpenSolver.xlam] SolverNeos.SubmitNeosJob: Line 17
          08 mar 17 14:48:44 [OpenSolver.xlam] OpenSolverNeos.SolveOnNeos_Windows: Line 2
          08 mar 17 14:48:44 [OpenSolver.xlam] SolverNeos.CallNeos_Remote: Line 24
          08 mar 17 14:48:44 [OpenSolver.xlam] SolverNeos.CallNeos: Line 6
          08 mar 17 14:48:44 [OpenSolver.xlam] SolverCommon.SolveModel: Line 44
          08 mar 17 14:48:45 [OpenSolver.xlam] OpenSolverAPI.RunOpenSolver: Line 11

          Error -2147220504: OpenSolver could not establish a connection to NEOS. Check your internet connection and try again. If this error message persists, NEOS may be down.

          Solver: NeosCou

          OpenSolver version 2.8.5 (2016.11.3); Distribution=Advanced
          Location: “C:\Users\GS01131\AppData\Roaming\Microsoft\AddIns\OpenSolver.xlam”

          Excel 12.0; build 6759; 32-bit; VBA6
          .
          .
          .
          .

          CBC v2.9.4 (32-bit) at “C:\Users\GS01131\AppData\Roaming\Microsoft\AddIns\Solvers\win32\cbc.exe”

          No Gurobi installation was detected. The value of %GUROBI_HOME% was not set.

          Bonmin v1.8.4 (32-bit) at “C:\Users\GS01131\AppData\Roaming\Microsoft\AddIns\Solvers\win32\bonmin.exe”

          Couenne v0.5.6 (32-bit) at “C:\Users\GS01131\AppData\Roaming\Microsoft\AddIns\Solvers\win32\couenne.exe”

          NOMAD v3.7.1 (32-bit) using OpenSolverNomad v1.3.1 at “C:\Users\GS01131\AppData\Roaming\Microsoft\AddIns\Solvers\win32\OpenSolverNomad.dll”

  11. Dear,

    Would it be possible to use OpenSolver in excel to solve a relatively large linear program.
    I want to solve an linear program with about 175 000 variables and 200 000 constraints. Would this be feasible with OpenSolver?

    Thank you,

    Jonas

    1. It would be very slow to get the model out of the spreadsheet; I’d use SolverStudio instead. Andrew

  12. Hello.

    I’m having problems in using OpenSolver in project I made. Everytime I get an error. Or “Invalid procedure call or argument”, or “One of the parameters supplied to NOMAD was invalid. This usually happens if the precision is too large. Try adjusting the values in the Solve Options dialog box.”.

    When I use the Engine NEOS using Bonmin, I get this error:
    “OpenSolver 2.8.5 encountered an error:
    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.

    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”

    Maybe I’m doing something wrong. Can you help me?

    Thanks!

    1. Sorry it is not working. Do you intend to be using a non-linear model? We recommend linear models if at all possible. Your spreadsheet will have formulae in it that OpenSolver’s solvers cannot understand. You cannot use any formulae such as vlookup etc. Please check the s/sheet carefully, and send us a list of the formulae you are using. The NOMAD issue is not so obvious to me; are you using the default parameters? If not, perhaps you could send us the sheet to email hidden; JavaScript is required. Good luck, and Merry Xmas. Andrew

  13. Hello,
    What engine I can use to find out minimum (maximum) value of a function f with linear constraints:
    f = x1 * x2
    where x1 – variable of type binary
    x2 – continuous variable

  14. I am rather hesitant about bothering you with my queries concerning Open Solver, considering my very low level of ability to use Excel.
    I am attempting a numerical solution of a problem dealing with the behaviour of voids in worked metal billets. I can reduce this to a system of nine non-linear equations, one of them a fourth order polynomial, one a non-linear function of circular trigonometric functions, the remainder second order poynomials. None is particularly complex mathematically. I have kept the analysis at a relatively elementary level and am trying to avoid elevating solution of the equations into a major phase of the investigation because it may be argued that the physical model I have adopted does not justify it. In turning to Excel, I am unclear what ad-on(s) to Excel (currenty Excel 2007, but to be raised to the 2016 version shortly, I believe) I would need for solution of these non-linear equations. I note concerning your comments on NOMAD that all the constraints are necessarily equality constraints (to satisfy the requirements of yield) and that good bounds to the geometrical variables are difficult to estimate. I cannot assign much significance to the numerical values I may obtain, although a good prediction of trends would be very valuable fundamentally and in industry.
    I would very much appreciate it if you were to suggest what you think one of your OpenSolvers may be suitable, and with what software.
    I would like to add that I was emboldened by the generous approach which you are so evidently taking in sharing your software.
    Best regards,
    Peter Thomson

    1. Peter. I would suggest you set up the problem to minimise the sum of squared errors between the left and right hand side of your equations, and then minimise this sum of squared errors using Solver, or OpenSolver with NOMAD (which may work), or BONMIN or COUENNE. Good luck; sounds like an interesting project. Andrew

Leave a Reply

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

*