Skip to content

Deprecate Allocate-Load #1341

@blegat

Description

@blegat

The purpose of Allocate-Load is to be able to communicate the model in two-pass across layers without the need to create intermediate CachingOptimizer.
However, it's not yet implemented by the bridge optimizers and it's not clear to me whether there is a way to do this without complicating the job of creating new bridges for users.
This new features #1286 allows to pass non-bridges constraints across layers which allows to avoid copying the function as the destination model of the copy can get the CanonicalConstraintFunction directly from the source model.
So a model needed Allocate-Load could implement MOIU.pass_nonvariable_constraints instead and it would work if no constraint if bridges.
To also work with bridging constraints, it should also implement MOI.add_constraint but only allow it to be called during the copy operation.
This is what is done for MatrixOfConstraints: #1287.
In fact, I expect most solver needing Allocate-Load to be rewritten with MatrixOfConstraints like Clp in jump-dev/Clp.jl#111.
The only two exceptions are CSDP and SDPA but there is no point in keeping the Allocate-Load API just for these two.
I'll keep this open until we're close to releasing v0.10 to evaluate if things happens as expected and then we can decide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions