java.lang.Object
org.maxicp.search.blackbox.ModelingBlackBox
Convenience entry points for running
BlackBoxSearch from the modeling layer.
The API exposes two workflows:
solve(ModelDispatcher, IntExpression[], int)for feasibility problems.optimize(ModelDispatcher, IntExpression[], Objective, int)for optimization problems.
Both workflows accept optional configurers to tune phase options, phase time shares and verbosity.
The underlying model is executed through model.runCP(...) and returns a compact ModelingBlackBox.Result.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration object used by optimization solves.static final recordstatic final classConfiguration object used by feasibility solves. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelingBlackBox.Resultoptimize(ModelDispatcher model, IntExpression[] decisionVars, Objective objective, int timeLimitInSeconds) Solves an optimization model with default black-box settings.static ModelingBlackBox.Resultoptimize(ModelDispatcher model, IntExpression[] decisionVars, Objective objective, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.OptimizeConfig> configurer) Solves an optimization model with caller-provided configuration.static ModelingBlackBox.Resultsolve(ModelDispatcher model, IntExpression[] decisionVars, int timeLimitInSeconds) Solves a feasibility model with default black-box settings.static ModelingBlackBox.Resultsolve(ModelDispatcher model, IntExpression[] decisionVars, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.SolveConfig> configurer) Solves a feasibility model with caller-provided configuration.
-
Method Details
-
solve
public static ModelingBlackBox.Result solve(ModelDispatcher model, IntExpression[] decisionVars, int timeLimitInSeconds) Solves a feasibility model with default black-box settings. -
solve
public static ModelingBlackBox.Result solve(ModelDispatcher model, IntExpression[] decisionVars, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.SolveConfig> configurer) Solves a feasibility model with caller-provided configuration. -
optimize
public static ModelingBlackBox.Result optimize(ModelDispatcher model, IntExpression[] decisionVars, Objective objective, int timeLimitInSeconds) Solves an optimization model with default black-box settings. -
optimize
public static ModelingBlackBox.Result optimize(ModelDispatcher model, IntExpression[] decisionVars, Objective objective, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.OptimizeConfig> configurer) Solves an optimization model with caller-provided configuration.
-