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_value_assignment(
      self, k_model_variables: tp.Dict[str, tp.Any]
  ) -> None:
      if self._value_assignment_code_obj == "":
          code_str = ""
          for k in k_model_variables:
              code_str += f"self._model_instance.{k} = k_model_variables['{k}']\n"
          self._value_assignment_code_obj = compile(code_str, "<string>", "exec")  # type: ignore
      # TODO find a way to avoid exec
      exec(self._value_assignment_code_obj)
  
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 2 for calling the Pyomo obj's underlying member method code with example usage: obj._pyomo_value_assignment(k_model_variables) without return types