Run parameters¶
The parameters of generate_mga_files(), which runs a full
exploration of a solved PyPSA network. For why they exist, see the
Surveyor explanation pages.
Parameter |
Default |
Meaning |
|---|---|---|
|
required |
An already solved |
|
required |
The properties of interest; see Dimensions. |
|
required |
Where all results are written; also where a run resumes from. |
|
required |
|
|
required |
Cost slacks \(\epsilon\) to explore, e.g. |
|
required |
|
|
required |
Iteration cap per slack level, or |
|
required |
Convergence tolerance; see Tolerance. One value, or one per slack level. |
|
required |
Worker processes for the model solves. With |
|
|
A cut is added only if the nearest point is further than this from the trial point. Must satisfy |
|
|
Log progress. |
|
|
Explore in coordinates where every PoI spans \([-1, 1]\); see normalization. |
|
|
Add a cost cut for every point found. |
|
|
|
|
Passed to every model solve, e.g. |
Dimensions¶
dimensions maps each property-of-interest name to a linear combination of PyPSA
component attributes: name → component class → attribute → {component name: coefficient}.
dimensions = {
"wind": {"Generator": {"p_nom": {"wind": 1}}},
"battery": {"StorageUnit": {"p_nom": {"battery storage": 1}}},
"hydrogen": {"Store": {"e_nom": {"hydrogen storage": 1}}},
}
Here wind is the optimized p_nom of the generator named wind. Listing several
components, or several attributes, sums them with the given coefficients.
Tolerance¶
With normalize=True, tol is a percentage of each PoI’s achievable range at that slack.
Every normalized PoI spans a width of 2, so tol=4 stops at a distance of \(0.08\) in the
normalized coordinates. What the percentage bounds depends on norm:
|
|
|---|---|
|
every PoI individually is within 4% of its range |
|
the per-PoI percentage errors sum to at most 4 |
With normalize=False, tol is a plain distance in the PoIs’ own units.
Output directory¶
output_dir holds optimal.nc, the solved optimum, and one slack_<ε>/ directory per slack
level with a NetCDF file per solve: mga_furthest_result_*.nc for the initial box directions
and mga_closest_result_*.nc for every nearest-point solve. When a slack level finishes, its
directory also gets run.json, the run summary.
Read the results back with collect_near_optimal_set(), which
returns them as a near-optimal set with one point per file, or
write them as one with export_near_optimal_set().