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

Add bound callback tests #532

Merged
merged 6 commits into from
May 21, 2021
Merged

Add bound callback tests #532

merged 6 commits into from
May 21, 2021

Conversation

laradicp
Copy link
Contributor

No description provided.

@laradicp laradicp requested a review from guimarqu May 20, 2021 03:27
@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #532 (7a7c36d) into release-0.4.0 (ba83639) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##           release-0.4.0     #532   +/-   ##
==============================================
  Coverage          84.62%   84.62%           
==============================================
  Files                 49       49           
  Lines               4670     4670           
==============================================
  Hits                3952     3952           
  Misses               718      718           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba83639...7a7c36d. Read the comment docs.


JuMP.optimize!(model)
# Branching constraint: x[1,1]>=1.0
cbdata = MathProg.PricingCallbackData(model.moi_backend.inner.re_formulation.master)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the pricing callback, we pass the subproblem formulation

cbdata = MathProg.PricingCallbackData(spform, algo.stage)

Are you sure it's a good idea to check this after the end of the optimize! ? I don't think we should guarantee that Coluna will maintain the state of the formulations after optimization ended.

Copy link
Contributor Author

@laradicp laradicp May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. How can I know from the callback in which node the pricing is being made?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't but you can assume that the last time you retrieved the current bounds was in the second node.

test/bound_callback_tests.jl Outdated Show resolved Hide resolved
test/bound_callback_tests.jl Outdated Show resolved Hide resolved
test/bound_callback_tests.jl Outdated Show resolved Hide resolved
test/bound_callback_tests.jl Outdated Show resolved Hide resolved
test/bound_callback_tests.jl Outdated Show resolved Hide resolved
@@ -0,0 +1,85 @@
function bound_callback_tests()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a little comment to describe what you do ?

laradicp and others added 2 commits May 20, 2021 19:40
Co-authored-by: Guillaume Marques <[email protected]>
@guimarqu guimarqu merged commit b626c86 into release-0.4.0 May 21, 2021
@guimarqu guimarqu deleted the bound_callback branch May 21, 2021 15:42
guimarqu added a commit that referenced this pull request Jun 14, 2021
* dev branch to prepare release of 0.4.0

* Move storage & records in ColunaBase (#507)

* Renaming in storage (#509)

* RecordContainer -> RecordWrapper

* state -> record

* rename lot of things, remove getters of Storage not used by Algorithms

* Storage -> StorageUnitWrapper

* Deletion of `AbstractData`  (#510)

* RecordContainer -> RecordWrapper

* state -> record

* rename lot of things, remove getters of Storage not used by Algorithms

* start removing AbstractData structs

* tests ok

* getunit -> getstorageunit;  StorageDict -> Storage

* fix docstring

* Bijection StorageUnit -> Record (#518)

* Bijection StorageUnit -> Record

* address Ruslan's comments

* Implementation of column generation stages  (#525)

* Implementation of column generation stages (for example, heuristic and exact stage)

* Update after conversation with Guillaume + stabilization correction

* Simplification for ColCutGenConquer

* Some more modifs due to Guillaume comments

* Counting the number of exact calls when testing the pricing stages (#530)

* Add bound callback tests (#532)

* add bound callback tests

* include bound callback in runtests

* fix test

* Apply suggestions from code review

Co-authored-by: Guillaume Marques <[email protected]>

* add comment

* Apply suggestions from code review

Co-authored-by: Guillaume Marques <[email protected]>

Co-authored-by: Guillaume Marques <[email protected]>

* Vector of optimizers in `Formulation` (#534)

* vector of optimizers in formulation

* solver_id -> optimizer_id

* add Manifest

* update Manifest

* remove Manifest because does not work

* changes

* rm files

* address Ruslan's comment

* Update src/MathProg/optimizerwrappers.jl

Co-authored-by: Vitor Nesello <[email protected]>

* add Manifest

* change ci

* remove ci change

* rm Manifest

Co-authored-by: Vitor Nesello <[email protected]>

* UnitsUsageDict -> UnitsUsage (#522)

* UnitsUsageDict -> UnitsAccess

* wip

* improve

* tests ok

* Custom data for variables and constraints (#495)

* draft for support of customer data

* custom data in solution

* custom data for cut callback

* computecoeff

* store custom data of solutions in manager

* add Manifest

* rm Manifest

* Support to custom cuts over custom data assigned to columns with new test

* tests ok

Co-authored-by: Artur Alves Pessoa <[email protected]>

* Prototyping custom model/optimizer (#535)

* Start example

* wip draft

* continue

* add map

* works with caching optimizer

* varids in Env

* wrong result

* multiply costs by -1

* fix scaling

* Apply suggestions from code review

* Update test/interfaces/model.jl

Co-authored-by: Lara Pontes <[email protected]>

* Follow up of "custom data" (#538)

* add AbstractCustomData and set/get inc_val

* fix bugs

* remove duplicate methods

* delete unnecessary prefixes and fix some bugs

* revert some changes and update docstring

* custom information for dw sp (#542)

* docstring for restricted master heuristic (#543)

* docstring for restricted master heuristic

* Update src/Algorithm/conquer.jl

* Refactoring `ObjValues` & `OptimizationState` (#544)

* clean + doc

* move doc from objvalues to optstate; tests of objvalues; update ci

* update

* update branching priorioty deprecated method

* tests ok

* tests ok

* tests ok

* delete duplicated tests

Co-authored-by: Ruslan Sadykov <[email protected]>
Co-authored-by: Artur Pessoa <[email protected]>
Co-authored-by: Lara di Cavalcanti Pontes <[email protected]>
Co-authored-by: Vitor Nesello <[email protected]>
Co-authored-by: Lara Pontes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants