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 info@minlp.com.

General

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.

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.

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.

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. Renewing is strongly recommended for all users.

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.

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.

BARON runs on Windows, Linux, and OS X.

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 Click “Environment Variables…” 
  5. Click the variable called “Path” and click “Edit…”
  6. Click “New” 
  7. Enter the path to the folder containing the binary you want on your PATH. For example, to add the folder C:\baron, add: 
C:\baron

Yes, you can use BARON offline with a license.

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

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.

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.

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.

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’.

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

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/libcplex2211.so"; 

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";

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

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

Capabilities

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.

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.

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

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

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

Using 

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

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

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 https://inverseproblem.co.nz/OPTI/index.php/Advanced/LargeScale#largenlcon.

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.

Please email info@minlp.com, 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.