PseudoBooleanOptimization.jl

Pseudo-Boolean Optimization Library for Julia
Author JuliaQUBO
Popularity
2 Stars
Updated Last
3 Months Ago
Started In
May 2023

PseudoBooleanOptimization.jl

Introduction

$$ f(\mathbf{x}) = \sum_{\omega \subseteq [n]} c_{\omega} \prod_{j \in \omega} x_{j} $$

Installation

julia> import Pkg; Pkg.add("PseudoBooleanOptimization")

Getting Started

using PseudoBooleanOptimization
const PBO = PseudoBooleanOptimization

f = PBO.PBF{Symbol,Float64}([
    [:x, :y] => 10.0,
    [:x, :z] => 15.0,
    [:y, :z] => -5.0,
])

g = PBO.PBF{Symbol,Float64}([
    :x => 1.0,
    :y => 2.0,
    :z => 3.0,
])

h = f + g

Output:

1.0x + 2.0y + 3.0z + 10.0x*y + 15.0x*z - 5.0y*z