Model Configuration
A ModelConfiguration accumulates the decision
variables, objectives, and constraints that define an optimisation problem.
ModelConfiguration
ModelConfiguration — the decision variables, objectives, and constraints
of an optimisation problem, plus per-model solver flags.
- class ModelConfiguration[source]
Decision variables, objectives, constraints, and solver-level flags for one model.
- set_disable_seed_solution(disable_seed_solution)[source]
Disable the seed solution loaded from input data.
- Return type:
- set_calculated_seed(calculated_seed)[source]
Enable computing the seed solution from formulas instead of input data.
- Return type:
- set_validation_enabled(validation_enabled)[source]
Enable or disable validators on the input data.
- Return type:
- set_hide_objective_when_infeasible(hide_objective_when_infeasible)[source]
Hide objective values from the UI when the solution is infeasible.
- Return type:
- set_stochastic_configuration(stochastic_configuration)[source]
Attach a
StochasticConfigurationfor multi-trial evaluation.- Return type:
- set_external_configuration(custom_evaluator_version, custom_evaluator_key, external_configuration)[source]
Route evaluation through an external evaluator with the given version, key, and
ExternalModelConfigurationmappings.- Return type:
- add_decision_variable(dv, dv_table=None, dv_type=DVType.RANGE)[source]
Register a decision variable.
- Parameters:
- Return type:
- Returns:
The new
DecisionVariable; chain.set_min(...)and.set_max(...)to bound it.
- add_objective(objective, maximise=False, priority=Priority.HIGH, weight=1.0, name=None)[source]
Register an
Objective.- Parameters:
- Return type:
- add_constraint(constraint)[source]
Register a
Constraintover a numeric calculation.Returns the new
Constraint; chain.set_type(...)and.set_lower_bound(...)/.set_upper_bound(...)to configure it.- Return type:
- add_scenario_output(name, scenario_output_value, scenario_output_table=None)[source]
Register a
ScenarioOutputexposed in scenario comparison.- Raises:
ValueError – If
nameor the resolved cell reference duplicates an existing scenario output.- Return type: