gap_solver 0.2.0

A solver for the generalized assignment problem.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 1 items with examples
  • Size
  • Source code size: 23.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.81 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • stinodego/gap_solver
    0 0 5
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • stinodego

gap_solver

crates.io docs build coverage

This crate provides an interface for specifying a generalized assignment problem, and an algorithm for finding the maximum assignment.

This code actually allows for further generalization, allowing multiple agents to perform a single task (regulated by a task budget).

Usage

Add this to your Cargo.toml:

[dependencies]
gap_solver = "0.2.0"

Now, you can use the gap_solver API:

use gap_solver::{solve, GapSpec};

Refer to the Rust docs for code examples.

Features

The implementation is a simple depth-first search algorithm. Therefore, it does not work well for very large problems.

The depth-first search expands most promising nodes first. True maximum assignment is guaranteed when algorithm is allowed to complete. Otherwise, the assignment printed last may be used as a best guess.

Running the code

Solving your assignment problem is easy. Just specify your assignment problem (refer to main.rs for an example), then run it. An example problem specification is given, to make clear what syntax is expected.