This page is for general questions about using BARON and solutions to common error messages. For further technical support, please contact info@minlp.com.
Getting Started
What is BARON?
BARON (short for Branch And Reduce Optimization Navigator) is a global optimization solver developed by The Optimization Firm. It is designed to find globally optimal solutions to a broad class of mathematical programming problems–including LP, NLP, MIP, and MINLP–and is the leading solver for MINLPs. Since 2001, BARON has been used by Fortune 500 companies, national research labs, and universities worldwide.
What platforms does BARON support?
BARON supports the following operating systems:
- Windows
- Linux
- macOS (OS X)
You can download platform-specific executables from the BARON Downloads page.
What are BARON's hardware requirements?
BARON runs on 64-bit CPUs and is designed to be lightweight in hardware requirements. While exact resource needs depend on the problem, BARON can solve many models with just a few hundred megabytes of RAM. It uses dynamic memory allocation and will notify you if a problem exceeds your system's available resources.
How do I set up BARON?
To set up BARON:
- Download the executable from minlp.com/baron-downloads for your platform (Windows, Linux, or macOS).
- Place the BARON executable in a directory of your choice, like
C:\baron\
. - Add that directory to your system PATH so BARON can be called from the command line or modeling environments like Pyomo or JuMP.
- Install your license file (
baronlice.txt
) in the same directory as the BARON executable or in your home directory. - Verify the installation by running
baron
from a terminal or command prompt. You should see version and usage information.
For more help integrating BARON, see the relevant sections in this FAQ.
Can I use BARON offline?
Yes, BARON can be used completely offline. Once it is installed with a license on your machine, it does not require an internet connection to run.
Licensing
How do I license BARON?
To license BARON:
- Go to minlp.com/baron-licenses to view licensing options, then email sales@minlp.com to purchase a license.
- You will receive a license file named
baronlice.txt
by email. Save it in one of the following locations:- In the same directory as the BARON executable, or
- In your home directory (e.g.,
C:\Users\YourName\
on Windows or~/
on Linux/macOS).
- Run BARON to confirm that your license is active. If not, a license error message will appear. For help, see the Error Messages and Support section below or contact info@minlp.com.
Can I get a free academic license?
Free academic licenses are currently available only to individuals affiliated with Carnegie Mellon University, the University of Illinois at Urbana-Champaign, or the University System of Georgia.
However, all academic users receive discounted academic pricing on BARON licenses. These licenses are fully featured with no restrictions on problem size.
For details, visit the BARON Licenses page.
Do I get updates with my license?
Yes. When you purchase a BARON license, you receive free upgrades and technical support for the duration of your license. For perpetual licenses, you can renew your maintenance after the first year to continue receiving updates and support. Renewal is strongly recommended to ensure ongoing access to the latest features and fixes.
Can I use my license on multiple machines?
Yes, BARON licenses are issued on a per-user basis, not per machine. This means you may install and use BARON on multiple machines—like a desktop, laptop, and across a computing cluster—as long as only the licensed user is using the software. If multiple people want to use BARON, you must have a multi-user license.
Problem Scope
How does BARON solve MINLPs?
BARON uses a branch-and-reduce algorithm, which it pioneered in the 1990s, to solve MINLP problems to global optimality. This approach combines techniques like branch-and-bound, convex relaxations, and domain reduction to systematically eliminate regions of the search space that cannot contain the global optimum.
BARON's algorithmic innovations have set the standard in global optimization, and many other solvers have since followed its approach.
For a deeper explanation of the methods behind BARON, visit our BARON Publications page.
Can BARON solve MINLPs with linear inequality constraints?
Yes. As long as your objective function and constraints are provided in algebraic form, BARON can solve MINLP problems that include linear inequality constraints. To see examples, visit the BARON Downloads page.
Can BARON solve large MINLPs with a nonlinear (i.e., quadratic) objective?
Yes, BARON can solve problems with many mixed-integer or binary variables and nonlinear (including quadratic) objective functions. Its global optimization algorithms are designed for exactly this type of problem.
However, whether BARON can solve a specific problem efficiently depends on the structure and difficulty of the model, not just its size.
How does BARON prove infeasibility?
BARON proves infeasibility only when a valid relaxation—such as a linear, integer, or convex nonlinear relaxation—is infeasible. It does not rely on local solutions of nonconvex subproblems or solver timeouts, as these do not provide formal infeasibility certificates.
Most infeasibility proofs come from infeasible LP relaxations or infeasibilities identified through constraint propagation. BARON includes safeguards to ensure that its solvers do not make false infeasibility claims, maintaining the rigor of its global infeasibility results.
Can BARON guarantee global optimality?
BARON guarantees global optimality for a broad class of factorable nonlinear programs—problems that can be written as recursive compositions of sums and products of univariate functions such as powers, exponentials, and logarithms. These guarantees hold as long as the domains of all functions are bounded.
For more details, see Section 2 of the BARON User Manual, and explore the BARON Optimization Test Problems for examples of solvable models.
Can BARON find multiple local optima?
Yes, during its search for the global optimum, BARON may identify multiple local optima. It reports all improving local optima in the screen log and results file, and at the end of the run, returns the best local optimum found.
What is the largest problem size BARON can solve?
There is no fixed limit on the size of problems BARON can solve. Its ability to handle large-scale models depends on the structure and complexity of the problem, not just the number of variables or constraints.
BARON has successfully solved problems with hundreds of thousands of variables and constraints, especially when the model is well-structured. It uses dynamic memory allocation and will notify the user if a problem exceeds the available hardware resources.
Does BARON support parallel computing?
Yes, BARON supports parallel computing when solving MINLPs that include integer variables. During the lower bounding step of its algorithm, BARON can run solvers like CPLEX or CBC in parallel mode, automatically utilizing multiple CPU cores to improve performance.
Can BARON perform black-box optimization?
No, BARON requires algebraic expressions for both the objective function and constraints. It cannot be used for problems where evaluations rely on external simulators or models without explicit equations. This applies across all modeling languages, including Pyomo and MATLAB.
However, The Optimization Firm is planning to offer a separate tool for black-box (derivative-free) optimization in the future.
Usage Tips
Can I build a BARON model iteratively?
No, BARON's parser does not support iterative model construction—all variables and constraints must be defined explicitly. For large models, users typically generate BARON input files programmatically using C, C++, or other languages, or use modeling interfaces like Pyomo or MATLAB, which offer more convenient ways to handle large-scale formulations.
Can I convert a BARON model to AMPL or GAMS?
No, BARON does not provide tools for converting problem formulations to other formats like AMPL or GAMS.
How do I change the location of BARON's output files?
Use BARON's file name options to set custom paths. For example:
On UNIX/Linux/macOS:
TimName: "/home/username/mytim.lst";
On Windows:
TimName: "C:\Users\username\mytim.lst";
You can set similar options for BARON's results, summary, and other output files.
How do I save output files separately in parallel BARON runs?
BARON writes temporary files during execution using default filenames, unless specified otherwise. You can control file names and locations using BARON’s output and file name options (see Section 7.6 in the BARON manual).
How do I see the .bar file generated by JuMP?
Set the ProName
option in your model:
model = Model(() -> BARON.Optimizer(ProName = "PATH_TO/MY_FILE.bar"))
This saves the .bar
file to the specified path and prevents it from being deleted.
Pyomo Interface
How do I use BARON with Pyomo?
Using BARON with Pyomo is simple—just replace the solver name in your existing Pyomo code (e.g., change IPOPT
to BARON
).
For a small usage example, see e03.py.
For additional resources:
- BARON FAQ (search for “Pyomo”)
- Optimization Test Problems (see the “global” and “prince” libraries for thousands of Pyomo models)
How do I configure BARON solver options in Pyomo?
Configuring BARON in Pyomo is the same as with other solvers. You can try something like this example.
How do I set a time limit for BARON in Pyomo?
You can pass BARON options using the options
keyword in the solve
method. For example, to set a time limit of 1000 seconds:
results = SolverFactory('baron').solve(model, options={'MaxTime': 1000})
You can use this method to set any option listed in the BARON User Manual.
How do I provide starting points in Pyomo?
Pyomo supports passing starting points to solvers, including BARON. To do this, assign .value
attributes to your model variables before calling the solver. BARON does not require starting values for all variables—you can specify only those you want to initialize. Pyomo will automatically include these values when generating the BARON input file.
How can I track BARON’s progress in Pyomo?
To view BARON’s progress in real time, use the tee=True
option in your solve
command. To keep all temporary files generated during the run, also include keepfiles=True
. For example:
results = SolverFactory('baron').solve(model, tee=True, keepfiles=True, options={'MaxTime': 1000})
If you want BARON to return multiple feasible solutions (with increased computational time), see the NumSol
option in the user manual.
How do I keep the .bar file generated by Pyomo?
Use Pyomo's keepfiles=True
option to view the .bar
file generated for BARON. Refer to this example.
Error Messages and Support
What does "A valid BARON license is required for this model" mean?
This error typically means BARON cannot proceed due to a licensing issue. Common causes include:
- No license file is found. BARON cannot locate
baronlice.txt
in the expected directory. - The license file exists but is expired or invalid.
- You are using the demo version, which restricts model size or type and does not support the problem you are attempting.
To fix this, make sure you have a valid baronlice.txt
file in the correct location and that your license matches your BARON version and usage. Contact BARON support at info@minlp.com if you are unsure.
What if my new license file is not valid for this BARON version?
This usually means there is a mismatch between your BARON version and the license file. Most likely, you are running an older version of BARON, but your new license is valid only for newer versions.
To resolve this:
- Remove the older BARON version from your system, or
- Update your system PATH to prioritize the latest BARON version that matches your license.
What if the license file cannot be found?
BARON shows this error when it cannot locate the required baronlice.txt
license file. To resolve it:
- Check your system PATH – Ensure the directory containing
baronlice.txt
is included in your PATH environment variable. - Use the
LicName
option – You can explicitly tell BARON where to find the license file:
On UNIX/Linux: LicName: "/home/username/baronlice.txt";
On Windows: LicName: "C:\Users\username\baronlice.txt";
Include this line in the OPTIONS section of your .bar
file, or configure your modeling system (e.g., Pyomo, GAMS) to pass this option directly to BARON.
What if Windows says the license file baronlice.txt is invalid?
This error may occur due to formatting issues or version mismatches. Common causes include:
- Corruption from editing – Some Windows text editors (like Notepad) may introduce extra characters or line endings.
➤ Solution: Recopy the license file to the correct location without opening or modifying it in an editor. - Version mismatch – You might be using a BARON version older than the license's effective date.
➤ Solution: Make sure you're using a BARON version released after the license date. Consider updating to the latest version.
What if Pyomo cannot find the BARON executable on Linux?
Pyomo relies on the BARON executable being in your system PATH. If it is not found, follow these steps:
Check your PATH by running:
echo $PATH
This shows the directories Pyomo searches for executables.
Add BARON to your PATH.
If BARON is installed in, say,/usr/local/baron
, add it like this:export PATH=/usr/local/baron:$PATH
- Make it permanent.
Add the above line to your~/.bashrc
or~/.bash_profile
to preserve it across sessions.
After this, restart your terminal, and Pyomo should be able to locate BARON.
What if BARON cannot find the CPLEX libraries?
This issue usually occurs when BARON cannot locate the required CPLEX library files on your system. To resolve it:
- Add the CPLEX library folder to your system’s dynamic library path, not just the PATH.
- On Linux, update
LD_LIBRARY_PATH
. - On Windows, ensure the DLL folder is in your system environment variables.
- On Linux, update
- Use the
cplexlibname
option to explicitly specify the library location. For example:- On Linux:
cplexlibname: "/opt/ibm/ILOG/CPLEX_Studio221/cplex/bin/x86-64_linux/libcplex2211.so";
- On Windows:
cplexlibname: "C:\Program Files\ibmcplex\cplex2211.dll";
- On Linux:
- Allow time for changes to take effect, or restart your terminal/session if needed.
Include this option in your .bar
file or pass it through your modeling interface.
Where can I get help with the MATLAB/BARON interface?
Please visit our MATLAB/BARON FAQ Page for solutions to common error messages and setup issues. If you need additional assistance, contact info@minlp.com for technical support.
What if I get an error opening the timing output file?
This error may indicate that the license is not valid or the executable is corrupted. To troubleshoot:
Run BARON from the command line to verify the installation:
For example, on Windows, open the Command Prompt (
cmd
), then navigate to the folder wherebaron.exe
is installed, and run:baron.exe path-to-your-input-file
If the error persists, consider reinstalling BARON or checking file permissions in the working directory.
What if the CompIIS option does not work as described in the manual?
If CompIIS
appears to have no effect, check the results file—this is where BARON reports the Irreducible Infeasible Set (IIS), not the standard output.
Make sure:
- You are using a recent version of BARON that supports
CompIIS
. - The results file is being properly generated and reviewed.
How can I get further technical support?
Please email info@minlp.com for assistance. To help us diagnose the issue more effectively, include the following in your message:
- A screenshot of any warning or error messages
- Your
.bar
file (if BARON runs) related to the problem
This information helps our technical team investigate and provide targeted support.