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
Where can I purchase the MATLAB/BARON interface?
Can I use an older version of BARON with a newer version of the MATLAB/BARON interface?
Does BARON work in MATLAB 2017/2018?
Can I use a factorial function with the MATLAB/BARON interface?
Can I use the MATLAB/BARON interface for black-box functions where the model is unknown?
Do you provide DLLs?
Can I use BARON with the IBM CPLEX solver even though I've already installed CPLEX?
Error Messages and Solutions
What if I get the following error: 'A valid BARON license is required for this model'?
What if I get an error message saying my license file is not valid for this version of BARON?
What if I get an error message saying that the license file cannot be found?
What if I installed the MATLAB/BARON interface, but it fails to install the license even after I added the Path for the license?
What if I get an error in MATLAB after adding the barin executable file to the Interface folder?​
What if I get an error message saying there was an error opening the timing output file?
How do I get out of demo mode while using MATLAB/BARON with CPLEX?

What if I run the examples included in matbar.zip and the BARON executable does not work?

Capabilities
How do I use my license for the newest version of BARON with the MATLAB/BARON interface?
How do I successfully run parallel instances of BARON with the MATLAB/BARON interface?
How do I make parallel instances of BARON save their temporary files in different locations?
How can I create a large set of nonlinear constraints in the MATLAB/BARON interface?
How can I get further technical support?
 
 
 

General

 
 
Where can I purchase the MATLAB/BARON Interface?
The MATLAB/BARON interface is provided free of charge. You can download it from our website.

 
 
Can I use an older version of BARON with a newer version of the MATLAB/BARON interface? 
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.

 
 
Does BARON work with MATLAB 2017/2018? 
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.

 
 
Can I use a factorial function with the MATLAB/BARON interface? 
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.

 
 
Can I use the MATLAB/BARON interface for black-box functions where the model is unknown? 
No, because BARON requires algebraic models.

 
 
Do you provide DLLs? 
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.

 
 
Can I use BARON with the IBM CPLEX solver if I've already installed CPLEX?
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
 

 
 
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. Alternatively, you can access BARON for free through the NEOS server.

 
 
What if I get an error message saying my license file is not valid for this version of BARON?
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.

 
 
What if I get an error message saying that the license file cannot be found?
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.

 
 
What if I installed the MATLAB/BARON interface, but it fails to install the license even after I added the Path for the license?
You are either using an incompatible version of the BARON executable or incorrectly specifying the path for your license file.

 
 
What if I get an error in MATLAB after adding the barin executable file to the Interface folder?
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:

Rename the executable from "baron" to "barin" (without quotes).
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).

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

 
 
How do I get out of demo mode while using MATLAB/BARON with CPLEX?
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. 
 
 

What if I run the examples included in matbar.zip and the BARON executable does not work?
Place the Intel library in the same location as the BARON executable (barin.exe once renamed).
 
 

 
Capabilities
 

How do I use my license for the newest version of BARON with the MATLAB/BARON interface?
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.
 
 

How can I successfully run parallel instances of BARON with the MATLAB/BARON interface?
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.
 
 

How do I make parallel instances of BARON save their temporary files in different locations?
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.
 
 

How can I create a large set of nonlinear constraints in the MATLAB/BARON interface?

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

How can I get further technical support?
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.
 
 

 

The MATLAB/BARON interface is provided by The Optimization Firm.  The interface is provided free of charge and with no warranties.

Newsletter

Join our newsletter for the latest news and releases