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, int)andsolve(ModelDispatcher, IntExpression[], int)for feasibility problems.optimize(ModelDispatcher, Objective, int)andoptimize(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 recordFinal outcome returned bysolve(org.maxicp.ModelDispatcher, int)andoptimize(org.maxicp.ModelDispatcher, org.maxicp.modeling.symbolic.Objective, int).static 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.Resultoptimize(ModelDispatcher model, Objective objective, int timeLimitInSeconds) Solves an optimization model with automatic decision variable discovery and default black-box settings.static ModelingBlackBox.Resultoptimize(ModelDispatcher model, Objective objective, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.OptimizeConfig> configurer) Solves an optimization model with automatic decision variable discovery and caller-provided configuration.static ModelingBlackBox.Resultsolve(ModelDispatcher model, int timeLimitInSeconds) Solves a feasibility model with automatic decision variable discovery and default black-box settings.static ModelingBlackBox.Resultsolve(ModelDispatcher model, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.SolveConfig> configurer) Solves a feasibility model with automatic decision variable discovery and 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
Solves a feasibility model with automatic decision variable discovery and default black-box settings. -
solve
public static ModelingBlackBox.Result solve(ModelDispatcher model, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.SolveConfig> configurer) Solves a feasibility model with automatic decision variable discovery and caller-provided configuration. -
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, Objective objective, int timeLimitInSeconds) Solves an optimization model with automatic decision variable discovery and default black-box settings. -
optimize
public static ModelingBlackBox.Result optimize(ModelDispatcher model, Objective objective, int timeLimitInSeconds, UnaryOperator<ModelingBlackBox.OptimizeConfig> configurer) Solves an optimization model with automatic decision variable discovery and 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.
-