initialize_with_global_opt

(function from pyomo.devel.initialization.initialize)

pyomo.devel.initialization.initialize.initialize_with_global_opt(nlp: BlockData, nlp_solver: SolverBase | None = None, global_solver: SolverBase | None = None, skip_initial_nlp_solve: bool = False) Results[source]

Attempt to initialize and subsequently solve the model given by nlp. The basic idea is to apply some method to find good initial values for the variables and then try to solve the problem with nlp_solver.

Parameters:
  • nlp (BlockData) – The pyomo model to be initialized.

  • nlp_solver (Optional[SolverBase]) – A solver interface appropriate for NLPs. Default: ipopt

  • global_solver (Optional[SolverBase]) – A solver interface appropriate for global solution of NLPs Default: gurobi_direct_minlp

  • skip_initial_nlp_solve (bool) – If True, the initial attempt at solving the NLP without initialization will be skipped.

Returns:

res – The results object obtained the last time the nlp_solver was used to try and solve the model.

Return type:

pyomo.contrib.solver.common.results.Results