e2nIEE / pandapower

Compare cffe744 ... +3 ... 0affe4d

Coverage Reach
pandapower/pypower/pips.py pandapower/pypower/opf_model.py pandapower/pypower/dcopf_solver.py pandapower/pypower/opf_setup.py pandapower/pypower/pipsopf_solver.py pandapower/pypower/opf_execute.py pandapower/pypower/opf_args.py pandapower/pypower/newtonpf.py pandapower/pypower/opf_consfcn.py pandapower/pypower/fdpf.py pandapower/pypower/opf_hessfcn.py pandapower/pypower/pfsoln.py pandapower/pypower/gausspf.py pandapower/pypower/opf_costfcn.py pandapower/pypower/dSbr_dV.py pandapower/pypower/makePTDF.py pandapower/pypower/qps_pips.py pandapower/pypower/makeApq.py pandapower/pypower/makeAy.py pandapower/pypower/makeAvl.py pandapower/pypower/makeYbus.py pandapower/pypower/makeBdc.py pandapower/pypower/makeSbus.py pandapower/pypower/totcost.py pandapower/pypower/opf.py pandapower/pypower/makeAang.py pandapower/pypower/polycost.py pandapower/pypower/qps_pypower.py pandapower/pypower/idx_gen.py pandapower/pypower/idx_brch.py pandapower/pypower/idx_bus.py pandapower/pypower/dSbus_dV.py pandapower/pypower/makeB.py pandapower/pypower/d2Sbus_dV2.py pandapower/pypower/dIbr_dV.py pandapower/pypower/hasPQcap.py pandapower/pypower/d2Sbr_dV2.py pandapower/pypower/add_userfcn.py pandapower/pypower/makeLODF.py pandapower/pypower/update_mupq.py pandapower/pypower/ppoption.py pandapower/pypower/run_userfcn.py pandapower/pypower/pqcost.py pandapower/pypower/util.py pandapower/pypower/d2ASbr_dV2.py pandapower/pypower/dAbr_dV.py pandapower/pypower/d2AIbr_dV2.py pandapower/pypower/d2Ibr_dV2.py pandapower/pypower/dcpf.py pandapower/pypower/printpf.py pandapower/pypower/bustypes.py pandapower/pypower/idx_cost.py pandapower/pypower/ppver.py pandapower/pypower/pipsver.py pandapower/pypower/isload.py pandapower/pypower/idx_area.py pandapower/pypower/_compat.py pandapower/pypower/__init__.py pandapower/toolbox.py pandapower/networks/cigre_networks.py pandapower/networks/create_examples.py pandapower/networks/power_system_test_cases.py pandapower/networks/dickert_lv_networks.py pandapower/networks/kerber_networks.py pandapower/networks/simple_pandapower_test_networks.py pandapower/networks/synthetic_voltage_control_lv_networks.py pandapower/networks/kerber_extreme_networks.py pandapower/networks/mv_oberrhein.py pandapower/networks/ieee_europen_lv_asymmetric.py pandapower/networks/__init__.py pandapower/estimation/algorithm/base.py pandapower/estimation/algorithm/estimator.py pandapower/estimation/algorithm/matrix_base.py pandapower/estimation/algorithm/lp.py pandapower/estimation/algorithm/optimization.py pandapower/estimation/ppc_conversion.py pandapower/estimation/util.py pandapower/estimation/state_estimation.py pandapower/estimation/results.py pandapower/estimation/idx_brch.py pandapower/estimation/idx_bus.py pandapower/estimation/__init__.py pandapower/pf/run_bfswpf.py pandapower/pf/runpp_3ph.py pandapower/pf/runpf_pypower.py pandapower/pf/run_newton_raphson_pf.py pandapower/pf/create_jacobian.py pandapower/pf/pfsoln_numba.py pandapower/pf/run_dc_pf.py pandapower/pf/iwamoto_multiplier.py pandapower/pf/makeYbus_numba.py pandapower/pf/ppci_variables.py pandapower/pf/dSbus_dV_numba.py pandapower/pf/no_numba.py pandapower/pf/create_jacobian_numba.py pandapower/shortcircuit/ppc_conversion.py pandapower/shortcircuit/currents.py pandapower/shortcircuit/results.py pandapower/shortcircuit/calc_sc.py pandapower/shortcircuit/kappa.py pandapower/shortcircuit/toolbox.py pandapower/shortcircuit/impedance.py pandapower/shortcircuit/idx_bus.py pandapower/shortcircuit/idx_brch.py pandapower/shortcircuit/__init__.py pandapower/control/controller/trafo/DiscreteTapControl.py pandapower/control/controller/trafo/ContinuousTapControl.py pandapower/control/controller/trafo/u_setofp.py pandapower/control/controller/trafo/USetTapControl.py pandapower/control/controller/characteristic_control.py pandapower/control/controller/const_control.py pandapower/control/controller/trafo_control.py pandapower/control/util/auxiliary.py pandapower/control/util/diagnostic.py pandapower/control/util/characteristic.py pandapower/control/util/__init__.py pandapower/control/run_control.py pandapower/control/basic_controller.py pandapower/control/__init__.py pandapower/timeseries/output_writer.py pandapower/timeseries/run_time_series.py pandapower/timeseries/ts_runpp.py pandapower/timeseries/read_batch_results.py pandapower/timeseries/data_sources/frame_data.py pandapower/timeseries/data_sources/__init__.py pandapower/timeseries/data_source.py pandapower/timeseries/__init__.py pandapower/converter/pypower/from_ppc.py pandapower/converter/pypower/to_ppc.py pandapower/converter/pypower/__init__.py pandapower/converter/powermodels/to_pm.py pandapower/converter/powermodels/from_pm.py pandapower/converter/powermodels/__init__.py pandapower/converter/matpower/from_mpc.py pandapower/converter/matpower/to_mpc.py pandapower/converter/matpower/__init__.py pandapower/converter/__init__.py pandapower/io_utils.py pandapower/create.py pandapower/build_branch.py pandapower/auxiliary.py pandapower/diagnostic.py pandapower/build_bus.py pandapower/topology/create_graph.py pandapower/topology/graph_searches.py pandapower/topology/graph_tool_interface.py pandapower/topology/__init__.py pandapower/results_branch.py pandapower/diagnostic_reports.py pandapower/pd2ppc_zero.py pandapower/results_bus.py pandapower/convert_format.py pandapower/build_gen.py pandapower/results_gen.py pandapower/opf/make_objective.py pandapower/opf/pm_storage.py pandapower/opf/validate_opf_input.py pandapower/opf/run_powermodels.py pandapower/pd2ppc.py pandapower/file_io.py pandapower/results.py pandapower/powerflow.py pandapower/std_types.py pandapower/optimal_powerflow.py pandapower/run.py pandapower/__init__.py pandapower/runpm.py setup.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 3 files from the diff.

@@ -17,8 +17,11 @@
Loading
17 17
18 18
class ConstControl(Controller):
19 19
    """
20 -
    Class representing a generic time series controller for a specified element and variable
21 -
    Control strategy: "No Control" -> just updates timeseries
20 +
    Class representing a generic time series controller for a specified element and variable.
21 +
    Control strategy: "No Control" -> updates values of specified elements according to timeseries input data.
22 +
    If ConstControl is used without timeseries input data, it will reset the controlled values to the initial values,
23 +
    preserving the initial net state.
24 +
    The timeseries values are written to net during time_step before the initial powerflow run and before other controllers' control_step.
22 25
    It is possible to set attributes of objects that are contained in a net table, e.g. attributes of other controllers. This can be helpful
23 26
    e.g. if a voltage setpoint of a transformer tap changer depends on the time step.
24 27
    An attribute of an object in the "object" column of a table (e.g. net.controller["object"] -> net.controller.object.at[0, "vm_set_pu"]
@@ -141,20 +144,19 @@
Loading
141 144
    def time_step(self, net, time):
142 145
        """
143 146
        Get the values of the element from data source
147 +
        Write to pandapower net by calling write_to_net()
148 +
        If ConstControl is used without a data_source, it will reset the controlled values to the initial values,
149 +
        preserving the initial net state.
144 150
        """
145 -
        self.values = self.data_source.get_time_step_value(time_step=time,
146 -
                                                           profile_name=self.profile_name,
147 -
                                                           scale_factor=self.scale_factor)
148 -
        # self.write_to_net()
149 -
150 -
    def initialize_control(self, net):
151 -
        """
152 -
        At the beginning of each run_control call reset applied-flag
153 -
        """
154 -
        #
151 +
        self.applied = False
155 152
        if self.data_source is None:
156 153
            self.values = net[self.element][self.variable].loc[self.element_index]
157 -
        self.applied = False
154 +
        else:
155 +
            self.values = self.data_source.get_time_step_value(time_step=time,
156 +
                                                               profile_name=self.profile_name,
157 +
                                                               scale_factor=self.scale_factor)
158 +
        if self.values is not None:
159 +
            self.write_to_net(net)
158 160
159 161
    def is_converged(self, net):
160 162
        """
@@ -164,10 +166,8 @@
Loading
164 166
165 167
    def control_step(self, net):
166 168
        """
167 -
        Write to pandapower net by calling write_to_net()
169 +
        Set applied to True, which means that the values set in time_step have been included in the load flow calculation.
168 170
        """
169 -
        if self.values is not None:
170 -
            self.write_to_net(net)
171 171
        self.applied = True
172 172
173 173
    def _write_to_single_index(self, net):

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
pandapower -<.01% 87.60%
setup.py 0.00%
Project Totals (168 files) 87.52%
Loading