mp.task_cpf_legacy
- class mp.task_cpf_legacy
Bases:
mp.task_cpf,mp.task_shared_legacymp.task_cpf- MATPOWER task for legacy continuation power flow (CPF).Adds functionality needed by the legacy MATPOWER framework to the task implementation for the continuation power flow problem. This consists of pre-processing some input data and exporting and packaging result data.
- mp.task_pf Methods:
run_pre()- pre-process inputs that are for legacy framework onlyrun_post()- export results back to data model sourcelegacy_post_run()- post-process legacy framework outputs
See also
mp.task_cpf,mp.task,mp.task_shared_legacy.- Method Summary
- run_pre(d, mpopt)
Pre-process inputs that are for legacy framework only.
[d, mpopt] = task.run_pre(d, mpopt)
- Inputs:
d – data source specification, currently assumed to be a MATPOWER case name or case struct (
mpc), or data model objectmpopt (struct) – MATPOWER options struct
- Outputs:
d – updated value of corresponding input
mpopt (struct) – updated value of corresponding input
Call
run_pre_legacy()method for both input cases before calling parent.
- run_post(mm, nm, dm, mpopt)
Export results back to data model source.
task.run_post(mm, nm, dm, mpopt)
- Inputs:
mm (
mp.math_model) – mathmatical model objectnm (
mp.net_model) – network model objectdm (
mp.data_model) – data model objectmpopt (struct) – MATPOWER options struct
- Output:
task (
mp.task) – task object
Calls
mp.dm_converter.export()and saves the result in the data modelsourceproperty.
- legacy_post_run(mpopt)
Post-process legacy framework outputs.
[results, success] = task.legacy_post_run(mpopt)
- Input:
mpopt (struct) – MATPOWER options struct
- Outputs:
results (struct) – results struct for legacy MATPOWER framework, see Table 5.1 in legacy MATPOWER User's Manual.
success (integer) – 1 - succeeded, 0 - failed
Extract
resultsandsuccessand save the task object inresults.taskbefore returning.