Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

2-pass copy #56

Open
blegat opened this issue Jan 15, 2018 · 2 comments
Open

2-pass copy #56

blegat opened this issue Jan 15, 2018 · 2 comments

Comments

@blegat
Copy link
Member

blegat commented Jan 15, 2018

As introduced in #48 (comment), we can distinguish layers of a composition of MOI instances as 1-IO, 2-IO or ∞-IO.
The InstanceManager, plays a central role as it has 1-I and ∞-O. This allows to make 1-IO layers and ∞-IO layers to be used together as follows :

All 1-IO ( InstanceManager ( All ∞-IO ( Solver ) ) )

One question remains : What should we do if there are 2-IO intermediate layers ?

  • Scenario 1 : There are none.
  • Scenario 2 : Make the InstanceManager implement 2-I so that we can do
All 1-IO ( InstanceManager ( All 2-IO ( InstanceManager ( All ∞-IO ( Solver ) ) ) ) )
  • Scenario 2 : Make all solvers implement 2-I so that we can do
All 1-IO ( InstanceManager ( All ∞-IO ( All 2-IO ( Solver ) ) ) )
  • Scenario 3 : Make all 1-IO implement 2-IO so that we can do
All 1-IO and 2-IO ( InstanceManager ( All ∞-IO ( Solver ) ) )
@blegat
Copy link
Member Author

blegat commented Feb 7, 2018

In the current situation, a layer has 4 choices:

  1. Implements 1-IO, in this case, it can only contain 1-IO layers and solver
  2. Implements 2-IO and 1-IO, in this case, it can only contain both 2-IO and 1-IO layers and solver
  3. Implements ∞-IO, 2-IO and 1-IO, in this case it can contain layers and solver of any IO.
  4. Implements 1-IO and the InstanceManager API (resetsolver!, ...) by passing it along to the internal instance, in this case it can contain the InstanceManager which can contain himself anything since it has ∞ output.

I was initially tempted to use approach 4) for bridges but after the discussion in #65, it seems that approach 2) is preferable. This means that the MOIU instance is on his own for handling custom constraint types : jump-dev/JuMP.jl#1152. We should have something different than bridges for instance-without-optimize! that want to support arbitrary constraints.

@blegat
Copy link
Member Author

blegat commented Feb 8, 2018

Thinking about it more, making bridges implement approach 2) isn't a good idea. Making them support 2-IO requires adding caching and complicate each bridge a lot. Approach 4) seems better, it also has the advantage of making bridge usable for ∞-IO solvers.
This doesn't change the fact that we need #84. If someone want to use a solver that supports a set not defined in MOI. The nonexistence of bridges for constraints with this set shouldn't block him.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant