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 identity_index_map and fix DoubleDict bug #1329

Merged
merged 3 commits into from
May 12, 2021
Merged

Conversation

blegat
Copy link
Member

@blegat blegat commented May 10, 2021

Needed for jump-dev/Clp.jl#111

@@ -417,7 +417,9 @@ end
end

function initialize_inner!(d::AbstractWithType{F,S,V,D}) where {F,S,V,D}
return d.inner = D()
d.inner = D()
d.dict.dict[(F, S)] = d.inner
Copy link
Member

Choose a reason for hiding this comment

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

Ah. I ran into this with the NL writer, but I assumed it was expected behavior.

src/Utilities/copy.jl Outdated Show resolved Hide resolved
index_map[ci] = ci
end
end
function identity_index_map(model::MOI.ModelLike)
Copy link
Member

Choose a reason for hiding this comment

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

Why is this function needed?

Copy link
Member

Choose a reason for hiding this comment

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

Is every solver going to need to do this?
https://github.com/jump-dev/Clp.jl/pull/111/files#diff-18c6af231f3facc5ba10dd45231da349efda22ecd8d68a4661dee8027bc413a7R302

If so, it needs a docstring and to be added to the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I expect it to be used a lot. I can add docstring :)

@blegat blegat force-pushed the bl/identity_index_map branch from b4b7511 to 5820e4f Compare May 12, 2021 00:34
@blegat blegat merged commit a31a2fa into master May 12, 2021
@blegat blegat deleted the bl/identity_index_map branch May 12, 2021 00:42
@blegat blegat added this to the v0.10 milestone May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants