Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Incorrect Newton-Raphson iteration values #1095

Closed
ebuech opened this issue Jan 28, 2022 · 1 comment
Closed

Incorrect Newton-Raphson iteration values #1095

ebuech opened this issue Jan 28, 2022 · 1 comment
Assignees
Labels
bug Request a fix or change to the code

Comments

@ebuech
Copy link

ebuech commented Jan 28, 2022

Problem description

The number of Newton-Raphson iterations reported in the solver profiler output (which is obtained by setting solver_profile_enable to true in the powerflow object properties) seems incorrect. My guess is that iteration counter is off by one. For example, the timesteps where the actual number of NR iterations is 1 or 2 are all being labeled as having 1 iteration. Timesteps where the actual number of iterations is 3 is being labeled as having 2 iterations. The reason why I suspect this is from looking at the reported durations of each NR run.

The number of NR iterations received by the learn function in the python solver (obtained from kwargs['solution']['iterations'] is sometimes zero, which is impossible, since NR always runs at least one iteration. For timesteps where the number of iterations is reported as 0 to the learn function, it is reported as 1 in the solver profiler output. For timesteps where the number of iterations is reported as 1 to the learn function, it is also reported a 1 in the solver profiler output. Therefore it seems that the counter is off by one and all the zeros are being rounded up to one in the solver profiler output.

Steps to reproduce

Set the following powerflow object properties so that the solver profiler info is saved to CSV. The default_maximum_voltage_error can be adjusted to modify the number of NR iterations that are run:

solver_method NR;
solver_profile_enable true;
solver_profile_filename "output/solver_nr_out.csv";
default_maximum_voltage_error 1e-1;

Expected behavior

I expect the number of powerflow iterations to be greater than 1 and the durations of NR runs to be similar when the number of NR iterations is the same.

System information

  • GridLAB-D version: HiPAS GridLAB-D 4.2.30-220125 (develop_fix_python_solver) Linux
@ebuech ebuech added the bug Request a fix or change to the code label Jan 28, 2022
@dchassin
Copy link
Member

This appears to be fixed in #1058

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Request a fix or change to the code
Projects
None yet
Development

No branches or pull requests

2 participants