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.

If have a modelling question (e.g., how do I express this requirement using the rules for a linear programme), please ask it on https://www.or-exchange.org/.

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

  1. Thank you for creating a wonderful tool. It has been quite useful so far. I am having problems getting Open Solver to install itself on my home PC. I can copy it to the add-ins location, but if I go through the “about OpenSolver” route, Malwarebytes force-quits Excel and creates an error event. This was after correctly “unblocking” the zip file and opening the .xlam file and allowing macros to run at the Excel warning prompt. Not sure if anyone else has experienced it. The Protection Event Lists:
    Application – Microsoft Office Excel (vers 2013), Layer – Malicious Memory Protection, Technique –
    Exploit code executing from Heap memory blocked, Action – Blocker. I have a screen grab of the log if it helps. Lastly I don’t use Malwarebytes on my office PC.

    1. This seems to be a problem faced by other Office users, and is perhaps because Malwarebytes is overly suspicious. Eg, see http://www.tomsguide.com/answers/id-3373525/malwarebytes-blocking-microsoft-office-considers-word-exploit.html and https://forums.malwarebytes.com/topic/168604-unable-to-add-to-anti-exploit-exclusion-list/. I suggest you ask on the forum (the latter link). We have encountered similar issues before, but don’t really have much help that we can offer, sorry. Andrew

  2. Hi, I would like to estimate possibility to use OpenSolver or Solver Studio for my purpose.

    1. How many variables can OpenSolver or SolverStudio use? I need 300’000 variables.
    2. How many constraints can OpenSolver or SolverStudio use? I need 1’000’000 constraints.
    3. How long does it take to solve the problem of this size. Min and max estimations?

    Thanks in advance.
    Vitaly

    1. That is a large sized problem. I would not usse OpenSolver; SolverStudio might be feasible using, say, Julia. The problem size limits are all memory based, and so I cannot give you firm numbers. The solve time depends on the problem structure, including the number of integer variables. Andrew

    1. I assume you mean OpenSolver? Sorry it is not working. Can you send a screen shot of any error message to email hidden; JavaScript is required. Please also try uninstalling and deleting OpenSolver, re-starting Excel, quitting Excel, and then downloading OpenSolver again and opening the OpenSolver.xlam file. Hope this helps. Andrew

  3. Hello,

    First of all great work on building this awesome tool.
    I have been trying to develop a supply planning problem in Open solver, for the period Jan to December. However, as I keep adding the variables beyond a limit, when the Variable cells dialog box is almost full, it throws an error saying “The cell range specified is invalid. This must be a valid excel range that does not exceed Excel’s internal character count limits.” Any work around for this or is this a limitation?

    1. It is a hard limit. But you can group all your decision variables into one or two contiguous ranges and then there is not effective limit. Andrew

  4. Hello,

    I’m using NOMAD optimization to maximize the sum of 500 functions which have the following equation F(x)=a*ln(x)+b. I have put many constrains. When I press solve the does many iterations 10,000 and delays a lot to converge within “Distance to feasibility”. Is there something I can do to speed this up?

    Thanks for your great Solver!
    Alex

    1. Another choice of solver would be faster but only if the formulae are straight forward with no if’s or lookup’s etc.

  5. Hello,
    I am having an issue with Solver running extremely slow and never getting past the “building model” stage – it just continually starts over. This is the first time that I have encountered this issue. It has been running fine up to this point.

    1. You have a spreadsheet that has lots of decision variables and/or is slow to recalculate, perhaps because it has complex formulae, graphs etc. Ty copying just the model into a fresh workbook and see if that works faster. Hope this helps, Andrew

  6. Running a simple Call Center staffing model OpenSolver fails and reports, “Non-linear parser failed while processing cell Sheet1_J21.” That cell (J21) is the Objective Cell and contains the following formula: =SUMPRODUCT(CostPerShift,NumberWorking) where CostPerShift and NumberWorking are named ranges that refer to ranges on the same sheet. OpenSolver readily finds the optimum solution if I delete the named ranges and just use the cell ranges, like so: =SUMPRODUCT(C21:G21,C5:G5). Is it that OpenSolver does not parse named ranges, or what perhaps? Thanks.

    1. From memory we do not parse range names, sorry. This impacts the non-linear solvers (apart from Nomad) where we parse the formulae. Andrew

  7. Thanks for this great Add-in!
    It had tremendously help in my optimization.

    One question, I’ve tried to optimize a model that the Excel formulas contain IF statement. The optimization ran well, but it didn’t return optimal solution. I tried a smaller scale of the model through Excel’s built-in Solver and the same issue. Optimization ran but solution was not optimal.
    Is this a general issue that occurs with IF statements? Is it possible to integrate it in your software?

    Keep up the great work!!!!:)

  8. Hi,

    Thanks for your efforts. Could you please provide a download option other than SourceForge? – the reason why I am asking this is because SourceForge is become more and more unreliable and once I even had a virus/adware hidden in the genuine software download…and it was such a big problem that I had to format my whole computer (so, I don’t even want to go anywhere near that website). I hope you would be able to help me and save others of the same problems.

    Thanks in advance,
    Vicky

    1. Vicky: SourceForge has been sold to new owners, and so this dodgy behaviour has been stopped, fortunately. Andrew

  9. I found what was slowing down model setup … the indirect function. I had named cells in one range (say with names x, y and z) containing model input data and had these names listed as text in a second range (say in cells c10=”x”, c11=”y’ and c12 = “z”) and was using indirect(c10), indirect(c11) and indirect(c12) in a third set of cells (say in cells z100, z101 and z102) to show the data in named cells into the third area. Yeah its kinda complex … but really slowed down model setup. When I deleted the indirect statements setup time was back to normal.

    1. Thanks for letting us know; this will be very helpful for other users trying to speed up their models. Keeping the formulae simple is always best if it is possible. This is because we evaluate the spreadsheet many times (once per decision cell) to set up the model. Cheers, Andrew

  10. I’m using OpenSolver for a binary scheduling model. If OpenSolver is unable to find a feasible solution given the input parameters and constraints, does it return the best alternative with constraints relaxed, or does it return whatever was the last set of conditions it was testing?

    1. It returns whatever the solver returns, which is rather random. It does not relax the constraints; this is something you would need to do by adding extra variables, one per constraint, and then penalising these in the objective function. Good luck, Andrew

  11. Hi, my problem is about “Unable to delete the file”

    The screen displayed “: C:\Users\刘兆邦\AppData\Local\Temp\”. And I do not have the log1.tmp.

    Opensolver had worked last week. But this week it is not working.

    Could someone help me to fix this?

    Thanks

    1. I suspect that VBA won’t like the non-English characters in that path. But that should have been true last week as well (unless you have changed the logon name?). If the file is open, then re-booting may allow OpenSolver to delete it. Please try re-booting first, and then loggin on with another user name; please let us know how you get on. Andrew

  12. Hi,
    I’m trying to optimise the choice of a PLC and it’s modules based on price. There are 3 types: one that doesn’t support additional modules, one that supports 2 and one that supports 8. I’m trying to add a variable that if “activated by user” B13 (1 or 0) that forces the optimisation to leave room for at least 1 more module.
    I’m getting this error:
    “…The model contains ‘AM14=1’ for which instance 1 does not depend on the decision variables and is not satisfied.
    Constraint specifies: LHS=AM14=1 = RSH=1=2…”
    I don’t get why at RSH is says 1=2.
    And i have configured this function AM14=IF(OR(AND(B13=1,AM10>AM52),B13=0),1,0) where B13 is my input, AM10 is max configurable modules and AM52 is currently configured modules (both are automatically calculated). The constraint is AM14=1.
    The constraint depends on the input since the curent number of modules configured depends on the variables. What am I doing wrong?

    1. This is not a linear model, sorry. Try Googling “MIP formulations”. Good luck, Andrew

    1. Yes free to use. It is under the GPL and so any changes to our VBA code need to be shared in source code form if you publish/sell the modified code. Andrew

Leave a Reply

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