Skip to main content

BARON Frequently Asked Questions

Welcome, Anonymous

This page is for general questions about using BARON and solutions to common error messages. For further technical support, please contact




Error Messages and Solutions







What is BARON?​

BARON is the world's best global optimization solver for mathematical programming problems, solving LP, NLP, MIP, and MINLP problems. Since 2001, BARON has been a key product used by Fortune 500 companies, national research labs, universities, and more.




How do I license BARON?​

Purchasing a BARON license allows users to run multiple jobs on multiple processors with no restrictions on problem size. For purchasing instructions, please see our BARON Licenses page.




Can I get a free academic BARON license?

Currently, we provide free academic licenses only to those affiliated with Carnegie Mellon University, the University of Illinois at Urbana-Champaign, or the University System of Georgia. However, all academics get special academic pricing on all BARON licenses. Academic licenses come with full features and have no restrictions on problem size. For more information, please see our BARON Licenses page.




How long does a BARON license stay valid?

All BARON licenses are perpetual. You only pay once, and your license is valid forever. You also get free access to all versions of BARON that are released within a year from your purchase.




Can I get access to new versions of BARON with my license?

By purchasing a BARON license, you get free maintenance and support for the first year after your purchase. After the first year, you can choose to renew your BARON maintenance to continue accessing all upgrades and technical support for another year. If you choose to renew after a lapse in maintenance, we will charge the annual maintenance fee for the period that was not covered. Renewing is strongly recommended for all users.




Can I run BARON on two computers with one license?

Yes, you only have to purchase one license. By purchasing a BARON license, you get the freedom to run multiple jobs on multiple processors using BARON. You also get to use BARON on any combination of hardware and operating systems for which BARON is available.




Does my license allow me to run BARON simultaneously?

There are no restrictions on the number of instances you can run simultaneously. The user can run BARON on as many platforms, operating systems, and compute units as desired.




What platforms does BARON support?

BARON runs on Windows, Linux, and OS X.




Can I use BARON offline?

Yes, you can use BARON offline with a license.




What are the minimal hardware requirements to run BARON?

BARON runs on 64 bit CPUs. While there is no way to predict what computational resources BARON will require for your problem, BARON is very light in hardware requirements. BARON will solve many problems even with a couple of hundred MBs. It uses dynamic memory allocation and will inform the user if a problem is too large to solve on your hardware.



Error Messages and Solutions




What if I get the following error: 'A valid BARON license is required for this model'?

You need to purchase a BARON license for your model size.




What if I get an error message saying my new license file is not valid for this version of BARON?

You may be running an older version of BARON, while your license may only be valid for newer versions. Either eliminate the old version from your installation or change your PATH to give preference to the latest version.




What if I get an error message saying that the license file cannot be found?

Check that you have included the complete path to this license file in your system PATH. As an alternative, you can use the licname option. On a UNIX system, try something like this


LicName: "/home/nikos/baronlice.txt";

On a Windows system, try something like

LicName: "c:\Users\nikos\baronlice.txt";

You will need to include the above line in the OPTIONS section of your .bar file or find out how to use your modeling system to pass BARON options.




What if in Windows I get an error message saying that the license file baronlice.txt is invalid?

Some Windows editors introduce end-of-line characters that invalidate the license. Please copy the license file to the desired location without opening it in an editor. Additionally, make sure that you are using a version of BARON that is dated after the license's effective date. This may be a good time to update to the most recent BARON version.




What if I get an error message saying there was an error opening the timing output file?

Try to run BARON from your computer's command line to ensure that the license is valid and the executable was not corrupted during installation. For instance, on a Windows machine, type ‘cmd’ where it says 'Type here to search.' Then, navigate to the folder where the baron.exe is installed and do ‘baron.exe path-to-file-to-run’.




What if I tried using the option CompIIS, but BARON didn't provide the result as in the BARON manual?

Please look at the results file. That is where BARON reports the IIS.




