def METHOD_NAME (x, y):
    SourceT = x[:,0]
    SinkT = x[:,1]
    SourceH = y[:,0]
    SinkH = y[:,1]
    count = 0
    for i in range(SourceT.shape[0]):
           for j in range(SourceT.shape[0]):  
              if (j!=i): 
                    #print ("source temperature is " +  str(SinkT[i,0]) + " sink temperature is " + str(SinkT[j,0]) )
                    criteria = SourceT[i] - SinkT[j]
                    if criteria >= 0:
                        if count == 0: M = np.matrix([SourceH[i], SinkH[j], i+1, j+1])
                        else: 
                            newrow = np.matrix([SourceH[i], SinkH[j], i+1, j+1])
                            M = np.vstack([M, newrow])
                        #print ("waste heat recovery from " + str(i+1) +  " to " + str(j+1) + " is possible")
                        #print (' ')
                        count = count + 1
                    #else:
                        #print ("waste heat recovery from " + str(i+1) +  " to " + str(j+1) + " is impossible")
                        #print (' ')
    #print (M)      
    #print (count)
    #print ('After transportation network modelling, we find that:\n There are ' + str(count) + 
    #   ' total possible waste heat recovery energy flows in the network')
    #print ('')
    #print ('There possible energy flows are:\n')
    add2Results("flowNumber", str(count))
    flowList = []
    for i in range(count):
       #print ("From plant %s to plant %s" %(M[i,2],M[i,3]))
       flowList.append([M[i,2],M[i,3]])
    add2Results("flowList", flowList)
    # optimization of energy network, formulation and solution of the otpimization problem (step 3 in the paper)
    c = [-1, -1, -1, -1, -1, -1, -1]
    AA = [[1,0,0,0,0,0,0],[0,1,0,0,0,0,0],[0,0,1,1,1,1,0],[0,0,0,0,0,0,1],[1,1,0,1,0,0,1],[0,0,1,0,0,0,0],[0,0,0,0,1,0,0],[0,0,0,0,0,1,0]]
    bb = [5766,2164,2150,1467,895,1512,1645,994]
    x0_bounds = (0, None)
    x1_bounds = (0, None)
    x2_bounds = (0, None)
    x3_bounds = (0, None)
    x4_bounds = (0, None)
    x5_bounds = (0, None)
    x6_bounds = (0, None)
    res = linprog(c, A_ub=AA, b_ub=bb, bounds=(x0_bounds, x1_bounds,x2_bounds, x3_bounds, x4_bounds,x5_bounds, x6_bounds),
              options={"disp": True})
    #print (res)
    #print ('')
    #print ('After network optimization, we find that the optimal waste heat recovery network is:\n')
    modifyList = []
    for i in range(count):
      if i < len(res.x) and res.x[i] != 0:
         modifyList.append([M[i,2],M[i,3],res.x[i]])
         #print ("%s kW waste heat from plant %s to plant %s" %(res.x[i],M[i,2],M[i,3])) \
    add2Results("modifyList", modifyList)
    #print ('')
    #print ('Under such a design configuration, the whole eco-industrial park can save %s kW energy' %(-res.fun))
    add2Results("saveNumber", -res.fun)
    print ("JSON"+str(json.dumps(ResultJSON)))