Commit 1aea66e3 authored by Unknown's avatar Unknown
Browse files

Fixed the multiple_hubs network request input

parent 6313afd7
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ class NetworkModel(EHubModel):
        super().__init__(excel=excel, request=request)
        self.name = name
        self.hub_id = hub_id
        if excel:
        if network:
                network_request = network_to_request_format.convert(network)

        if network_request:
@@ -237,7 +237,7 @@ def linear_power_flow_constraint(power, angle_from, angle_to, time, reactance):
        yield power[t] == 1/reactance * (angle_from[t] - angle_to[t])
    

def multiple_hubs(minimize_carbon=False, output_filename=None, input_files=None, network_excel=None, carbon_value=0, n=0):
def multiple_hubs(minimize_carbon=False, output_filename=None, input_files=None, network_excel=None, network_request=None, carbon_value=0, n=0):
    """
    Core function for solving of multiple PyEHub models.
    """
@@ -423,7 +423,6 @@ def multiple_hubs(minimize_carbon=False, output_filename=None, input_files=None,
    # The objective function of the model is the summation of all the hub's
    # objective function
    objective = hubs[0].objective

    for hub in hubs[1:]:
        objective += hub.objective