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

Create local artifical variables in setconstr! #336

Merged
merged 7 commits into from
May 12, 2020
Merged

Conversation

guimarqu
Copy link
Contributor

@guimarqu guimarqu commented May 11, 2020

  • keywork argument for setconstr! to create the local artificial variables with the constraint
  • (de)activate a constraint and its artificial variables at the same time

@guimarqu guimarqu changed the title Create local artifical variables in constraints Create local artifical variables in setconstr! May 11, 2020
@codecov
Copy link

codecov bot commented May 11, 2020

Codecov Report

Merging #336 into master will increase coverage by 0.05%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #336      +/-   ##
==========================================
+ Coverage   75.71%   75.77%   +0.05%     
==========================================
  Files          51       51              
  Lines        3624     3641      +17     
==========================================
+ Hits         2744     2759      +15     
- Misses        880      882       +2     
Impacted Files Coverage Δ
src/MathProg/clone.jl 100.00% <ø> (ø)
src/MathProg/formulation.jl 68.84% <72.41%> (-0.09%) ⬇️
src/MathProg/new_varconstr.jl 84.44% <85.71%> (-0.08%) ⬇️
src/MathProg/constraint.jl 88.88% <100.00%> (ø)
src/MathProg/decomposition.jl 93.78% <100.00%> (+2.23%) ⬆️
src/MOIwrapper.jl 83.06% <0.00%> (+0.80%) ⬆️
src/Algorithm/branching/branchinggroup.jl 77.52% <0.00%> (+1.12%) ⬆️

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 680d441...acd161c. Read the comment docs.

@guimarqu guimarqu marked this pull request as ready for review May 12, 2020 09:05
@guimarqu guimarqu requested a review from rrsadykov May 12, 2020 09:05
@rrsadykov
Copy link
Collaborator

art_var_ids::Vector{VarId} is needed only for master constraints.
Is there a way to store duty-dependent data in constraints and variables?
For example, if a column is a route we would need to store a vector representing the sequence of arc ids. Non-linear constraints and cuts would need to store special information dependent on the constraint type in order to calculate coefficients for columns.

@guimarqu
Copy link
Contributor Author

art_var_ids::Vector{VarId} is needed only for master constraints.
Is there a way to store duty-dependent data in constraints and variables?
For example, if a column is a route we would need to store a vector representing the sequence of arc ids. Non-linear constraints and cuts would need to store special information dependent on the constraint type in order to calculate coefficients for columns.

Ok but you cannot know that the column is a route. The duty is column not route. You should store that outside MathProg. Same for non-linear constraints.

@rrsadykov
Copy link
Collaborator

Ok, for artificial variables we may leave like this for now.
I agree that specific variable and constraint information should be stored outside MathProg. But MathProg should provide a way to associate this information to VarConstr.
Later, we will need to implement management of dynamic variables and constraints: we should be able to delete a varconstr from memory permanently. And when a varconstr deleted, the associated information should be deleted too. We cannot determine that the associated information should be deleted outside MathProg.

@guimarqu guimarqu merged commit 473fc42 into master May 12, 2020
@guimarqu guimarqu deleted the artvarinconstrs branch May 12, 2020 12:09
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