def METHOD_NAME(self):
    c_values = { 'M1': 0.2, 'M2': 0.2, 'M3': 0.2 }
    r_values = { 'M1': 50, 'M2': 50, 'M3': 50, ('M1', 'M2'): 25, ('M2', 'M3'): 25 }
    directions = { 'M1': 'V', 'M2': 'H', 'M3': 'V' }
    distances = { 'V': 0.80, 'H': 0.84 } # microns per grid
    def layer2dist(ly):
        return distances[directions[ly]]
    nodes = set()
    for t0, t1 in self.segments:
        nodes.add(t0)
        nodes.add(t1)
    nodes_alt = set()
    for k, lst in self.raster.items():
        x, y = k
        for ty, l in lst:
            nodes_alt.add( (x,y,l))
    assert nodes == nodes_alt
    resistors = []
    capacitors = defaultdict(int)
    for t0, t1 in self.segments:
        x0, y0, l0 = t0
        x1, y1, l1 = t1
        if l0 != l1: # via
            r = r_values[(l0,l1)]
            resistors.append((t0,t1,r))
        else:
            r = r_values[l0] * layer2dist(l0)
            c = c_values[l0] * layer2dist(l0)
            resistors.append((t0,t1,r))
            capacitors[t0] += c/2
            capacitors[t1] += c/2
    nodes_a = list(nodes)
    node_mapping = {t: i for i, t in enumerate(nodes_a)}
    g = MNA(len(nodes_a))
    for t0, t1, r in resistors:
        g.add_r( node_mapping[t0], node_mapping[t1], r)
    for t, c in capacitors.items():
        g.add_c(node_mapping[t], c)
    for k, lst in self.raster.items():
        for ty, l in lst:
            if ty == 'driver':
                t = k[0], k[1], l
                g.add_r( -1, node_mapping[t], 0)
    receiver_count = sum(1 for k, lst in self.raster.items() for ty, _ in lst if ty == 'receiver')
    for k, lst in self.raster.items():
        for ty, l in lst:
            if ty == 'receiver':
                t = k[0], k[1], l
                g.add_d( node_mapping[t], 1/receiver_count)
    g.semantic()
    print('Obj:', g.objective())