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

Setting starting values for vector variable bridges #2117

Open
blegat opened this issue Mar 13, 2023 · 0 comments
Open

Setting starting values for vector variable bridges #2117

blegat opened this issue Mar 13, 2023 · 0 comments
Labels
Submodule: Bridges About the Bridges submodule
Milestone

Comments

@blegat
Copy link
Member

blegat commented Mar 13, 2023

This is working for FlipSignBridge since it just multiply by -1 but for a linear map that is not diagonal, we cannot set the starting values variable by variable.

function MOI.set(
model::MOI.ModelLike,
attr::MOI.VariablePrimalStart,
bridge::SetMapBridge,
value,
i::MOI.Bridges.IndexInVector,
)
bridged_value = MOI.Bridges.inverse_map_function(typeof(bridge), value)
MOI.set(model, attr, bridge.variables[i.value], bridged_value)
return
end

We would need to cache the vector of starting values in the bridge and then do the linear map in final_touch.

Alternatively, this caching could be done by BridgeOptimizer to simplify the job of each bridge but that caching isn't needed for FlipSignBridge so it could be a waste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Submodule: Bridges About the Bridges submodule
Development

No branches or pull requests

2 participants