What if I tried running BARON with CPLEX, but BARON didn't find the CPLEX libraries?

If BARON is having trouble finding the CPLEX libs on your computer, make sure to add the folder that contains the libraries to your system's dynamic library path, not just the system path. Additionally, the operating system may need time to update its internal tables. An easy way to address this issue is using BARON's cplexlibname option to directly specify this directory.
On a Linux system, this would look like the following, with the term in quotes showing where you have stored the CPLEX libs:
cplexlibname: "/opt/ibm/ILOG/CPLEX_Studio221/cplex/bin/x86-64_linux/";
On a Windows system, this would look like the following, with the term in quotes showing where you have stored the CPLEX dll:
cplexlibname: "C:\Program Files\ibmcplex\cplex2211.dll";;

What if Pyomo cannot find the BARON executable in my Linux system, how do I put BARON in my system path?

In order for Pyomo to find the BARON executable, you will need to put the BARON executable in your system path. On a Linux system, issue the following command from a terminal:

echo $PATH

It will give you a set of folders. If the BARON executable is not in one of those folders, you will need to add the BARON location to your system path. For instance, if you installed BARON in /usr/local/baron, then do the following and also put it in your .bashrc file:

export PATH=/usr/local/baron:$PATH



I have an issue with the MATLAB/BARON interface. Where can I get help?

Please visit our MATLAB/BARON FAQ Page for solutions to common error messages. For further technical support, please contact







How do I set up BARON?

You must install BARON and your BARON license in your system PATH. Here are specific instructions:

  1. Download the BARON executable for your platform from BARON Downloads.
  2. Put the BARON license file, the BARON executable, and any dynamic libraries distributed with it in a folder in your system (on Windows, the BARON installer will help you install the BARON executable and libraries).
  3. Add your BARON installation folder to your system PATH.
  4. Run 'baron' from a terminal or use BARON through Pyomo or MATLAB.

For Step #3 on Windows:

  1. Right-click on the Start Button
  2. Select “System” from the context menu
  3. Click “Advanced system settings”
  4. Go to the “Advanced” tab
  5. Click “Environment Variables…”
  6. Click the variable called “Path” and click “Edit…”
  7. Click “New”
  8. Enter the path to the folder containing the binary you want on your PATH. For example, to add the folder C:\baron, add:





How does BARON solve mixed-integer nonlinear programming (MINLP) problems?

BARON pioneered the branch-and-reduce algorithm in the 1990s to solve mixed-integer nonlinear programming problems. Since then, many other codes have followed in BARON's footsteps. For an in-depth discussion of the algorithms in BARON, please visit our BARON Publications page.




How does BARON prove infeasibility?

BARON proves infeasibility only when it declares a valid relaxation infeasible. BARON's relaxations may be linear, integer, or convex nonlinear. BARON never relies on the local solution of nonconvex NLP subproblems since doing so does not provide an infeasibility certificate. Similarly, if a local NLP solver times out, this provides no proof of infeasibility. In most cases, BARON's valid infeasibility proofs come from infeasible LPs or infeasibilities in constraint propagation. Even then, BARON has mechanisms to ensure that the LP solvers, for instance, do not make false infeasibility claims.




What is the largest problem size that BARON can solve?

BARON uses dynamic memory allocation and adapts its solution algorithms depending on memory availability on your computer. The size of models solved by the software is limited only by the amount of memory in your hardware.




Does BARON support parallel computing for solving MINLPs?

BARON uses multiple cores only when there are integer variables in the problem. It does so only during the lower bounding step of the algorithm by launching CPLEX or CBC in parallel mode.




Can BARON solve MINLP problems with linear inequality constraints?

As long as your objective function and constraints are available in algebraic form, BARON is capable of solving such problems. For examples and executables, see the BARON Downloads page.




Can BARON find multiple local optima?

During the search for a global solution, BARON may identify many local optima. In the screen log and the results file, BARON reports all local optima that improve the incumbent. At the end of the run, BARON returns the best local optimum found.




Can BARON deal with an optimization problem that has MANY mixed integer/binary variables, and the objective function is nonlinear (quadratic)?

Yes, BARON can deal with this class of problems. Whether it can solve a problem in a reasonable amount of time depends on structure and difficulty and not size alone.




Can I do black-box (derivative- or model-free) optimization with BARON?

For some optimization problems the objective and/or constraints must be evaluated by calls to simulators. Algorithms for this type of problem are referred to as derivative-free, model-free, or black-box optimization algorithms. BARON requires algebraic expressions of the objective and constraints. The same goes for interfacing BARON with Pyomo, Matlab, or any other modeling language. However, we are planning to offer another software for black-box optimization in the future.




How do I make parallel instances of BARON save their temporary files in different locations?

BARON writes results in temporary files during execution. BARON uses a default name for every such file—unless the user specifies otherwise. You have complete control of these names and can choose whether or not BARON even writes these files. See the `Output and file name options' section in the BARON manual.




Can I convert my problem formulation in BARON to a standardized format, such as AMPL or GAMS?

Unfortunately, no facilities are available for converting from BARON to other formats.




How can I change the maxTimeLimit parameter through the Pyomo interface?

You can pass BARON options through a suitable dictionary as an option to your call to the solve method.


For example:

results = SolverFactory('baron').solve(model, options={'MaxTime': 1000})


Use the options keyword to set any of the options listed in the BARON User Manual.




How can I track the progress of the optimization process with the Pyomo interface?

To view the stdout logs of BARON, you need to use the keyword tee with your solve command. Further, if you would like to inspect all the files generated by BARON, you need to use the keepfiles keyword.


For example:

results = SolverFactory('baron').solve(model, tee = True, keepfiles = True)


In the BARON User Manual, check out the NumSol option to request multiple feasible solutions at the cost of more computational time.




How do I set up starting points through the Pyomo interface?

Pyomo will pass starting points to solvers. BARON does not require all variables to be specified for the starting point.




How can I make JuMP show me the .bar file it generates?​


model = Model(()->BARON.Optimizer(ProName="PATH_TO/"))

the .bar file that JuMP generates for BARON will not be deleted, unless another solve overwrites it.




Can you build a BARON model iteratively?

BARON's parser does not offer an iterative mechanism. All constraints and variables must be coded explicitly. Large models require BARON users to prepare the BARON file programmatically using C, C++, or other languages of their choice. Other users choose Pyomo or the MATLAB/BARON interface for more convenience. Pyomo offers sets for indexing variables and constraints. For passing large-scale models through MATLAB, see




Can BARON provide global optimality guarantees for any general nonlinear program?


BARON solves factorable programs that are recursive compositions of sums and products of univariate functions involving powers, exponentials, and logarithms. BARON guarantees global optimality as long as the domains of these functions are bounded. See Section 2 of the BARON User Manual. Also, see our BARON test problems for a large number of problems that BARON can solve.



How do I configure BARON optimization solver options in Pyomo?


Coding a model for BARON under Pyomo is just like any other solver. You can try something like this.




How can I change the location of BARON's output files?

To change the location of BARON's time file on a UNIX system, use something like this

TimName: "/home/nikos/mytim.lst";

On a Windows system, use something like

TimName: "c:\Users\nikos\ mytim.lst";


Similar options can be set for BARON's results and summary files.



How do I configure Pyomo to show me the .bar file it generates for BARON?

Use Pyomo's keepfiles option to view the generated .bar file for BARON. Refer to this example.



How can I get further technical support?

Please email, and our technical team will get back to you. In your email, please attach a screenshot of any warning or error messages you are getting. If BARON runs, send us the .bar file for your specific problem. This allows us to investigate the issue and provide better insights.


Join our newsletter for the latest news and releases