Skip to main content

Welcome, Anonymous

search index

Latest News from the Optimization Firm

Stay up-to-date with the latest releases and news. Sign up for our…

The Optimization Firm is building new software solutions for large-scale power systems.
Jan 17, 2019

BARON is still ahead of other competing MINLP solvers.
Published Feb. 28, 2017   Updated Feb. 25, 2022

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…

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

What is BAM?​

BAM (Branch-And-Model) is a derivative-free global optimization solver designed for problems where the objective or constraints are not available in algebraic form. It is ideal for simulation-based, experimental, or black-box optimization problems.

When should I use BAM?

Use BAM when:

  • You cannot write the problem in a closed-form equation.
  • Your model is a simulator or experiment (black-box).
  • Function evaluations are expensive.
  • You want a global solution to high-dimensional or nonconvex problems.

 

What makes BAM different from other optimizers?

BAM combines:

  • Global optimization techniques (via domain partitioning).
  • Surrogate modeling (using ALAMO for accurate local models).
  • Guaranteed convergence even for discontinuous or discrete problems.
  • BARON to globally solve surrogate models for new sampling points.
Does BAM require derivatives?

No. BAM is completely derivative-free. It uses function values only. No gradients or Hessians are needed.

What types of problems can BAM solve?

BAM can handle:

  • Continuous, integer, or categorical variables
  • Nonconvex, discontinuous, or noisy functions
  • Problems defined by simulators or experiments
  • Data-driven optimization using previously collected evaluations
How do I run BAM?

From the command line:

bam my_problem.bam

This runs BAM using the input file my_problem.bam.

What does a BAM input file look like?

A simple input file includes:

  • Number of variables (nvars)

  • Variable bounds (xmin, xmax)

  • Data provider executable (your simulator)

  • Input/output file names

  • Evaluation budget (maxevals)

Example:

lua
nvars 2 xmin -3 -1.5 xmax 3 1.5 dataprovider mysimulator.exe datain input.in dataout output.out maxevals 80
What is the data provider?

The data provider is your simulator or executable. BAM calls it to evaluate the objective function. The provider must:

  • Read input variables from a file (input.in)
  • Write a single output value to a file (output.out)
Can BAM start from existing data?

Yes. BAM can use:

  • Unevaluated points (initial guesses)
  • Evaluated points (historical data)
    This reduces function calls and helps warm-start the optimization.
What platforms does BAM run on?

BAM runs on:

  • Windows
  • Linux
  • macOS

Installation is easy. Simply download and run the installer or unzip the archive available at BAM Downloads.

Do I need a license?

Yes. BAM requires a valid license file.

Options include:

  • Free academic license
  • Commercial license (with support and updates)

See BAM Licenses for details.

Where can I find more examples?

Sample input files are available at minlp.com/bam. The BAM manual also includes benchmark examples like the Six-Hump Camel function.

Where can I get help?

Please contact our technical team at info@minlp.com for support or licensing questions.

How do I set up multiple simulator outputs?

In SIMOUT mode, your simulator must return one line per evaluated point, with:

  • NINPUTS real values (input variables)
  • NOUTPUTS real values (output results)
  • All values must be space-separated

Each line should contain NINPUTS + NOUTPUTS real numbers. ALAMO reads these lines from the output file to match simulation points with their results.

Can I link ALAMO with Python data or simulators?

Yes, ALAMO can work with Python-based data or simulators. You will need to create a Python wrapper script that:

  • Reads input points from input.txt
  • Runs your Python code or simulator
  • Writes results to output.txt

Example scripts are available in the examples folder of your ALAMO installation (e.g., batpython/e1.py) and can be adapted to your setup.

Can I use Aspen or GAMS as simulators?

Yes, you can use Aspen or GAMS with ALAMO by calling them from a wrapper script. The wrapper can be written in Python, Fortran, C, bash, or batch and should:

  1. Read input points from input.txt
  2. Use a system call to run the Aspen or GAMS executable
  3. Write simulation results to output.txt

This setup allows ALAMO to interface with almost any simulator that can be executed from the command line.

How do I split my data?

You do not need to manually split your data when using ALAMO. Unlike other modeling techniques—such as neural networks—that require separate training, validation, and testing sets, ALAMO uses information criteria (e.g., BIC, AIC) that are mathematically equivalent to leave-one-out cross-validation.

This means:

  • No separate test set is required
  • All your data can be used for model building
  • Fewer measurements are needed compared to methods like neural networks

This makes ALAMO especially efficient when working with limited data.

How do I separate data for training and testing?

While ALAMO does not require data splitting, it provides options if you want to separate data for testing or prediction:

  • NPREDDATA – Specifies points used only for prediction, not model training.
  • NVALSETS and NVALDATA – Define validation sets to test model performance.

These options let you assess predictions on selected data without impacting model training.