OPF.load_csv#

OPF.load_csv(path)#

Load scheduling results from a csv file produced by export_csv().

For multi-period routines the Time column is used to re-align rows to self.timeslot.v. For single-period routines, the Time column carries the literal sentinel "T1" and a single row is expected.

The export/load contract is a single-space join between key and device idx (f'{key} {dev}') with no quoting. Device idxes are assumed not to collide with this convention; if a future case file uses idxes that contain spaces, the export-side header generation needs revisiting too.

Parameters:
pathstr

Path of the csv file to load.

Returns:
bool

True if the loading is successful, False otherwise. On failure the routine's converged / exit_code flags are not modified.

Notes

Round-trip values are clipped to 6 decimals on export (see gather_results()) — reload is lossy at the 1e-6 level, which is fine for inspection but not for bit-exact replay.

Differences from ANDES: ANDES has no direct analog. The closest related facility is andes.routines.tds.TDS.run() with from_csv=, but that replays a time-domain trajectory through the integrator — it is not a post-solve rehydrator. AMS reads scheduling results back into existing Var and ExpressionCalc storage and marks the routine as converged so subsequent get() and ams.system.System.report() calls behave as if the routine just solved.

Added in version 1.3.0.