QUBO++ Library with QUBO Solver APIs
Author: Koji Nakano, License: Non-commercial research and evaluation purposes without any guarantees.
Functions
ilp_grb.cpp File Reference

Solves an Integer Linear Programming (ILP) problem using Gurobi Optimizer through QUBO++ library. More...

#include <iostream>
#include "qbpp.hpp"
#include "qbpp_grb.hpp"
Include dependency graph for ilp_grb.cpp:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Solves an Integer Linear Programming (ILP) problem using Gurobi Optimizer through QUBO++ library.

This is a sample program to solve the following Integer Linear Programming (ILP) problem using Gurobi Optimizer through QUBO++ library. Gurobi Optimizer is used to solve a QUBO model of the ILP problem, not the ILP problem itself.

Maximize
6 x1 + 4 x2 + 3 x3 + 5 x4
Subject To
c1: x1 + 2 x2 + 3 x3 + 4 x4 <= 15
c2: 3 x1 + x2 + 2 x3 + x4 <= 10
Bounds
x1 <= 5
x2 <= 4
x3 <= 3
x4 <= 6
Generals x1 x2 x3 x4 End

The expected optimal solution is:

# Objective value = 30
x1 2
x2 2
x3 0
x4 2
Version
2024-09-29

Definition in file ilp_grb.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 37 of file ilp_grb.cpp.

Here is the call graph for this function: