Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefighter problem #13

Merged
merged 119 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
470fe12
firefighter problem
Almog-David May 28, 2024
8f4753d
all tests are working in the library
Almog-David May 28, 2024
acea2a9
added dirlay integer rounding function
20shaked20 Jun 2, 2024
c3318f4
Fixed node capacity function for dirlay + added a correction to its …
20shaked20 Jun 2, 2024
525d52f
fixed heuristic functions + added print that give the user more infor…
Almog-David Jun 2, 2024
cabc9ed
add a lot of prints for the user to understand what happening
Almog-David Jun 2, 2024
9b5fba3
Fixed how the Mincut returns the nodes and groups them into N groups …
20shaked20 Jun 2, 2024
415e821
Minor fix
20shaked20 Jun 2, 2024
7707972
minimal changes
Almog-David Jun 2, 2024
a0e0ca4
Matrix_to_integers should be ok, also added few tests and minor tweak…
20shaked20 Jun 2, 2024
ee648bf
Merge pull request #1 from The-Firefighters/improvements
Almog-David Jun 2, 2024
9eb8fe3
Merge pull request #2 from The-Firefighters/dirlay_fixes
20shaked20 Jun 2, 2024
f1219fd
move the test to the correct location
Almog-David Jun 3, 2024
6742685
Merge pull request #3 from The-Firefighters/improvements
Almog-David Jun 3, 2024
546079d
Fixed calcualtion of vaccine matrix! and its approripate tests which …
20shaked20 Jun 4, 2024
0b1779d
Dirlay implementation done, testing are passing
20shaked20 Jun 4, 2024
1dea0be
Merge pull request #4 from The-Firefighters/dirlay_fixes
20shaked20 Jun 4, 2024
b2f1188
minor changes depcreating for now test_utils, as we do not use it and…
20shaked20 Jun 4, 2024
521d002
some comments + removed unnecasry comments
20shaked20 Jun 4, 2024
9bb5cc7
Added logging, added docstrings for hueristic functions
YuvalBubnovsky Jun 4, 2024
2b077ce
Merge pull request #5 from The-Firefighters/yuval/logging_etc
YuvalBubnovsky Jun 4, 2024
efb7f34
Added headers for each file + created a basic main for demonstartion …
20shaked20 Jun 5, 2024
a022a44
Add files via upload
20shaked20 Jun 5, 2024
55f50ce
Enum for node status
20shaked20 Jun 9, 2024
48f9533
Moved CleanGraph to the head of the function
20shaked20 Jun 9, 2024
e9b2c95
Moved graphs.json to its correct place
20shaked20 Jun 9, 2024
79c49bb
some fixes for dirlay tests+added randomized directed layered network…
20shaked20 Jun 9, 2024
b349c7b
removed uneeded test.py
20shaked20 Jun 9, 2024
bf05df4
Removed uneeded code from lib
20shaked20 Jun 9, 2024
d8af684
Merge pull request #6 from The-Firefighters/fixes
20shaked20 Jun 9, 2024
2c9b2f9
update targets during code loop + add logger to while before exiting …
Almog-David Jun 11, 2024
1579cb8
changed the return parameters of the minbudget and maxsve + added mew…
Almog-David Jun 11, 2024
81b169f
improved epsilon function
Almog-David Jun 11, 2024
0642434
Merge pull request #7 from The-Firefighters/updates
Almog-David Jun 11, 2024
3d53b43
Dirlay Random Graph works
20shaked20 Jun 11, 2024
e37de37
Added more loggers for dirlay
20shaked20 Jun 11, 2024
6413962
Some minor fixes+ added DAG validation for dirlay, also more logs
20shaked20 Jun 11, 2024
919a138
Merge pull request #8 from The-Firefighters/fixes2
20shaked20 Jun 11, 2024
60e2dfa
nada
20shaked20 Jun 11, 2024
b959bd5
Added doctests for utility functions, seperated graph_flow_reduction …
YuvalBubnovsky Jun 12, 2024
5541934
Fixes to imports
20shaked20 Jun 12, 2024
a611714
Merge pull request #9 from The-Firefighters/yuval/improvements
20shaked20 Jun 12, 2024
ff99b20
Fixe for the minbudget sum of dirlay
20shaked20 Jun 13, 2024
eaa155a
run doctests
erelsgl Jun 13, 2024
0eb5688
logs
erelsgl Jun 13, 2024
9be7ecf
huristic improvement + minor changes for erel
Almog-David Jun 13, 2024
e749659
Merge branch 'master' into updates
Almog-David Jun 13, 2024
d5cc0e7
Merge pull request #10 from The-Firefighters/updates
Almog-David Jun 13, 2024
69a654e
added tests for heuristic minbudget
Almog-David Jun 13, 2024
053a87e
Some fixes to dirlay loggers
20shaked20 Jun 23, 2024
8389f49
fixed problems with huristic approach and local cahnges in targets
Almog-David Jun 23, 2024
7171a50
added more logs to dirlay+ created return stategy method
20shaked20 Jun 23, 2024
4b4051a
Merge pull request #11 from The-Firefighters/shaked/addons
20shaked20 Jun 23, 2024
77adb28
Minor change to function details
20shaked20 Jun 23, 2024
37aa087
Changes to paper location + Link
20shaked20 Jun 23, 2024
d43cff9
Merge pull request #12 from The-Firefighters/shaked/addons
20shaked20 Jun 23, 2024
9959ced
removed some unneeeded code + Added test comparisions for HeuristicMi…
20shaked20 Jun 25, 2024
131824d
Merge pull request #13 from The-Firefighters/shaked/addons
20shaked20 Jun 25, 2024
d2a1b89
reduction is now an outside function with now able to get an s-t grap…
20shaked20 Jun 25, 2024
b507cda
Merge pull request #14 from The-Firefighters/flow_reduction_fix
20shaked20 Jun 25, 2024
646605a
algorithm comparisons + dirlay trying to improve the adjust_node_capa…
20shaked20 Jun 25, 2024
84dd2b9
added png of comparing
20shaked20 Jun 25, 2024
c2eaf53
Improved testing for hueristic functions
YuvalBubnovsky Jun 25, 2024
1132757
Merge pull request #15 from The-Firefighters/yuval/maxsave_comparison
YuvalBubnovsky Jun 25, 2024
e14e3b9
added our algorithm running time comparison
20shaked20 Jun 25, 2024
11013d7
Merge pull request #16 from The-Firefighters/shaked/dirlayImprove
20shaked20 Jun 25, 2024
ac576e4
minor change
20shaked20 Jun 25, 2024
2ef6676
fix doctest
erelsgl Jul 9, 2024
adf9974
rename max-flow to min-cut
erelsgl Jul 9, 2024
1d2ae6f
move min-cut algorithm outside
erelsgl Jul 9, 2024
0bff8f4
fix logs
erelsgl Jul 9, 2024
8f72630
gitignore
erelsgl Jul 9, 2024
c81fb3a
changes in the tests due to erel comments
Almog-David Jul 11, 2024
cbc845e
Some minor changes + added a comparision
20shaked20 Jul 16, 2024
52a669a
Expermient csv is working
20shaked20 Jul 16, 2024
4b1b702
Minor fix
20shaked20 Jul 16, 2024
6ea36ea
Header
20shaked20 Jul 16, 2024
6831cff
removed writing logs to files; now using env var to pass where the gr…
YuvalBubnovsky Jul 16, 2024
040353a
Merge pull request #17 from The-Firefighters/yuval/improvments
YuvalBubnovsky Jul 16, 2024
d68c5c1
Practically done with comparisions, but having a slight issue with ho…
20shaked20 Jul 16, 2024
8fc3d61
Merge branch 'master' into shaked/Comparisons
20shaked20 Jul 16, 2024
cd53ce3
Merge pull request #18 from The-Firefighters/shaked/Comparisons
20shaked20 Jul 16, 2024
da851d1
add main
erelsgl Jul 17, 2024
ee0ebd5
fixed getting JSON path for tests
YuvalBubnovsky Jul 19, 2024
a0397d4
Minor imporvment to csv outputting with multiple graphs and batching
20shaked20 Jul 19, 2024
17ae7ec
Merge pull request #19 from The-Firefighters/yuval/fixing_json_path
YuvalBubnovsky Jul 19, 2024
d7cd0f5
Non-spreading-csv working wih many checks
20shaked20 Jul 19, 2024
a058153
Added alos comparison for spreading_minbudget
20shaked20 Jul 19, 2024
e556830
Merge branch 'master' into comparisions
20shaked20 Jul 19, 2024
49ab4f5
Merge pull request #20 from The-Firefighters/comparisions
20shaked20 Jul 19, 2024
efb9aab
changes to the heuristic functions. need to validate answers
Almog-David Jul 20, 2024
8feeb8f
fixed problem with heuristic algorithm
Almog-David Jul 21, 2024
42658cd
Minor fix
20shaked20 Jul 21, 2024
0efb369
re-factored random di graph generator
YuvalBubnovsky Jul 21, 2024
b4338da
CSV
20shaked20 Jul 21, 2024
36a1e4e
Merge pull request #21 from The-Firefighters/yuval/improvments
20shaked20 Jul 21, 2024
e297d1c
Max save random comparision created
20shaked20 Jul 21, 2024
089c047
time improvement in the heuristic function
Almog-David Jul 23, 2024
6d2e5cb
format changes in utils and firefighter files
Almog-David Jul 23, 2024
faf08e2
Fixed the problem with not showing name + seprate random gen to other…
20shaked20 Jul 23, 2024
2ddc2c5
Merge branch 'almog_heuristic' of https://github.com/The-Firefighters…
20shaked20 Jul 23, 2024
d57d616
fix
20shaked20 Jul 23, 2024
947988c
minor fixes due to changes in the main functions of non_spreading
Almog-David Jul 23, 2024
5991624
Fixed some testings + commentings
20shaked20 Jul 26, 2024
a4aadff
Merge pull request #22 from The-Firefighters/almog_heuristic
20shaked20 Jul 26, 2024
a3f3d9f
loggs minor changes
Almog-David Jul 26, 2024
33abffd
setup logger to main
erelsgl Jul 31, 2024
4ea6d73
minbudget using mincut
erelsgl Jul 31, 2024
9a43bc7
png file name
erelsgl Jul 31, 2024
04501b2
nonspreading minbudget returns the vaccination strategy
Almog-David Jul 31, 2024
738fd26
minor changes in comparison
Almog-David Jul 31, 2024
b4a3202
added more graph plots for maxsave
Almog-David Aug 1, 2024
c2077cf
dirlay returns a list instead of dictionary
Almog-David Aug 2, 2024
7838c81
move comparisons folder
erelsgl Aug 2, 2024
1c8f3c8
ignore experiments folder
erelsgl Aug 2, 2024
23b7916
rename comparisons to experiments
erelsgl Aug 2, 2024
4b413b6
move comparisons to experiments subfolder
erelsgl Aug 2, 2024
ecb10c3
fixed problem with doctest regarding create_st_graph
Almog-David Aug 2, 2024
33f73e0
fixed path to comparisons
Almog-David Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:

