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

  1. Hi,

    I am getting this error: Unable to delete the file: C:\Users\XXXXXX\AppData\Local\Temp\log1.tmp

    I have tried restarting my computer as described above and it does not work. Also tried using another computer and it still does not work.

    Please help! I’m stuck on my thesis until I can run sensitivity runs. Thanks so much!

    1. Sorry it is not working. Are you running version 2.8.2? What OpenSolver sensitivity analysis settings are you using? Andrew

      1. From your report, iI now see that you are using an older version; please upgrade to v2.8.2, and see if that fixes the problem. I look forward to hearing if it works. Andrew

  2. Hello, when i deliberately stop running solver (by vba code) and try to run it again the follows message appears to me.

    ——————————————————-
    ERROR MESSAGE:

    OpenSolver 2.7.1 encountered an error:
    Unable to delete the file: C:\Users\ANDRE~1.ROL\AppData\Local\Temp\log1.tmp

    Permission denied
    ——————————————————-

    This situation does not allow me to run solver again until i restart my pc! There is any way to fix this problema?

    Thank you!

    1. That’s not what we want. Can you please email the workbook to us so we caqn debug it? email hidden; JavaScript is required Or, perhaps you could post the VBA code that you are using. Thanks, Andrew

  3. Hi. I’m using OpenSolver for Google Sheets for classroom instruction, and would like to share a Sheet + Model with students. We’ve learned that if they have the OpenSolver add-on installed, and if I share the a link with edit privileges, then this works just fine. Of course, leaving a sheet open to edits from 40 different students is not a reliable way to distribute courseware. But if I share a view only link the OpenSolver model part of the sheet isn’t distributed. And advice on how I can share a Google Sheet + OpenSolver model with a class of students?

    1. I don’t have any answers. Our shared test model is broken by me all the time! Maybe someone else has an answer? Andrew

      1. Sharing a model as “view only” now preserves the model when somebody makes a copy of it for their own use. This was a new change in the v2.0.0 release of OpenSolver for Google Sheets, since the models are now stored inside the file on a hidden sheet.

  4. Hi, I have been using OpenSolver through vba ans everything works perfectly here in the US. The problem is that the purpose of this model is to be used in Paraguay and when it is tried there, opensolver is not building the model. It doesnt recognize the constraints set in vba. I am wondering if there are different ways of using it based on world region. I hope you can advice!

    1. We try hard to make our code work in all languages, but get tripped up occasionally by things we have overlooked. Can you tell us what the problem is here? Please try v2.8.2. This is our latest code (but has some known issues with moving sheets between countries that we will be fixing). Andrew

  5. I’m a new user and have a basic question. How do I assign a dynamic formula to the RHSFormula parameter? I have seen a couple of examples that have something like RHSFormula = “0” and those work fine for me. But what about a case where I need the RHSFormula to be something like “=1-($D$25 + C9)”, where I expect the C9 to change to C10, C11, etc. as it’s applied across the cells in the range being used (like Excel does when you drag a formula across a range of cells)?

    1. Welcome to OpenSolver. OpenSolver does not work with relative ranges in the fashion you describe. Instead, put the formulae in cells, and use these cells for the right hand side. Hope this helps. Andrew

  6. Hi,
    We have several users with different versions of Excel on Mac (14.6 or 14.6.1). For some open solver 2.6 works whereas for others it gives error. They worked with open solver 2.7.

    Can you give a mapping of open solver versions and compatible excel versions?

    1. VBA support on Mac’s is always tricky, thanks to Microsoft’s focus on Windows. However, we would like to know about specific bugs in our 2.8.2 preview release so we can fix them. Thanks, Andrew

  7. When I click in “Options” I get an Error 6: Overflow. The debugger points to line 157.

    Function GetNamedIntegerIfExists(sheet As Worksheet, Name As String, IntegerValue As Long) As Boolean
    Dim DoubleValue As Double
    156 If GetNamedDoubleIfExists(sheet, Name, DoubleValue) Then
    157 IntegerValue = CLng(DoubleValue)
    158 GetNamedIntegerIfExists = (IntegerValue = DoubleValue)
    161 End If
    End Function

    PS: I am using MS Office 2016 x64

    1. We are not sure why this would happen. Can you please email to email hidden; JavaScript is required (1) your spreadsheet, and (2)a screenshot of your About OpenSolver window. Also, what language is your Windows running? American English or some other? Thanks, Andrew

  8. Hello, first of all, thank you for this great piece of software

    I would like to know if you have received any messages regarding the Unicode Error in WINDOWS 10 (and if so, any solutions for it)?

    I tried putting the Solver Folder in C root, and use the solver as both an add-in or manually opening. The error still persist thought.

    Ps: (My spreadsheet works fine for both Windows 7, Windows 8, as an add-in or manually opening it, and even when put in a Cloud Service, like dropbox)

    1. Sorry that it is not working on Windows 10… I don’t have access to Windows 10 and so we may have missed something. What exactly is the error you are coming across? Andrew

      1. Sorry, i also lack access to Windows 10, (it’s in my manager’s PC) and he’s out of town (i’ll ask him to print the message error ASAP)

        I’ll check the language problem (i know he’s laptop is running in PT-BR) as a lot of people are complaning online about missing fonts/unicode errors after W10 upgrade.

        I also prepared various compressed files (from Wrar, 7Zip, with relative paths, full paths, etc) to see if the problem lies in there (there are some non-open solver path/unicode error related cases online)

        If anything works out, i’ll let you know.
        Thanks Andrew!

  9. Hi, I can´t run and find the solution of my model in opensolver, this throws me the following error;

    Error 6: Desbordamiento
    Solver: CBC
    Version 2.7.1 (2015.06.28) running on 32-bit Windows 6.1 with VBA7 in 32-bit Excel 14.0
    CBC v2.9.4 (32-bit) at “C:\Users\Cristian\Documents\MIIS\TESIS MOSAIC MIIS\Solver\Solvers\win32\cbc.exe”
    No Gurobi installation was detected. The value of GUROBI_HOME was not set.
    Unable to find Bonmin (‘bonmin.exe’). Folders searched:
    C:\Users\Cristian\Documents\MIIS\TESIS MOSAIC MIIS\Solver\Solvers\win64
    C:\Users\Cristian\Documents\MIIS\TESIS MOSAIC MIIS\Solver\Solvers\win32
    Unable to find Couenne (‘couenne.exe’). Folders searched:
    C:\Users\Cristian\Documents\MIIS\TESIS MOSAIC MIIS\Solver\Solvers\win64
    C:\Users\Cristian\Documents\MIIS\TESIS MOSAIC MIIS\Solver\Solvers\win32
    Unable to find NOMAD (‘OpenSolverNomad.dll’). Folders searched:
    C:\Users\Cristian\Documents\MIIS\TESIS MOSAIC MIIS\Solver\Solvers\win32

    Could You help me please?
    Many thanks!
    Best regards

    Cristián Carrasco.
    From Chile

    1. Sorry it is not working. Please try the latest 2.8.2 release. Also how does ‘Desbordamiento’ translate into English?

    1. As of now, no. Excel 2016 for Mac in its current form is incomplete and lacking features that we need to make OpenSolver compatible with it (like a working VBA editor!). We won’t be able to make the required changes until Microsoft releases a finished product.

  10. Hi, and thanks for a very good software that I will definitely use a lot in the future!
    I run on Win 7 enterprise and Excel 2010. No version above 2.7.1 seems to work; I get runtime errors otherwise. With 2.7.1 nothing happens when I click on “Set Quick Solve parameters”, leading to very long running times since the model has to be rebuilt each time. Any thoughts? Thanks a ton!

    1. Sorry OpenSolver is not working. Have you tried v 2.8.2? That fixes issues with Excel 2010. Can you please tell us about your error (and maybe email a screenshot to email hidden; JavaScript is required). Long run times are caused by a large s/sheet; the Quick Solve should be working ok in 2.8.2. (Using http://SolverStudio.org is another option.) Thanks, Andrew

    2. Have you tried 2.8.2? It fixes an issue with Excel 2010 giving “automation failed” errors. If 2.8.2 still fails, please send us the error message. Version 2.8.2 should work with Quick Solve. For large s/sheets, you might also like to try http://SolverStudio.org. Thanks, Andrew

  11. Hi, I’m using OpenSolver for a while now. After some weeks not using it I opened an old file and just rerun the solver w/o changing anything in the sheet or model. Now I’m receiving an error message from VBA:Run time error 13: Type mismatch.
    The debugger brings me to the Function Getupdatesettings.
    Any idea what causes this error and what I can do to get Opensolver running again?
    By the way: I updated Opensolver today to 2.8.2 but it didn’t change anything.

    1. Thanks for the bug report. We have looked into this, and think it might be a “locale” issue. Do you perhaps run a non-English copy of Windows? To help us, are you able to send us a screen shot (to email hidden; JavaScript is required, or just a copy/paste of the text, showing the exact line with the error in the GetUpdateSetting function. Thanks, Andrew

  12. Hi.

    Many thanks for the awesome program!

    I used to solve models in version 2.1 using variable cells in a sheet different from the sheet that has the model. Using the current version (2.7.1), when trying to set the model, an error message appears: “the cell range specified for the Variable Cells is invalid. This must be a valid Excel range thath does not exceed Excel’s internal character count limits. Please corret this and try again”. The sheet has no strange characters nor spaces in the name.

    Is there any way to override this restriction and operate the variable cells in a different sheet (other than the sheet where the model is specified) inside the same book?

    1. The latest OpenSolver pre-release beta, version 2.8.1, being uploaded shortly (watch out for a new post), fixes this. We’d welcome your feedback on this new version. Andrew

    1. I have not tried this. It should be possible, if the pivot table automatically recalculates, and if the pivot table is linear (if you wish to use CBC). Please let us know how you get on. Andrew

      1. Thanks for your reply Andrew. I did try it already although I did not succeed, probably caused because the pivot table does not autocalculate. I will try again tomorrow and report the exact errormessage.

      2. Hi Andrew,

        I have added some VBA-code to my file, so the Pivot table automatically updates now on a cell change. See: http://www.mrexcel.com/forum/excel-questions/723794-auto-refresh-pivot-tables-when-souce-data-changes.html
        After this I use Automodel with the correct objective and variable cells. Opensolver gives the following errormessage: Error; an issue arose while finding contraints. Error number 91. Object or variabele not set at line 3671.
        Is it necessary to add contraints or is this error caused by the Pivot table?

        Thanks,
        Marcel

            1. In this post I describe the steps I took to optimize a non-linear problem with data from a Pivot table.

              First I have tried to maximize the correlation coefficient. Since this is probably non-linear I did not got any optimized outcomes from the CBC engine.

              Andrew suggested I use Nomad for non-linear problems. I downloaded the Advanced version 2.8.2. with the No8mad dll. Although when I run AUTO Model on this I receive the error 91: Object variable not set (at line 3671).

              After that I was running the Nomad-model by selecting “Optimize” instead of Auto-Model and it seems to be working. After 3 hours the model is doing it’s 45th iterration so it is very slow. After 8 hours running, Excel finally crashed short on memory (although I have a quit strong workstation). I received some error messages.

              After that, I have replaced the pivot table with formulas for every month and now the Opensolver runs smooth and fast! With some VBA code it is not so much extra work to replace the pivot table with referencing formulas for every month. Although it is a pitty that the Pivot table makes it so slow, since I use a lot of pivottables. I read that a pivot does not use multithreading. Strange since Microsoft is putting a lot behind pivottables in Excel 2016 with the PowerPivot functionality.

              In any case I am happy I found a solution. Thanks a lot for your support!

Leave a Reply

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