Changes to swap rule and to acc_tuner
In order to implement the swap rule
if evj.value - evi.value < algo["maxdists"][i]
swap_ev_ij!(algo,i,j)
end
I realized I could simply change the default dist_fun into -, so that the algorithm looks at algo.dist_fun(evj.value, evi.value) being by default -(evj.value, evi.value) but still being editable by users. In addition, I changed the default maxdists to a vector of zeros, so that the default swap rule is simply evj.value < evi.value, as suggested by BGP.
I also introduced a vector acc_tuners as a field of MAlgoBGP so that each chain can have its own value for acc_tuner. This allows for more control on the algorithm. Ideally, one might want to be more restrictive (i.e., higher acc_tuner) on colder chains.
Codecov Report
Merging #26 into master will decrease coverage by
0.2%. The diff coverage is80%.
@@ Coverage Diff @@
## master #26 +/- ##
==========================================
- Coverage 52.5% 52.29% -0.21%
==========================================
Files 14 14
Lines 960 960
==========================================
- Hits 504 502 -2
- Misses 456 458 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/mopt/Examples.jl | 66.1% <ø> (ø) |
:arrow_up: |
| src/mopt/AlgoBGP.jl | 77.25% <80%> (-0.95%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update f204add...183e604. Read the comment docs.
Pull Request Test Coverage Report for Build 209
- 4 of 5 (80.0%) changed or added relevant lines in 1 file are covered.
- 2 unchanged lines in 1 file lost coverage.
- Overall coverage decreased (-0.2%) to 52.292%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/mopt/AlgoBGP.jl | 4 | 5 | 80.0% |
| <!-- | Total: | 4 | 5 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| src/mopt/AlgoBGP.jl | 2 | 77.25% |
| <!-- | Total: | 2 |
| Totals | |
|---|---|
| Change from base Build 206: | -0.2% |
| Covered Lines: | 502 |
| Relevant Lines: | 960 |
💛 - Coveralls
can you just let me know when you are done with this? Im planning to move to julia 0.7 in the coming days, so i may wait (or not) depending on that.
OK, I will do this as soon as possible!