Skip to content

ykarikos/simplify-debts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplify-debts

Simplify debts by minimizing transactions. The algorithm does not aim in minimizing transaction amounts but only the number of transactions.

Run

  1. Create debts file, e.g. example.txt:
# Everyone owes Joe
* -> Joe: 16.80
Sue -> Joe: 24.40
Bob -> Sue: 12.20
# Ellen is part of everyone
Ellen
  1. Run:
$ src/simplify.py <example.txt
Bob -> Joe: 16.4
Sue -> Joe: 16.4
Ellen -> Joe: 4.2

Run with graphviz

$ src/simplify.py -g <example.txt |dot -Tpng >example.png

example graph

Run tests

Robot framework required

$ cd test
$ pybot run-test.txt

License

Licensed with GPLv2.

Thanks

This project is a grateful recipient of the Futurice Open Source sponsorship program. 🌶🦄

About

Simplify debts by minimizing transactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages