Optimisation

Optimisation#

Optimization functions which can be called within a pypsa.Network via n.optimize or n.optimization.func. For example n.optimize.create_model().

Statistic methods#

__call__([snapshots, ...])

Optimize the pypsa network using linopy.

create_model([snapshots, ...])

Create a linopy.Model instance from a pypsa network.

solve_model([extra_functionality, ...])

Solve an already created model and assign its solution to the network.

assign_solution()

Map solution to network components.

assign_duals([assign_all_duals])

Map dual values i.e. shadow prices to network components.

post_processing()

Post-process the optimized network.

optimize_transmission_expansion_iteratively([...])

Iterative linear optimization updating the line parameters for passive AC and DC lines.

optimize_security_constrained([snapshots, ...])

Computes Security-Constrained Linear Optimal Power Flow (SCLOPF).

optimize_with_rolling_horizon([snapshots, ...])

Optimizes the network in a rolling horizon fashion.

optimize_mga([snapshots, ...])

Run modelling-to-generate-alternatives (MGA) on network to find near- optimal solutions.

optimize_and_run_non_linear_powerflow([...])

Optimizes the network and then performs a non-linear power flow for all snapshots.

fix_optimal_capacities()

Fix capacities of extendable assets to optimized capacities.

fix_optimal_dispatch()

Fix dispatch of all assets to optimized values.

add_load_shedding([suffix, buses, sign, ...])

Add load shedding in form of generators to all or a subset of buses.