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.

1,595 thoughts on “Help”

  1. Hi, I really appreciate the open solver it accommodates my LP model, which has more than 200 variables. However, I have a problem with my current model that I desperately need to solve. (FYI my background is not in the data or programming, so I will really appreciate the help).
    My model is to Max Y
    By changing variable X
    Where:
    X=B
    and X<=X+C
    It keeps telling me that "WARNING : The following constraint(s) do not appear to be linear", where I believe this warning is referring to X<=X+C. is it because it is circular reference?
    Thank you.

    1. Your model makes no sense sorry. X < = X+C is always true if C>0. And there is no connection between X and Y. Andrew

  2. Hallo,

    I’m a frequent user of Open Solver, and very much appreciate all the work and effort you guys put in to it!

    I currently working with the solver from VBA, and from here solving in a loop while adjusting the model with different target values. which overall works great. but I’m having an issue with the error message ‘no feasible solution’, is there any way from VBA to automate process of clicking “OK” to the error message? The error message itself is fine, I just need the solver to continue the script.

    Kind regards,
    Martin

    1. Perhaps our code does not handle this condition correctly? We’d welcome improvements to the VBA code to fix this. Andrew (on holiday with no computer)

  3. Hi! I love what you do! I came across an interesting issue…
    I tried to use OpenSolver to develop a VBA script which would find all of the values needed to get a defined sum.

    Since Frontline’s Excel Solver is limited to 200 variables and OpenSolver seems to be faster in some problems, it seemed to be a perfect tool. However, there’s a problem – OpenSolver with CBC seems to find no feasible solution, while Excel Solver has no issues with this type of problem.

    Here’s a link to simple example of the problem in Excel file (with Frontline and OpenSolver solutions):
    https://we.tl/t-h8QwQoe947

    Looking forward to your answer,
    Vedran

    1. Although I haven’t looked at your model (I will leave someone else to do so), this is almost certainly a tolerance problem; please try to avoid numbers close to zero or of very different sizes in the same equation/model. Andrew

    2. I have had another look at this. It does indeed seem to be a CBC bug. It would be great if you could submit this example as a possible bug (with the .lp file produced by OpenSolver, and available under “View Last Model File”) to the CBC email list on email hidden; JavaScript is required. Please change the variables to be binary as that is more natural. Note that it is unusual to run CBC to seek a value and not optimise a value, and so this case will be less tested. Thanks for taking the trouble to let us know. Andrew

      1. Thanks for the prompt reply!
        I will definitely send a report to the CBC team. I truly appreciate your time and effort .
        Br,
        Vedran

  4. Good morning I am receiving this error:
    sorry we couldn’t find c:\users\xx\AppData\Local\Microsoft\INetCache\Content\MSO\44D8A4E3.xlam. Is it possible it was moved,renamed or deleted?

    How can I resolve this issue?

  5. I am using the opensolver to find an optimal solution of my work. The solver is running over 30 hours and keep showing “solving model” in the status bar. I found that the “Time elapsed” is keep counting from -ve (around 80k seconds) to +ve and after reaching a certain 10k seconds and then back to -ve …….
    The status bar of my worksheet also showing the message “11480 vars, 7840 int vars (7840 bin), 180 rows, 2147483647 iterations, 0 tolerance.”
    Can I know what is going on and is there any possible way to fix it?

    Thanks.

    1. You have a hard problem where branch and bound is exploring a large fraction of all the possible 2^7480 solutions; you need a better representation of your problem. Andrew

  6. Hi Andrew,

    i try to use open solver but it doesn’t load my complete Model.
    Are there Limits? Is there Chance to mark all constraints and load them?

    Thanks for your help!

  7. Hello,

    I’m attempting to use GRANULARITY with NOMAD, but OpenSolver doesn’t seem to accept my input.

    Error Message: The Parameter ‘GRANULARITY’ was not understood by NOMAD etc…

    I’ve checked the NOMAD manual and seem to be doing the correct thing. I use the parameter table for other options (VNS_SEARCH etc) so OpenSolver is parsing the data through correctly. To be specific, the table left hand column contains “GRANULARITY” and the right hand column contains “5 0.001” (without quotation marks) to control the 6th variable.

    Am I misunderstanding something? Any help would be appreciated.

    Thanks you

    Gary

    1. I suggest you check our VBA source code to confirm the data layout. Perhaps you need the numbers in 3 columns? Or maybe we did not anticipate pairs if values. Andrew

  8. Hi ,

    I am using Opensolver (CBC) to run an optimization problem containing ~6000 variables. I run it for ~1000 different sets of data (resetting the problem and storing the output 100 times). I am facing the following issue:

    When I run the solver manually (paste data in the model manually and run using the command in the excel ribbon), the solver sets up the problem relatively quicker (reading 100 variables per second).

    But if I iterate the model using VBA (using VBA to paste data , initiate run command and store output), the model setup time increases drastically (it only reads 12-13 variables in one sec).

    Is there a way I can increase the setup speed even while using VBA to run the model.

    Thanks.

    1. We have noticed this. It is a commonly reported problem in VBA programming that is not specific to OpenSolver. Let us know if you find a fix. Andrew

  9. if i get prompted “out of memory” is this an opensolver limitation or my computer?

    if its a solver issue- can someone advise me how to reduce my model? is there a limitation to the number of variable cells and/or constraints?

    1. No limits. Possibly an Excel limitation. Or was the solver giving the error… solving problems with integer variables can need a lot of memory. Andrew

  10. Hi,

    I use the Couenne as a Solver Engine and I obtain this Error.

    26 Aug 18 20:02:28 [OpenSolver.xlam] SolverCommon.RunLocalSolver: Line 7
    26 Aug 18 20:02:28 [OpenSolver.xlam] SolverCommon.SolveModel: Line 44
    26 Aug 18 20:02:29 [OpenSolver.xlam] OpenSolverAPI.RunOpenSolver: Line 11

    Error -2147220504: The Couenne 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: Couenne

    OpenSolver version 2.9.0 (2017.11.10); Distribution=Advanced
    Location: “C:\Users\DELL\AppData\Roaming\Microsoft\AddIns\OpenSolver.xlam”

    Excel 16.0; build 10325; 32-bit; VBA7
    Excel product code = {90160000-000F-0000-0000-0000000FF1CE}
    Excel language: English – US
    OS: Windows 10.0; 64-bit
    Username: DELL

    CBC v2.9.4 (64-bit) at “C:\Users\DELL\AppData\Roaming\Microsoft\AddIns\Solvers\win64\cbc.exe”

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

    Bonmin v1.8.4 (64-bit) at “C:\Users\DELL\AppData\Roaming\Microsoft\AddIns\Solvers\win64\bonmin.exe”

    Couenne v0.5.6 (64-bit) at “C:\Users\DELL\AppData\Roaming\Microsoft\AddIns\Solvers\win64\couenne.exe”

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

    Please advice, Thank you so much.

Leave a Reply

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