- name: Test NetworkZ
run: |
pytest --doctest-modules --durations=10
pytest

- name: Test Dispatching
# Limit this to only a single combination from the matrix
if: ${{ (matrix.os == 'ubuntu') && (matrix.python-version == '3.11') }}
run: |
NetworkZ_GRAPH_CONVERT=nx-loopback pytest --doctest-modules --durations=10
NetworkZ_GRAPH_CONVERT=nx-loopback pytest

extra:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:

- name: Test NetworkZ
run: |
pytest --doctest-modules --durations=10
pytest

prerelease:
runs-on: ${{ matrix.os }}-latest
Expand All @@ -147,4 +147,4 @@ jobs:

- name: Test NetworkZ
run: |
pytest --doctest-modules --durations=10
pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
scripts
*.txt

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
NetworkZ is a library of graph algorithms in Python. It is an extension of the [NetworkX](https://github.com/networkx/networkx). It contains (by import) everything that is in NetworkX, plus some additional algorithms that were submitted into NetworkX but not merged yet. Currently, NetworkZ contains the following additional algorithms:

* [Rank-maximal matching](networkz/algorithms/bipartite/rank_maximal_matching.py): by Oriya Alperin, Liel Vaknin and Amiel Lejzor.
* [Maximum-weight fractional matching](networkz/algorithms/max_weight_fractional_matching.py): by Oriya Alperin, Liel Vaknin and Amiel Lejzor.
* [Social-aware coalition formation](networkz/algorithms/approximation/coalition_formation.py) - by Victor Kushnir.
* [Minimum cut on a graph with node capacity](networkz/algorithms/max_flow_with_node_capacity.py): by Yuval Bubnovsky, Almog David and Shaked Levi.
* [Several approximate solutions to the Firefighter problem](networkz/algorithms/approximation/firefighter_problem): by Yuval Bubnovsky, Almog David and Shaked Levi.

## Installation

Expand Down
Loading
Loading