class_docstr: Function calling Pyomo model
  
  Parameters
  ----------
  model: pyomo.environ.model
      Pyomo model
  
  Returns
  -------
  float
      the fitness
  
  Notes
  -----
  - You will require an Pyomo installation (with pip: "pip install pyomo")
  - Any changes on the model externally can lead to unexpected behaviours.
class_docstr_tok: ["Function","calling","Pyomo","model","Parameters","--","--","--","--","--","model",":","pyomo.environ.model","Pyomo","model","Returns","--","--","--","-","float","the","fitness","Notes","--","--","-","-","You","will","require","an","Pyomo","installation","(","with","pip",":","``","pip","install","pyomo","''",")","-","Any","changes","on","the","model","externally","can","lead","to","unexpected","behaviours","."]
code: def _pyomo_constraint_wrapper(
      self, i: int, instru: tp.ArgsKwargs
  ) -> bool:
      k_model_variables = instru[1]
      # Combine all constraints into single one
      self._pyomo_value_assignment(k_model_variables)
      if isinstance(
          self.all_constraints[i],
          pyomo.base.constraint.SimpleConstraint,
      ):
          return bool(
              pyomo.value(
                  self.all_constraints[i].expr(self._model_instance)
              )
          )
      elif isinstance(
          self.all_constraints[i],
          pyomo.base.constraint.IndexedConstraint,
      ):
          ret = True
          for _, c in self.all_constraints[i].items():
              ret = ret and pyomo.value(c.expr(self._model_instance))
              if not ret:
                  break
          return ret
      else:
          raise NotImplementedError(
              f"Constraint type {self.all_constraints[i].ctype} is not supported yet."
          )
  
file_path: nevergrad/nevergrad/functions/pyomo/core.py
imports: from functools import partial
  import numpy
  import pyomo.environ
  import nevergrad.common.typing
  from nevergrad.parametrization import parameter
  from ..None import base
label_desc: Use image node_id 4 for calling the Pyomo obj's underlying member method code with example usage: obj._pyomo_constraint_wrapper(i, instru) and returns: bool, ret