def METHOD_NAME(dbconf, traf):
    # -------------------------------------------------------------------------
    # First, perform special Conflict Detection to find which conflicts to resolve
    # Relative horizontal positions: p[a,b] is p from a to b
    qdrrel = np.radians(dbconf.qdr-traf.trk.reshape((len(traf.trk),1)))
    xrel= np.sin(qdrrel)*dbconf.dist
    yrel= np.cos(qdrrel)*dbconf.dist
    # Define the two borders:
    b1=np.where( yrel -np.abs(xrel) > -dbconf.dist_a                ,True,False)
    b2=np.where( xrel**2 + (yrel-dbconf.dist_b)**2 < (dbconf.dist_a+dbconf.dist_b)**2   ,True,False)
    # Create conflict matrix
    dbconf.swconfl_dg = b1*b2*(1.-np.eye(traf.ntraf))
    # -------------------------------------------------------------------------
    # Second, create a list of conflicts  and aircraft indices to iterate over
    dgconfidxs = np.where(dbconf.swconfl_dg)
    dgnconf = len(dgconfidxs[0])
    dgiown = dgconfidxs[0]
    dgioth = dgconfidxs[1]
    # -------------------------------------------------------------------------
    # Third, create control matrix and find controls
    # Also, aircraft in DGconflict should follow ASAS
    dbconf.asasactive.fill(False)
    controls=np.zeros((traf.ntraf,3),dtype=np.int)
    for i in range(dgnconf):
        id1=dgiown[i]
        id2=dgioth[i]
        dbconf.asasactive[id1]=True
        dbconf.asasactive[id2]=True
        ctrl=Difgamehor(traf, dbconf,id1,id2)
        controls[id1]+=ctrl-np.array([1,1,1])
    # Now, write controls as limits in traf class
    # First: limit superpositioned controls to maximum values
    controls+=np.array([1,1,1])
    maxcontrols=np.array([2,2,2])
    controls=np.where(controls<0,0,controls)
    controls=np.where(controls>maxcontrols,maxcontrols,controls)
    # From indices to values
    acccontrol=dbconf.a_o[controls[:,0]]
    bankcontrol=dbconf.b_o[controls[:,1]]
    climbcontrol=traf.avsdef*np.sign(controls[:,2])
    # Now assign in the traf class --------------------------------------------
    # Change autopilot desired speed
    dbconf.asasspd=vtas2eas(np.where(acccontrol==0,traf.gs,\
        np.where(acccontrol>0,traf.perf.vmax,traf.perf.vmin)),traf.alt)
    # Set acceleration for aircraft in conflict
    traf.ax=np.where(dbconf.asasactive,abs(acccontrol),kts)
    # Change autopilot desired heading
    dbconf.asashdg=np.where(bankcontrol==0,traf.trk,\
        np.where(bankcontrol>0,traf.trk+90,traf.trk-90))%360
    # Set bank angle for aircraft in conflict
    traf.ap.aphi=np.radians(np.where(dbconf.asasactive,np.abs(bankcontrol),25.))
    # Change autopilot desired altitude
    traf.aalt=np.where(climbcontrol==0,traf.alt,\
        np.where(climbcontrol>0,1e9,-1e9))
    # Set climb rate for aircraft in conflict
    dbconf.asasvsp=np.abs(climbcontrol)