Opened 4 years ago

Closed 8 months ago

#6108 closed defect (fixed)

The tearing algorithm should not select nonlinear variables with start attributes as torn variables

Reported by: casella Owned by: Karim.Abdelhak
Priority: critical Milestone:
Component: Backend Version:
Keywords: Cc: Andrea.Bartolini, adrien.guironnet@…

Description

Please check the attached test package.

The equations in Test1 are written so that the solution is approximately the following:

x1 = 1 or x1 = 10
x2 = 1
x3 = 0
x4 = 1 or x4 = 10
x5 = 4

Variables x1, x2, x3, x4 appear nonlinearly in the equations, while variable x5 only appears linearly.

According to Criterion 1 of this paper, in order to ensure convergence of Newton's algorithm to the sought solution, it is only necessary to set the initial guess of the nonlinear variables close enough to the solution, while the initial guess of linear variables is irrelevant and can be left to the default of zero.

This turns out to be true if tearing is disabled, as in Test2, where x4 = 9.9867, which is very close to the initial guess 10 provided by the start attribute.

However, if tearing is enabled, x1 and x3 are picked as iteration variables for the initialization system, which means that the start values of x3 and x4 are ignored. As a consequence, the Newton iterations may converge to another solution, or not converge at all. In this case, one obtains x4 = 1.00337, which is not the solution one would like to have when setting the start attribute to 10.

So, with the current implementation of tearing it is possible that a system can be solved nicely without tearing, as long as start values are selected according to Criterion 1 of the paper, but would fail miserably when tearing is turned on. Obviously this is not a desirable outcome.

This is actually a big issue with the PowerGrids library, which is designed to compute start values for all nonlinear variables in the problem, but that doesn't bother setting start values on linear variables, which are the large majority. In order to get PowerGrids models to initialize, we had to completely turn off tearing with --tearingMethod=minimalTearing, which is really inconvenient, because a user in general doesn't know that this is required to get models to run, and may get initialization failures all the time.

Bottom line: if a nonlinear variable has a start attibute, it normally means that the modeller has some idea about its value in the initial solution. Hence, nonlinear variables with a start value should not be selected as inner (or torn) variables, but should always show up as iteration variables, so that their start values are actually influencing the initial guess and hopefully the convergence to the sought-after solution.

Attachments (1)

TestNonlinearTearing.mo (649 bytes) - added by casella 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 4 years ago by casella

  • Cc Andrea.Bartolini adrien.guironnet@… added
  • Component changed from *unknown* to Backend
  • Owner changed from somebody to Karim.Abdelhak
  • Status changed from new to assigned

Changed 4 years ago by casella

comment:2 Changed 3 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:3 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

comment:4 Changed 8 months ago by adrpo

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.