class_docstr: Class to add a Linear Tree GDP formulation to OmltBlock. We use Pyomo.GDP
  to create the disjuncts and disjunctions and then apply a transformation
  to convert to a mixed-integer programming representation.
  
  .. math::
      \begin{align*}
          & \underset{\ell \in L}{\bigvee} \left[ \begin{gathered}
          Z_{\ell} \\
          \underline{x}_{\ell} \leq x \leq \overline{x}_{\ell}  \\
          d = a_{\ell}^T x + b_{\ell} \end{gathered} \right] \\
          & \texttt{exactly_one} \{ Z_{\ell} : \ell \in L \} \\
          & x^L \leq x \leq x^U \\
          & x \in \mathbb{R}^n \\
          & Z_{\ell} \in \{ \texttt{True, False} \} \quad \forall \ \ell \in L
      \end{align*}
  
  Additional nomenclature for this formulation is as follows:
  
  .. math::
      \begin{align*}
      Z_{\ell} &:= \text{Boolean variable indicating which leaf is selected} \\
      \overline{x}_{\ell} &:= \text{Vector of upper bounds for leaf } \ell \in L \\
      \underline{x}_{\ell} &:= \text{Vector of lower bounds for leaf } \ell \in L \\
      x^U &:= \text{Vector of global upper bounds} \\
      x^L &:= \text{Vector of global lower bounds} \\
      \end{align*}
  
  
  Attributes:
      Inherited from _PyomoFormulation Class
      model_definition : LinearTreeDefinition object
      transformation : choose which transformation to apply. The supported
          transformations are bigm, mbigm, hull, and custom.
  
  References:
      * Ammari et al. (2023) Linear Model Decision Trees as Surrogates in
        Optimization of Engineering Applications. Computers & Chemical Engineering
      * Chen et al. (2022) Pyomo.GDP: An ecosystem for logic based modeling and
        optimization development. Optimization and Engineering, 23:607–642
class_docstr_tok: ["Class","to","add","a","Linear","Tree","GDP","formulation","to","OmltBlock",".","We","use","Pyomo.GDP","to","create","the","disjuncts","and","disjunctions","and","then","apply","a","transformation","to","convert","to","a","mixed-integer","programming","representation",".","..","math",":",":","\\begin","{","align","*","}","&","\\underset","{","\\ell","\\in","L","}","{","\\bigvee","}","\\left","[","\\begin","{","gathered","}","Z_","{","\\ell","}","\\\\","\\underline","{","x","}","_","{","\\ell","}","\\leq","x","\\leq","\\overline","{","x","}","_","{","\\ell","}","\\\\","d","=","a_","{","\\ell","}","^T","x","+","b_","{","\\ell","}","\\end","{","gathered","}","\\right","]","\\\\","&","\\texttt","{","exactly_one","}","\\","{","Z_","{","\\ell","}",":","\\ell","\\in","L","\\","}","\\\\","&","x^L","\\leq","x","\\leq","x^U","\\\\","&","x","\\in","\\mathbb","{","R","}","^n","\\\\","&","Z_","{","\\ell","}","\\in","\\","{","\\texttt","{","True",",","False","}","\\","}","\\quad","\\forall","\\","\\ell","\\in","L","\\end","{","align","*","}","Additional","nomenclature","for","this","formulation","is","as","follows",":","..","math",":",":","\\begin","{","align","*","}","Z_","{","\\ell","}","&",":","=","\\text","{","Boolean","variable","indicating","which","leaf","is","selected","}","\\\\","\\overline","{","x","}","_","{","\\ell","}","&",":","=","\\text","{","Vector","of","upper","bounds","for","leaf","}","\\ell","\\in","L","\\\\","\\underline","{","x","}","_","{","\\ell","}","&",":","=","\\text","{","Vector","of","lower","bounds","for","leaf","}","\\ell","\\in","L","\\\\","x^U","&",":","=","\\text","{","Vector","of","global","upper","bounds","}","\\\\","x^L","&",":","=","\\text","{","Vector","of","global","lower","bounds","}","\\\\","\\end","{","align","*","}","Attributes",":","Inherited","from","_PyomoFormulation","Class","model_definition",":","LinearTreeDefinition","object","transformation",":","choose","which","transformation","to","apply",".","The","supported","transformations","are","bigm",",","mbigm",",","hull",",","and","custom",".","References",":","*","Ammari","et","al",".","(","2023",")","Linear","Model","Decision","Trees","as","Surrogates","in","Optimization","of","Engineering","Applications",".","Computers","&","Chemical","Engineering","*","Chen","et","al",".","(","2022",")","Pyomo.GDP",":","An","ecosystem","for","logic","based","modeling","and","optimization","development",".","Optimization","and","Engineering",",","23:607\u2013642"]
docstr: The indexes of the formulation inputs.
docstr_tok: ["The","indexes","of","the","formulation","inputs","."]
code: def input_indexes(self):
      """The indexes of the formulation inputs."""
      return list(range(self.model_definition.n_inputs))
  
file_path: OMLT/src/omlt/linear_tree/lt_formulation.py
imports: import numpy
  import pyomo.environ
  from pyomo.gdp import Disjunct
  from omlt.formulation import _PyomoFormulation, _setup_scaled_inputs_outputs
label_desc: Use image node_id 2 for calling the LinearTreeGDPFormulation obj's underlying member method code with example usage: obj.input_indexes() and returns: list