Exemplo n.º 1
0
def study(a, b, c, d, e, f, g, h, i, j, layout_input_file, output3):
    if f == g == h == i == j == 0:
        print a, b, c, d, e
    workflow1 = Workflow(weibullmodels[i], windrosemodels[b], turbmodels[c],
                         None, depthmodels[h], farm_support_cost_models[j],
                         None, oandm, cablemodels[d], infield_efficiency,
                         thrust_coefficient, thrustmodels[f], wakemodels[a],
                         mergingmodels[e], power, powermodels[g], aep_average,
                         other_costs, total_costs, LPC)

    # nbins = randint(2, 25)
    # real_angle = choice([30.0, 60.0, 90.0, 120.0, 180.0])
    # artif_angle = 400.0
    # while artif_angle > real_angle:
    #     artif_angle = choice([1.0, 2.0, 5.0, 10.0, 15.0, 30.0, 60.0, 90.0, 120.0, 180.0])
    nbins = 17
    real_angle = 30.0
    artif_angle = 1.0

    workflow1.windrose.nbins = nbins
    workflow1.windrose.artificial_angle = artif_angle
    workflow1.windrose.real_angle = real_angle
    workflow1.print_output = True
    workflow1.run(layout_input_file)
    power2.reset()
    thrust_coefficient2.reset()
    with open(output3, "a", 1) as output2:
        output2.write(
            "{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n"
            .format(a, b, c, d, e, f, g, h, i, j, workflow1.aep,
                    workflow1.finance, workflow1.runtime,
                    workflow1.power_calls, workflow1.thrust_calls, nbins,
                    real_angle, artif_angle))
Exemplo n.º 2
0
def run_workflow(a, b, c, d, e, f, g, h, i, j):
    workflow1 = Workflow(weibullmodels[i], windrosemodels[b], turbmodels[c], None, depthmodels[h],
                         farm_support_cost_models[j], None, oandm_given_costs, cablemodels[d], infield_efficiency,
                         thrust_coefficient, thrustmodels[f], wakemodels[a], mergingmodels[e], power,
                         powermodels[g], aep_average, other_costs, total_costs, LPC)
    nbins = 25  # Number of wind speeds bins for the discretisation of the Weibull distribution.
    real_angle = 30.0  # Angle [degrees] per wind sector in measured windrose.
    artif_angle = 1.0  # Desired angle [degrees] resolution for wake analysis.
    workflow1.windrose.nbins = nbins
    workflow1.windrose.artificial_angle = artif_angle
    workflow1.windrose.real_angle = real_angle
    workflow1.print_output = True
    workflow1.run("layout.dat")
    print workflow1.runtime, "seconds runtime"
    power2.reset()
    thrust_coefficient2.reset()

    with open("output.dat", "a", 1) as output2:
        output2.write("{}\t{}\t{}\n".format(workflow1.aep, workflow1.finance, workflow1.runtime))
Exemplo n.º 3
0
def run_workflow(a, b, c, d, e, f, g, h, i, j):
    workflow1 = Workflow(weibullmodels[i], windrosemodels[b], turbmodels[c],
                         None, depthmodels[h], farm_support_cost_models[j],
                         None, oandm_given_costs, cablemodels[d],
                         infield_efficiency, thrust_coefficient,
                         thrustmodels[f], wakemodels[a], mergingmodels[e],
                         power, powermodels[g], aep_average, other_costs,
                         total_costs, LPC)
    nbins = 25  # Number of wind speeds bins for the discretisation of the Weibull distribution.
    real_angle = 30.0  # Angle [degrees] per wind sector in measured windrose.
    artif_angle = 1.0  # Desired angle [degrees] resolution for wake analysis.
    workflow1.windrose.nbins = nbins
    workflow1.windrose.artificial_angle = artif_angle
    workflow1.windrose.real_angle = real_angle
    workflow1.print_output = True
    workflow1.run("layout.dat")
    print workflow1.runtime, "seconds runtime"
    power2.reset()
    thrust_coefficient2.reset()

    with open("output.dat", "a", 1) as output2:
        output2.write("{}\t{}\t{}\n".format(workflow1.aep, workflow1.finance,
                                            workflow1.runtime))