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

  1. Hello,
    I have a quick question about Opensolver License.
    I understand anyone can use opensolver for free.
    Is it also free for enterprise?
    There are several solvers that can be linked up to Opensolver platform.
    CBC can be one of them.
    Using CBC, NOMAD, Bomin violates any rules/lincense if I use it commercially

    1. Free for all uses under GPL. But, if you change the OpenSolver code (which 99.999% of our users do NOT do), then please contact us. You can definitely use CBC and BONMIN; I am not aware of any restrictions on NOMAD, but please double check. Andrew

  2. I have big model with more than 100 constraints. The constraints in “OpenSolver-model” window are not organized in order, they are mixed-up. When I want to edit certain constraint, I take time to locate the desired constraint.
    I suggest to enable OpenSolver to automatically put the constraints in “OpenSolver-model” window in order based on the row number of the inequality left side. Or I suggest to add “move up” and “move down” feature to constraints section in “OpenSolver-model” window.

    1. That’s a good idea. We’ll add it to our (rather long) ToDo list. Thanks for reaching out to us. Andrew

  3. Hi,
    first of all I’d like to thank you for this great tool. Thanks for providing it freely.
    I’m trying to solve some kind of VRP (Vehicle Routing Problem) for my Bachelor Thesis.
    So basically what I’m trying to do is to calculate the distance I have to go until I reach my destinations. (I’m just using euclidean distance). Than I multiplicate this distance with some kind of customer value. The goal is to minimise this value. Therefore a customer with a high value should be preferred in the order of delivery.
    Only problem is that the Solver can’t solve it.

    Running with COIN-OR Bonmin it stops with the following error:
    Error -2147220504: Mismatched parentheses
    Non-linear parser failed while processing cell Tabelle1_P6. // This is where i calculate the time of arrival at customer 1

    Running with NEOS using Couenne it stops with:
    OpenSolver 2.9.3 encountered an error:
    Error -2147220504: NEOS was unable to solve the model because there was an error while running AMPL. Please let us know and send us a copy of your spreadsheet so that we can try to fix this error.

    I’m running it on Excel 2016 64-bit version on an Acer Swift 3 laptop with an Intel Core i7-7500 and 8 GB RAM.
    Can you give me some advise to fix this problem? Could the 32-bit version be the solution?

    Regrads from Germany
    Chris

  4. I have been experiencing a problem for the last year that I simply cannot figure out. I have tested, experimented, and modified my program to no avail. Now, I am reaching out to see if any others have had the same issue.

    I am running OpenSolver on three laptops and one really nice desktop. Two of the laptops are running INTEL processors (I5 and I7) while the third is using an older and very basic AMD A10 processor. These three laptops run my project very nicely and ALWAYS yield a solution with only varying speeds of completion. These laptops are running different versions of EXCEL (7, 10, and 16) and both 32 and 64 bit versions represented.

    The problem is with the desktop running OpenSolver. This computer is equipped with Windows 10, Microsoft EXCEL 2019 (64 bit), an AMD Ryzen 7 2700X Eight-Core processor, and 32 MB of RAM – this system should blaze through to the solution; however, it often freezes up AND, based on extensive testing, this ‘freezing up’ may be dependent upon the number of variables in the data set.

    My project is for scheduling. The program can run in two methods: one-hour block scheduling which currently has 8,275 variables or in 30-minute block scheduling which has a much larger 25,707 variables. All three of the laptops yield wonderful results whether it is for 8,275 variables or for 25,707 variables (it just takes longer for the latter). The desktop, on the other hand, only consistently finishes the process for the smaller 8,275 variable data set (it has, on rare occasions, finished with the 25,707 variables but that happens only approximately on one run out of every 40 attempts). The data set is identical for the all four computers.

    During execution of the process the desktop may freeze during the time when the status bar is displaying something like “OpenSolver: Setting Up Problem… ”. However, sometimes, the updating of the status bar slows to a snail’s pace and only increases one variable at a time and NEVER finishes. At other times, it does finish with the setup and freezes at the “Saving to disk” part of the operation. Then there are the times when the status bar disappears all together before the process has completed! When the desktop freezes only a Ctrl+Alt+Del will close down EXCEL. Initially, I thought that this issue may be CPU-related but I have since reconsidered and now believe that the problem is within EXCEL 2019.

    Have others had similar problems with EXCEL 2019 when running large amounts of variables? If so, was there any corrective action that eliminated/minimized those issues?

    1. Thanks for your detailed description. We have not come across this issue and would welcome further input from OpenSolver users. Andrew

    2. Thanks for your detailed description. We have not come across this issue and would welcome further input from OpenSolver users. Andrew. PS 64 bit Office does odd things for us. Have you tried 32 bit office?

      1. Andrew,
        Thanks for the suggestions and ESPECIALLY thank you for this wonderful tool! I uninstalled Office 2019 and then reinstalled the 32-bit version all while keeping my fingers crossed. Unfortunately, I am seeing the same behavior… the program starts advancing the variables very slowly (one at a time when ‘OpenSolver:Setting Up Problem…’ is shown in the status bar) and then seems to do better but then the status bar is suddenly blank and the computer just hangs. Excel must be restarted using Ctrl+Alt+Del.

        I am successfully running EXCEL 2016 64-bit on an ASUS laptop and never had any issues. I suspect that something is amiss with the EXCEL 2019 version because it runs great on EXCEL 2007, 2010, and 2016. I will continue digging into this issue and I am certainly open to try any other recommendations that you may have!

        1. Please do continue to explore this; we would love to get to the bottom of this. It’s interesting that the 32 bit Office was not any better. Andrew

          1. Update: I have continued testing and can now confidently report that installing EXCEL 2019 32-bit definitely causes less freeze ups than EXCEL 2019 64-bit; however, the freezing still occurs albeit much less frequently. I am still puzzled as to why the less equipped laptops can deliver a solution time-after-time with ZERO issues and this ‘way more powerful’ desktop has problems???

            Fortunately, I am now seeing OpenSolver run to completion on an average of four out of five attempts (which is a huge improvement over the approximate one success out of 40 attempts I experienced with EXCEL 2019 64-bit) – so, after a plethora of run cycles, I can conclude that the 32-bit of EXCEL 2019 is much more stable… at least with my model and data set.

            I will continue to dig into this strange behavior! It would be great if Microsoft would allow me to install EXCEL 2016 on this desktop (I do have purchased copy but it is loaded on one of my laptops). This approach would allow me to see if the problem is with EXCEL 2019 – which is what I am suspecting now. Regardless, hopefully, with continued testing, a concrete explanation and solution will be coming soon!!!

            1. Thanks for perservering with this. VBA does strange things on multiple runs, perhaps because of memory management issues. Quitting and restarting Excel for each run may make a difference? Andrew

              1. Resolved! The situation causing the problem has finally been identified; however, it is still a mystery as to why this is an issue in EXCEL 2019 while it is NOT with earlier versions of EXCEL. I researched and attempted many possible solutions only to see that the issue still remained until I quite accidentally stumbled upon the fix. But I fix I have, nevertheless!

                A little background information on my project. I am using EXCEL’s VBA to set up my project and to run OpenSolver. As part of the operations, data is exported (via VBA code) from one EXCEL workbook into the second workbook – and both of the workbooks contain a significant amount of VBA code (the main workbook that runs the project has 13911 lines of code while the other has 8871 lines).

                As I made an adjustment to some of the VBA code in the workbook where data is pulled from, I failed to turn the ‘Design Mode’ off on under the ‘Developers’ tab in EXCEL. Not realizing this oversight, I went ahead and attempted to run the program and it ran to completion. Great, but this does happen occasionally, therefore I ran it a second time and it again ran until finished. Now I was asking myself what was different because I have not had two back-to-back successful runs on this desktop???

                The code changes I made were first investigated – these were simply one-second delays I put into two areas to see if this would help prevent the freezing. I commented these lines out and saw that the delays had no impact and the program still finished. This is when I noticed that the ‘Design Mode’ was on in the inactive workbook… could this be what was permitting smooth and complete execution of the program? I turned the Design Mode’ back off on the inactive workbook and attempted to run the program and saw EXCEL and OpenSolver froze up before completing… just as it did earlier. Ctrl+Break had no effect so I had to Ctrl+Alt+Del to shut EXCEL down completely though this time I was excited to do so as a solution may have appeared on the horizon.

                So, after repeated testing, I can confidently report that placing the ‘Design Mode’ to on within the workbook where data was imported from that NO freezing would take place. Plus, the strange behaviors I saw with really slow advancement of the number of variables during the “OpenSolver: Setting Up Problem… 3654/25707 vars, 14928 rows” was also no longer an issue (earlier, it would suddenly slow down to a snail’s pace and advance one variable at a time… until it ceased advancing altogether – now, it consistently advances at an average of 20 variables at a time on the larger model). With 95% certainty, I am claiming that this fixed my problem.

                Hmmm… now my theory. There is some bleeding over / cross contamination / misdirection from the VBA code within the two macro-enabled workbooks that are concurrently opened in the session and this is what is causing grief for EXCEL 2019. Running the project with a smaller number of variables (at approximately 8275) was much more forgiving than 25707 variables as the smaller volume of variables was generally solved with OpenSolver even with the ‘Design Mode’ in the off configuration. This is juxtaposed against the data set with 25707 variables as it rarely would be solved but after making this change to the ‘Design Mode’ to on in the inactive workbook, it solves it Each and EVERY time!!!!

                Based on the purpose and operation of my project, importing the data is a key design feature that facilitates ease of use. So, two EXCEL workbooks will always be open as my project starts running. I do, however, have the option of either using VBA to close the one workbook once the data is exported or to simply turn the ‘Design Mode’ on in that workbook – easy to do options. It is grand to have this issue identified and know what to do to prevent the freezing up of EXCEL and OpenSolver. Again, I have no problems with any freezing with EXCEL 2016 and EXCEL 2010 even when solving for the larger number of variables. This is not the case for EXCEL 2019 as it simply did not like this regardless of whether 32-bit or 64-bit was employed.

                1. Well done sorting this out. That is a very odd bug. I wonder if VBA is running out of memory in some way? Pleased you got it working. Andrew

                  1. I just wanted to give a somewhat long-term follow up to my earlier problem just in case someone else has a similar issue. I did include code to close one workbook after the data was pulled into the active workbook – that was four and a half months ago. Since then, the program has been performing flawlessly AND solving some very complex scheduling problems!

                    1. I am pleased that you fixed the problem; closing workbooks presumably helps VBA with memory management, and so avoids slow downs as memory becomes short. Andrew

  5. Hello,it’s my first day to use open solver, I installed it to solve model, but I have a problem that I can’t solve. It has an error window:

    Could not find the Solvers folder in the folder containing OpenSolver.xlam, indicating OpenSolver has not been properly installed. Make sure you have unzipped all files from the downloaded zip file to the same place.

    Has anyone ever had a problem like this?
    Thank you for help!

    1. Have you unzipped the full OpenSolver folder, and then opened the OpenSolver file in the resulting un-zipped folder? Andrew

  6. Hi there,

    Thanks for OpenSolver firstly. I am trying to run a model that has 15,000 variables and a dozen constraints but it is sluggish as it is adding variables 20-30 at a time. The solve itself is instant (linear model). Is there a way to speed it up? I don’t think the formulation is necessarily that complex and other models I have built with OpenSolver also add variables at 20-30 at a time (at the same rate), so it seems the model solve time just goes up as a linear function of number of variables (or is it the underlying formulation?). I’m not actually that well-versed in this area so any guidance would be appreciated, thanks in advance.

    1. For context, if it is relevant, I am running it on multi-CPU core machine and RAM amount that is far from 100% utilised during the model setup. No other significant processes running in parallel.

    2. OpenSolver has to re-calculate the spreadsheet 15,000 times, once for each decision variable. Making this quick will help, eg by ensuring there are minimal other calculations on the sheet, and no graphs. A faster approach is to use our SolverStudio Excel add-in; http://solverstudio.org . Cheers, Andrew

  7. Hi,
    When solving my model with OpenSolver, the value of my objective function is displayed in a “report window” but the spreadsheet is not updated (the decisions variables automatically entered by the OpenSolver do not lead to the same objective function value, one that is “worse”). How can I have the optimal decisions variables entered in the spreadsheet?
    Thank you in advance.

    1. That is most odd. If the errors are small, it is to do with numerical accuracy; that’s life. If they are big, then your model is probably non-linear. Andrew

      1. Thank you for your answer.
        My model is linear and the difference in the objective value is quite big. However, I do get the following error message:
        “Could not get sensitivity analysis due to binary and/or integer constraints.
        Turn off sensitivity in the model dialogue or reformulate your model without these constraints.
        The CBC solution has been returned to the sheet.”
        Does that help you understanding the issue I am facing? I really need to be able to run this model.

        1. I am sure this i just numerical issues. I suggest you look at the model LP file, and also the solution file, both of which will be available in the folder opened under “View all Opensolver Files”. Then you can see the raw data that CBC produces, and work out why this differs from Excel. Please remember that very small values for the objective can have large errors. What are the two values you get for the objective? Andrew

          1. I had a look at the Solution File and, after some calculations, it seems like the solution displayed in the temporary window does not take the fixed costs into consideration (even though they are included in the formula in the cell with the objective value).

  8. Hello,

    I would like to solve a mathematical problem using a solver.
    The objective is to minimize the cost of the purchase of a raw material inventory based on the previous parts produced.
    I am using as variables the dimensions of the raw material I will have to purchase.
    My inputs are the dimensions and quantities of billets/pieces of raw material I used for past jobs.

    I managed to express my problem mathematically and am trying to solve it using your solver.
    I am having errors and would need the help of someone if possible.

    Please, if you are interested in helping me to solve this puzzle, feel free to contact me at my email address: email hidden; JavaScript is required

    Gui

  9. I have created a model with 4 target variables that are modified to reach a solution and min/max constraints on them… When I try to solve the model the 4 target variables are set to 0 and I get lots of Excel Errors as a results as these variables never should be 0. The problem is that these 4 target variables SHOULD never be 0 because this is below the minimum constraints. What is going on?

    1. I assume you are using the CBC solver which solves linear problems. However, in a linear model, you can never get Excel errors in the model when values go to 0. I suspect your model is not linear. Andrew

  10. Hello, I’m a new user (who can’t using Open Solver Add-on because of google).
    I have two questions :
    -Can we use the solving method “Standard Evolutionary” ?
    -Is there a “on Change event” in the Open Solver Add-on ? Which could help me to use the solver without to click on the button.

    Thank you for your attention,
    Best regards

  11. My colleague recently introduced me to Open Solver. It can handle many more integer variables compared to the free version of Frontline solver, and that is a big plus for your solver.

    Can I find the dual values/shadow prices, the binding constraints and such details, after running Open Solver?

    1. Yes; please see the “Sensitivity Analysis” setting in the Model dialog. Hope this helps. Andrew

  12. Please can you answer my question below:

    How many variables and constraints can ‘Open Solver’ handle as the normal built in excel solver can handle only 200 variables and 100 constraints

  13. Hi OpenSolver development team,
    I am currently teaching a class in Operations Research and as part of the class we are using your OpenSolver software. For a current project we are developing/solving a TSP in Excel with 19 cities. On my machine OpenSolver with the CBC solver solves the problem in about 30 seconds which is quite good! That said, some of my students have implemented the exact same model I have but their solver runs for 10+ minutes without converging. After playing with their file for some time I noticed that rearranging the order the constraints are added to the model fixes the problem.

    My questions are: Is this time dichotomy something that can happen? Is OpenSolver sensitive to the order constraints are loaded/listed in the model and, if so, is their an `optimal’ order?

    Thanks!

    1. An Integer Program can be very variable in the time it takes to solve. Nothing you can really do about that, sorry. Andrew

  14. Hello.

    An error message pops up when I try to solve with linear engine solver with a constraint that is divided by another cell. Eg. =Sumproduct(A1:B5,E1:F5)/C20.

    However it is able to solve when I divide the the constraint with a number Eg. =Sumproduct(A1:B5,E1:F5)/0.80.

    The error message is as follows: There is an error with the function or the value cannot be divisible by 0. (#VALUE, #DIV/0!)

    Any advise would be greatly appreciated. Thank you.

Leave a Reply to Paddy Cancel reply

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