choco-solver icon indicating copy to clipboard operation
choco-solver copied to clipboard

[proposal] Heuristic interface to light parrallel solve call

Open glelouet opened this issue 9 years ago • 2 comments
trafficstars

The goal is to

  • reduce the code required to make parallel search
  • objectify the Strategy management, thus giving more visibility on the creation of strategies.

My proposal :

  • a functional interface Heuristic, basically a Function<T extends Model, AbstractStrategy<?>> generating an AbstractStrategy from a Model.
  • a new method in IResolutionHelper, namely <T extends Model> Solution findOptimalParallel(IntVar objective, boolean maximize, Function<T, T> modelDuplicator, Criterion stop, Heuristic... heuristics). This method creates a portfolio, iterate over the heuristics, uses the duplicator to duplicate the objective's model past first heuristic, configure this model with corresponding heuristics, then launches the search.

glelouet avatar Jul 19 '16 13:07 glelouet

https://github.com/chocoteam/choco-solver/pull/435

glelouet avatar Jul 19 '16 14:07 glelouet

no test yet though.

glelouet avatar Jul 19 '16 14:07 glelouet