Giter Site home page Giter Site logo

gaps's Introduction

GAPS

Generalized Assignment Problem Solver

This code aims to implement an efficient solver for the generalized assignment problem.

The generalized assignment problem

The generalized assignment problem is described quite well on Wikipedia.

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

The implementation

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.

The code makes use of frozendict to keep track of the set of assignments.

Running the code

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

The code offers a few features:

  • Optional 'hard assignment' initializes the assignment with certain agents assigned to certain tasks
  • Optional 'fair' parameter maximizes the profits related to the least profitable task (and thus equalizes the profits among tasks).
  • Optional 'complete' parameter requires agents and tasks to fully use their budgets.
  • 'verbose' option prettily prints the assignment information after the code finishes. May be turned off.

gaps's People

Contributors

stinodego avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.