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.
This is working for
FlipSignBridgesince it just multiply by-1but for a linear map that is not diagonal, we cannot set the starting values variable by variable.MathOptInterface.jl/src/Bridges/Variable/set_map.jl
Lines 182 to 192 in 5025b50
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
BridgeOptimizerto simplify the job of each bridge but that caching isn't needed forFlipSignBridgeso it could be a waste.