Installation¶
This guide will help you install PowerBiMIP and get it ready for use in MATLAB.
Prerequisites¶
Before installing PowerBiMIP, ensure you have the following dependencies installed:
MATLAB: R2018a or newer.
YALMIP: The latest version is highly recommended. You can download it from the YALMIP GitHub repository.
A MILP Solver: At least one MILP solver is required. We strongly recommend Gurobi for its performance and robustness. Other supported solvers include CPLEX, COPT, and MOSEK.
Installation Steps¶
We recommend using GitHub Desktop or git command line to install PowerBiMIP. This ensures you can easily receive the latest updates.
1. Clone the Repository¶
Choose one of the following methods to download the source code:
Option A: Using GitHub Desktop (Recommended)
Open GitHub Desktop.
Go to
File>Clone repository.Enter the repository URL:
https://github.com/GreatTM/PowerBiMIP.Choose a local path and click Clone.
Option B: Using Git Command Line Run the following command in your terminal:
git clone https://github.com/GreatTM/PowerBiMIP.git
2. Run the Installer¶
Open MATLAB.
Navigate to the
matlab/folder inside the repository (e.g.,cd PowerBiMIP/matlab).In the MATLAB Command Window, type the following command and press Enter:
installThe script adds all necessary folders (
src,config,examples) to your MATLAB path and cleans up stale path entries left over from older layouts, so it is safe to re-run after every update.
3. Verify Installation¶
To confirm that PowerBiMIP is correctly installed and configured, run one of the included toy examples:
run('examples/BiMIP_benchmarks/BiMIP_toy_example1.m');
If the solver runs and produces an optimal solution, you are all set!
Keeping Up to Date¶
To update PowerBiMIP to the latest version:
Pull changes: Click “Fetch origin” in GitHub Desktop or run
git pullin your terminal.Re-run
installif the update moved or renamed folders (such as the monorepo restructuring): run it once from thematlab/folder to refresh your MATLAB path.Restart MATLAB: This ensures all changes are reloaded.