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:
- The online CBC TRAC bug reporting system (which you will have to register for), or
- 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.
Can anyone help me in solving an optimization problem which has got 27 variables. Please reply to my mail ID email hidden; JavaScript is required. I will send across the data.
GREAT JOB!
Thank you…
I have a MILP with approximately 2000 variables and 2500 constraints. It solves it in seconds with my 3 year old laptop 🙂
Thank you again…
You should thank the CBC folks for writing such good optimisation software…
PERFECT!!!!
PERFECT!!!!
PERFECT!!!!
1000 times faster than standart solver. Thank you for your great job. God bless you!!!!!!!!!!!!!!!!!
I would be surprised if that is the case… maybe you were not telling Solver that the model was linear? OpenSolver just assumes this (because it cannot handle non-linear models).
im sorry to be a doosh bu seriusly how do you call it open solvewr when its closed on OSX ??
call it windows solver or somthing. ITs redundant since the only people havisn issuesd with solver , are those on a MAC!
GEEEEEZ!
Who says it is “closed” on OSX? We would love a volunteer (such as yourself) to make an OSX version… it should not be that hard as the code is in VBA, with very little of the code being Windows specific.
We are running a large LP flood control model using your solver and it takes many hours to complete a run. I’ve considered upgrading my 4GB computer to a new computer with more memory (8-24 GB). Would this help? Your run-time text says something like “writing model to disk.” Does this occur when the RAM capacity is used up (similar to the Windows page file) or is solver programmed to always write the model to the hard drive before solving it? Thanks, Nathan
Flood control; what a great application for optimization. Big models can be slow with OpenSolver. OpenSolver firstly analyses the model by changing each decision variable and re-calculating the spreadsheet each time; this is normally the slowest step. You can watch OpenSolver count up thru the decision variables in Excel’s ‘Ready’ status display as it does this step. It then writes the resulting model out to a text file (which it does regardless of the amount of memory you have); this should not be too slow as long as you are not working over a network. (It writes to something like c:users[logon name]AppDataLocalTempmodel.lp.) This file is then given to the CBC optimizer, which produces the result that OpenSolver loads back into the sheet. If you want it all to run much faster, I suggest you try the free SolverStudio that we also develop and support; see http://solverstudio.org This is aimed at users with bigger models, and will typically be much faster. We can help with the translation to SolverStudio if you wish. Cheers, Andrew
OpenSolver very useful. I am running a VBA problem using OpenSolver, running a few times to get around a non-linear problem .. is there a way to block the CBC ‘infeasible solution’ message?
If you are using a version of the VBA code at http://opensolver.org/using-opensolver#vba, then OpenSolver should give an error, not display a dialogue, if the problem is infeasible. If this is not happening, then I’d like to know so we can fix it in the next release. Thanks, Andrew
Hi Andrew! I’m using Solver 2.1 and can’t find the way to set a variable as integer. Would you please let me know the procedure? Once again thanks a lot for this great solver of yours.
Best
Ralph
Same as in Solver, you add a constraint specifying that the decision variable (constraint left hand side) must be ‘int’ (using the <=, =, >=, … pop down list). Cheers, A>
Before I start with my questions (I have a couple) I want to thank everyone on the development team for such a great product. Easy to install and use, free and top-notch.
Best regards,
Mario
I, already double clicked OpenSolver.xlam but it did not appeared in the data tab. my OS is Windows 8 and i’m using excel 2010, is the OS the problem?
We have not tested under Windows 8. Did you get any messages from Excel as it loaded up OpenSolver.xlam?
please ignore the previous query
sincere Thanks for making opensolver
for me the opensolver is giving an error that:
“the model cannot be solved as it has not yet been built.(at line 10210)(at line 19540)
source = opensolver nodel solving,ErrNumber = -2147220503 ”
Please help
Are you using QuickSolve perhaps? You should use the main Solver button. Andrew
sincere Thanks will making opensolver
for me the opensolver is giving an error that:
“the model cannot be solved as it has not yet been built.(at line 10210)(at line 19540)
source = opensolver nodel solving,ErrNumber = -2147220503 ”
Please help
No.
Hi there,
upon trying to solve my model, I get the error message that “instance 2 [of an Excel constraint] does not depend on the decision variables and is not satisfied”. However the specified cells DO depend on the variables via a countif function. Hence I would assume that OpenSolver will go ahead and try to find a solution. Is the error message wrong or am I?
Thanks for your help!
Your model is non-linear; CBC cannot solve models with ‘countif’ in them. The next version of OpenSolver uses NOMAD which may be able to find a good (but not provably best) solution. Andrew
Thanks a lot for your quick response! I will try to figure out a way to revise the model to make it linear.
Is there a definition or list of functions that are allowed in a linear model?
Keep up the good work!
I am having trouble adding binary constraints to the model.
When I build a solver model without any binary constraints, it optimizes fine. When I add in the binary constraints (added either as integer variables min/max 0/1 OR as binary) the optimization gives “No feasible solution”
For some reason the optimizer is not changing the binary variables at all (just set =0).
See my comments below.
Hi,
I have been using solver to optimize a problem.
I’ve set up the same problem in OpenSolver and get the error “OpenSolver could not find an optimal solution, and reported: No Feasible Solution”
The reason for this is that all the binary variables are set to 0 and Opensolver doesn’t seem to try changing them at all.
Note that I have them set up as integer constraints, max/min 1/0. Could this be a problem?
Using integer variables should be fine. Not sure what youer problem is; check your constraints carefully. There is no way that you can see if OpenSolver is trying 1’s for your binary variables; it is all internal. Andrew
Thanks for your reply.
I don’t think the problem is with my constraints, as the model is entered exactly the same in the current solver (which optimizes fine to a feasible solution) as the OpenSolver.
Is there perhaps a problem if calculations are being done on other tabs within the same workbook? I am really stuck, which is unfortunate as I really think your work is great!
Would you mind please emailing your spreadsheet to email hidden; JavaScript is required so we can work out what’s going on? Thanks, Andrew
Hi,
First of all thank you for this wonderful tool.
I tried to solve a linear problem using the solver but I found that for some inputs the result is not optimal. When I also noticed that when I decrease the Branch & Bound %Tolerance the result is more accurate (but still for some inputs it makes mistakes). Can you explain a little bit on the roll of the % Tolerance?
I would be happy to send you my file to get your feedback.
Thanks,
Alon
Alon, the Branch and Bound tolerance needs to be 0% if you want optimal solutions and have integer or binary variables. Otherwise, you get some solution that is guaranteed to be within the tolerance specified of the true optimal solution. Hope this helps. Andrew