Skip to content

Commit

Permalink
Use getter function
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-thom committed Sep 21, 2023
1 parent 0eacd45 commit d00da1e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function construct_device!(
container,
devices,
device_model,
typeof(network_model).parameters[1],
get_network_formulation(network_model),
)
end
return
Expand Down
8 changes: 4 additions & 4 deletions src/devices_models/device_constructors/load_constructor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function construct_device!(
)
add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)
return
Expand Down Expand Up @@ -124,7 +124,7 @@ function construct_device!(
)
add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)
return
Expand Down Expand Up @@ -197,7 +197,7 @@ function construct_device!(
)
add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)
return
Expand Down Expand Up @@ -252,7 +252,7 @@ function construct_device!(
)
add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function construct_device!(
)
add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)
return
Expand Down Expand Up @@ -196,7 +196,7 @@ function construct_device!(
end
add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -235,7 +235,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))

add_constraint_dual!(container, sys, model)
return
Expand Down Expand Up @@ -344,7 +344,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -435,7 +435,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -540,7 +540,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -628,7 +628,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -727,7 +727,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -808,7 +808,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
return
end

Expand Down Expand Up @@ -951,7 +951,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1073,7 +1073,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1191,7 +1191,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1294,7 +1294,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1408,7 +1408,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1507,7 +1507,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1635,7 +1635,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end
Expand Down Expand Up @@ -1730,7 +1730,7 @@ function construct_device!(

add_feedforward_constraints!(container, model, devices)

objective_function!(container, devices, model, typeof(network_model).parameters[1])
objective_function!(container, devices, model, get_network_formulation(network_model))
add_constraint_dual!(container, sys, model)
return
end

0 comments on commit d00da1e

Please sign in to comment.