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.

As of July 2025, there are two known issues caused by Microsoft code changes. These are a RefEdit issue that breaks the Model dialog (see #6 below; a user can easily fix this) and a DLL access change that impacts NOMAD (see #10 below; fixing this requires editting VBA code).

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’ and ‘Compile error: variable not defined’: Missing Reference & Blocked ActiveX RefEdit Errors (updated July 2025)

July 2026 update: OpenSolver uses the ActiveX “RefEdit” control.  If this is not accessible, then you may get a “compile error: variable not defined” error (at a line containing “refObj”) when you open the Model dialog. I have also had a “Run-time  error -2147352573 (800200003)  Could not find the specified object” occur when clicking the “Model” button.

According to StackOverflow, the default setting in Excel has recently changed to a stricter level and this disables controls from external libraries like RefEdit. So, in recent Excel versions, permission to use ActiveX controls must be turned on in the Excel Trust center. To do this, use File…. Options… Trust Center… Trust Center Settings to select “Prompt me before enabling all controls with minimal restrictions” (with “Safe mode” turned on); see this screenshot. (Thanks to jkpieterse for replying on StackOverflow with this information, and for Ziad for sharing the settings that worked for them.)  It also works for me selecting the slightly safer “Prompt me before enabling Unsafe for Initialization (UFI) controsl ith additional restritions and Safe for Initialzatrion (SFI) controls with minimal restrictions”. Note that this change also causes Frontline’s Solver to crash with the error “Solver: An unexpected internal error occurred or available memory was exhausted.”

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.

10. “About OpenSolver” menu crashes; NOMAD crashes (updated July 2025)

July 2025: A recent update to Excel has blocked access to the “OpenSolverNomad.dll” file that we use to execute the NOMAD solver. Symptoms of this include the “About OpenSolver” window crashing with an error: Run-time error: ’53’: File not found: OpenSolverNomad.dll
(This error occurs even though OpenSolverNomad.dll is located in the Opensolver folder under Solvers/win32 and Solvers/win64.) OpenSolver Errors also occur when trying to use the NOMAD solver.

These errors occur because Microsoft have restricted Excel’s access to DLL’s (which is what we use for Nomad). To fix this in OpenSolver you need to edit the code. (We will release a fix at some stage.) For more information, see this Microsoft Community post (also available locally). One of our users, Ed, says “I can confirm that adding the full path in the [NOMAD DLL] declare statement works”. See also this StackOverflow post.

Note: This has been confirmed for “Microsoft® Excel® for Microsoft 365 MSO (Version 2507 Build 16.0.19029.20136) 64-bit” installed as part of “Microsoft 365 Apps for Enterprise” on 12 Aug 2025.

2,231 thoughts on “Help”

  1. There’s an option on the bottom of the Model for:

    “Shadow Prices: [check] List constraints and shadow prices in a table with top-left cell: [cell]”

    What is this used for? Is there a way to list constraints in spreadsheet form versus filling them into the Constraints table? I’m looking for a way to organize and track constraints a bit better.

    Thanks!

    1. I’d suggest using SolverStudio if you really want to make your constraints organised. Otherwise, try Googling Shadow Prices to find out about this feature. Cheers, Andrew. PS: Viewing the .lp file will help you check your constraints.

  2. I have a question about opensolver, I just download it but it doesn’t work. When I press Solve it says that it could not find the file
    The ErrNumber = -2147220501

  3. Hello everyone,
    I dowloaded open solver and install it, but it doesn’t appear in the ribbon Data.
    What can I do?
    Thanks
    bye

    1. Remember, OpenSolver does not need installing unless you want it every time you open Excel. Simply double clicking OpenSolver.xlam (or OpenSolver…. you may have the .xlam extension hidden) makes it available in Excel until you quit. Andrew

  4. Hi,

    I really like your tool! Thanks a lot for sharing it!

    I have 2 questions-

    1) After I work with the tool and close the file, when I reopen it the OpenSolver doesn’t appear… Any ideas how to solve that? (I saw that this Q has been asked already)

    2) I want to create a discount for # of products (quantity) and for total purchase amount. I wish that my problem will check if it is better to buy more products from someone (or in more money) to gain a better discount rate, and if so will change the result accordingly. I have no idea how can I do that without using the If function (but this is NonLinear) and really appreciate any assistance!

    Thanks!

      1. Hi,
        No, that’s from real life situation 🙂

        Say I have 5 stores that can sell me 15 products (identical). Each gives me a price list. For every item. I can also create 1 product from 2 stores instead of buying 100% of the item from a specific store. Therefore I have another price list to do the mixes (meaning prices for 50% of each product).
        Now, to do the optimization is easy, but when they said that if I buy mors between 5to 9 products I will get x% reduction, and if I buy 10-12 y% discount and 13 z%… each discount % is different between suppliers and the price list (i.e for 100% product and for 50%)…

        I tried different approaches but couldn’t find a solution… I wonder if you have a suggestion, since you are the expert 😉

        Thanks!

        1. An easy (tedious) apporach is to create more products, so you can buy 1 of “5 products with an x% reduction”, or 1 of “6 products with an x% reduction”, etc. Andrew

          1. Thanks for your response! I am missing something- if I create discount products in addition to the price list I have, it will choose them for sure… but how will the tool know that it needs to pick 5 products to be able to use that producr price?

          2. Hi Andrew,

            Sorry for asking that again, but I was hoping you can explain what you said…

            If I get different discount rates based on the amount I purchasing from the store than I have a nonlinear model (as far as I know)…

            What you said if I understood correctly is to add a fictive price list with prices after discount, but then the optimizer will choose them (since he can’t tell that he need to buy in a certain amount of the discount to take place and if it is better to buy even more to get increased discount).

            Combining/tying the discount rates with the amounts to buy from each supplier is what I can’t understand how to build using OpenSolver.

            Thanks!

            1. You can manually enumerate all the purchase options, and use binary variables that determine which ones you select. An option is purchasing some predetermined quantity at some total price. Andrew

  5. I’ve got an odd item, the excel solver solves this easily, but not opensolver.

    [A] [B] [C]=[A]*[B]
    Constants Variable Derived
    1 1 1
    2 1 2
    3 1 3

    Total 6
    Target 2
    Difference 4

    Variable constraints are integers between 0 and 1

    The goal in the model is determine which items add up to the target.

    For the excel solver this is easy.

    Opensolver just seems to do something with the last item, but ends up at all zero’s.

    See: http://goo.gl/g0PK8s for a sample

    Windows 7 / Excel 2010. Other models work fine.

    Am I missing something super obvious?

    1. Thanks for your feedback. We are the ones missing something obvious in that we build the objective function assuming it is zero if all the decision variables are zero (i.e. assuming the constant offset ‘target’ in your sheet is zero). Try setting the value in the Target cell to 0, and then specify a target of 2 in the OpenSolver dialog; then it will work. We are fixing this now in the code. Thanks for taking the time to point this out to us. Andrew

  6. When I download and install opensolver on my new Win8/Office 2013 machine, it will be available and work during that excel session, but once I close excel it is gone and I have to run the install executable for it to show up again. How can I fix this?

  7. Downloaded OpenSolver2.1 on a Windows with Excel 2007 and keep getting VBA error message “Compile error: Can’t find project or library” when trying to run OpenSolver. In the VBA, the error message is occurring at line 8170 where “NumConstraints = Val(Mid(Name….. ” and the “Mid” is selected.

    Any ideas for how to resolve this or what I may have done incorrectly to arrive at this?

    Thanks in advance for any help!
    Geoff

    1. A VBA error message “Compile error: Can’t find project or library” normally indicates a problem with RefEdit in your Excel installation. (Try adding a RefEdit control to a VBA form to test this.) Using Excel’s “Repair installation” should fix this. Hope this helps, Andrew

  8. Hi,
    I am facing an issue in Solver using VBA.

    I have put my constraints…below is the code

    SolverReset
    SolverOk SetCell:=”$X$39″, MaxMinVal:=1, ValueOf:=0, ByChange:=”$V$16:$V$37″, _
    Engine:=1, EngineDesc:=”GRG Nonlinear”
    SolverAdd CellRef:=”$V$16:$V$37″, Relation:=1, FormulaText:=”$U$16:$U$37″
    SolverAdd CellRef:=”$V$16:$V$37″, Relation:=3, FormulaText:=”$T$16:$T$37″
    SolverAdd CellRef:=”$V$39″, Relation:=2, FormulaText:=”$D$8″
    SolverOk SetCell:=”$X$39″, MaxMinVal:=1, ValueOf:=0, ByChange:=”$V$16:$V$37″, _
    Engine:=1, EngineDesc:=”GRG Nonlinear”
    SolverSolve userfinish:=True

    When i execute it line by line (using F8) its working fine…but when i try calling the procedure…its not working

    Thanks in advance

    Thanks!
    Rajvarman

    1. This sounds like a general VBA (non-OpenSolver) problem, perhaps caused by you not adding a reference to a library?

  9. I am using Opensolver to structure a bond financing. I have two questions, if anyone can help. The first is, I am solving against a revenue constraint, meaning that debt service (principal * coupon) plus total interest in previous year cannot exceed the revenue constraint. Opensolver solves this nearly perfectly, however, the variable cells need to be in 5,000 increments, as a bond is only sold in 5,000 denominations. In a normal model, I would use the Floor formula. Is there a way to add a constraint that forces the 5,000 denominations through the use of a formula or something? I tried to add another cell which referred to the variable cell for the Floor function, but this caused the solve to think that the model was not linear and would not provide a solution. Any help on this matter would be greatly appreciated.

    The second question, is it possible to force certain constraints to be satisfied first, or in a particular order?

    Thanks again for any help anyone can offer.

    1. The floor function is a discontinuous nonlinear function, so it won’t work with the linear solver. You can however, model your problem as a discrete linear model. To force $5000 increments, you should define an cell to represent the number of $5000 increments, make that cell the variable, require it to be integer and make the original cell equal to $5000 times the value of the new cell.
      Integer problems can be much harder than continuous problems so depending on the size of your problem and a lot of other factors, the solve time will likely increase.

  10. I downloaded and have been working with OpenSolver about a month back. This thing is awesome. That said:

    I have been trying to work on a larger scale problem however (e.g. > 250K decision variables) and it seems to be more than OpenSolver can seem to handle, at least on my machine (2.4 Ghz, 4GB RAM, 32 bit XLS). Left overnight it had only set up 200 of 250K variables.

    Should I switch over and try to use SolverStudio or simply try to find a machine with more computing power? Outside of redesigning the LP, any other recommendations on improving processing speed?

    1. 200 out of 250k overnight seems very slow… is the workbook very complicated? OpenSolver will be faster if you delete all sheets/plots etc that depend on your model’s cell in any way. If this doesn’t help, try SolverStudio. SolverStudio virtually gets rid of the model set-up step, but you will need to learn a modelling language. If you have 250k decision variables, then you really should use SolverStudio. Email me if you need help doing this. Cheers, Andrew

  11. Hello everyone,
    If you are having problem with solver installation, then whynot use Goal seek, which is already installed in your excel, it can be found under Data > What-if Analysis > Goal seek ( Excel-2007 method). Hope this helps 🙂

  12. Hi there,
    I am using Open Solver for a transport distribution model with good results, thanks.
    Will you please assist with the following data input issue?

    All data sets in my workbook are defined as named ranges.
    In the open solver model window it accepts the named ranges but converts it to specific cells once you run the model. How do I keep the data sets as variable ranges?

    Thanks

    1. Thanks for your post, and positive feedback. The issue of named ranges is subtle. OpenSolver (and Solver I think) translate named ranges into a fixed underlying range, which means using formulae in named ranges does not work. I think Solver then translates this back into a named range to display if the underlying range matches a range; OpenSolver doesn’t currently do this, partly because it is cosmetic with adding any more functionality. However, our more advanced SolverStudio add-in stores the range directly as entered, which means that you can enter formulae into your named range which adds a lot of flexibility. This may be more than you wanted to know, but we have thought about this quite carefully in designing SolverStudio! Cheers, Andrew. PS: My summer student is currently finishing a ready-to-use transportation model for SolverStudio, which would make it easy for you to switch to SolverStudio and solve bigger problems more quickly.

Leave a Reply to Rajavarman Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.