def METHOD_NAME(base_net):
    net = base_net
    pp.create_gen(net, 1, p_mw=0.1, vm_pu = 1.05, controllable=True, min_p_mw=0.005, max_p_mw=0.150,
                  max_q_mvar=0.05, min_q_mvar=-0.05)
    # pwl costs
    # maximize the sgen feed in by using a positive cost slope
    # using a slope of 1
    #                   |   /
    #                   |  /
    #                   | /
    #                   |/
    #-------------------------------------------
    #    p_min_mw      /|
    #                 / |
    #                /  |
    pp.create_pwl_cost(net, 0, "gen", [[0, net.gen.max_p_mw.at[0], 1]])
    pp.runopp(net)
    assert isclose(net.res_cost, net.res_gen.p_mw.at[0], atol=1e-3)
    # minimize the sgen feed in by using a positive cost slope
    # using a slope of 1
    #               \   |
    #                \  |
    #                 \ |
    #                  \|
    #-------------------------------------------
    #    p_min_mw       |\
    #                   | \
    #                   |  \
    net.pwl_cost.points.iloc[0] =  [(0, net.gen.max_p_mw.at[0], -1)]
    pp.runopp(net)
    assert isclose(net.res_cost, -net.res_gen.p_mw.at[0], atol=1e-3)
    net.pwl_cost.drop(0, inplace=True)
    # first using a positive slope as in the case above