Skip to main content

MATLAB-BARON Frequently Asked Questions

Welcome, Anonymous

This page is for general questions about using the MATLAB/BARON interface and solutions to common error messages. For further technical support, please contact info@minlp.com.

General

The MATLAB/BARON interface is provided free of charge. You can download it from our website.

The MATLAB/BARON interface should work for all versions of BARON. However, your BARON license only works for the BARON version available at the time that your license was issued, and for all future BARON versions that we release during your license maintenance period. Hence, your license does not work for older versions of BARON.

Place the BARON executable and license on your PATH. Simply placing them under your MATLAB path may not suffice. Additionally, you must install the MATLAB/BARON interface according to the installation instructions that come with it.

Yes. However, if you are having issues with the current version, please use the filekp option to generate and send us the scratch directory—including the .bar file—that the MATLAB/BARON interface generates for your specific problem. That way, we can check to see what else you need to do so that BARON can obtain a correct result for your problem.

While the MATLAB interface supports the algebraic structure for a factorial function, BARON itself does not accept a factorial function. Hence, the loops cannot be based on the 'value' of x (a decision variable). However, for an exact representation of the factorial, you can model your problem using binary variables. Assuming that the variable whose factorial you are interested in is a bounded integer, the factorial itself is known for different values of the variable. Thus, you can use binary variables to model the different possible values of the variable for which the corresponding value of the factorial is known.

Currently, no—we only provide executables. We have plans to provide DLLs, but for now, most of our clients find it sufficiently convenient to use BARON through Pyomo, JuMP, or the MATLAB interface.

Yes, our interface is backward and forward compatible with most CPLEX versions. You may find it helpful to read about option CplexLibName in the BARON User Manual. When using this option, you must include the entire path to the CPLEX .dll, .dylib, or .so file.

Error Messages and Solutions

Simply putting the license file in the MATLAB path does not suffice. Check that you specified the complete path to this license file in the BARON options section.

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 the order of directories in your PATH to give preference to the latest version.

You need to purchase a BARON license for your model size. Alternatively, you can access BARON for free through the NEOS server.

You are either using an incompatible version of the BARON executable or incorrectly specifying the path for your license file.

Check that you have copied the BARON executable into the Interface folder. Additionally, we strongly recommend that you do the installation with root privileges or have your system administration to install the interface. That way, you won't have to reinstall the interface before each use. If you have successfully installed the interface and copied the BARON executable into the interface folder, you need to: 

  1. Rename the executable from "baron" to "barin" (without quotes). 
  2. Place a copy of your BARON license somewhere in your path. If you are unsure about what your path is, place it where the barin executable is (i.e., in the "interface" folder).

If your system is running in demo mode, then you need a valid BARON license. To purchase a BARON license, please email sales@minlp.com, and you will receive electronic payment information.

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

Place the Intel library in the same location as the BARON executable (barin.exe once renamed).

Capabilities

A simple way to avoid errors (i.e., naming conflicts) in your parallel runs would be to specify the value of barscratch randomly or as a function of the process id (pid) running the job.

The MATLAB/BARON interface uses a scratch directory to store temporary files. The interface uses a default name for every scratch directory—unless the user specifies otherwise. You have complete control of these names through the barscratch option.

The OPTI Toolbox page lists a couple of different methods to help with building up large sets of nonlinear constraints.

Please contact info@minlp.com, and our technical team will get back to you. In your email, please attach a screenshot of the warning or error messages for the issue you are experiencing. If BARON runs, please use the filekp option to generate and send us the scratch directory—including the .bar file—that the MATLAB/BARON interface generates for your specific problem. This information will allow us to investigate the issue and provide better insights.