Division of the code#
The code of the reactive OPF is divided into several files, each serving a specific function:
reactiveopf.datdefines the network data files imported (files with ampl_ prefix), and the files used to configure the run (files with param_ prefix).
See Inputs.iidm_importer.mod,or_param_importer.modandcommons.moddefine the sets and parameters of the optimization.connected_component.mod,dcopf.modandacopf.moddefine the optimization problems solved inreactiveopf.run.
See Slack bus and main connex components, DC optimal power flow and AC optimal power flow, respectively.connected_component.run,dcopf.run,acopf_preprocessing.runandacopf.runorchestrate the optimization and its post-processing.reactiveopfoutput.modexports result files if the execution ofreactiveopf.runis successful.
See Outputs.reactiveopfexit.runcontains the code executed when the process fails.
Refer to section 8.2.reactiveopf.runexecutes the AMPL process of OpenReac, calling the previous scripts.