code: public int ENgetpatternindex( String id ) throws EpanetException {
          int[] index = new int[1];
          int error = epanet.ENgetpatternindex(id, index);
          checkError(error);
          return index[0];
      }
docs: Retrieves the index of a particular time pattern.
  
  @param id pattern ID label.
  @return the pattern index.
  @throws EpanetException