Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop simulation at powerflow exception #800

Closed
danielfeismann opened this issue Apr 27, 2024 · 5 comments · Fixed by #813
Closed

Stop simulation at powerflow exception #800

danielfeismann opened this issue Apr 27, 2024 · 5 comments · Fixed by #813
Assignees
Labels
bug Something isn't working
Milestone

Comments

@danielfeismann
Copy link
Member

No description provided.

@danielfeismann danielfeismann added the bug Something isn't working label Apr 27, 2024
@danielfeismann danielfeismann added this to the Version 4.0 milestone Apr 27, 2024
@danielfeismann
Copy link
Member Author

as well simona should stop when exception is thrown:

18:32:58.448 ERROR edu.ie3.powerflow.NewtonRaphsonPF$ - Error while solving jacobian matrix: {}
breeze.linalg.MatrixSingularException: 
	at breeze.linalg.operators.DenseMatrixMultiplyOps$impl_OpSolveMatrixBy_DMD_DMD_eq_DMD$.LUSolve(DenseMatrixOps.expanded.scala:244)
	at breeze.linalg.operators.DenseMatrixMultiplyOps$impl_OpSolveMatrixBy_DMD_DMD_eq_DMD$.apply(DenseMatrixOps.expanded.scala:227)
	at breeze.linalg.operators.DenseMatrixMultiplyOps$impl_OpSolveMatrixBy_DMD_DMD_eq_DMD$.apply(DenseMatrixOps.expanded.scala:219)
	at breeze.linalg.ImmutableNumericOps.$bslash(NumericOps.scala:128)
	at breeze.linalg.ImmutableNumericOps.$bslash$(NumericOps.scala:127)
	at breeze.linalg.DenseMatrix.$bslash(DenseMatrix.scala:52)
	at breeze.linalg.operators.DenseMatrixMultiplyOps$impl_OpSolveMatrixBy_DMD_DVD_eq_DVD$.apply(DenseMatrixOps.expanded.scala:276)
	at breeze.linalg.operators.DenseMatrixMultiplyOps$impl_OpSolveMatrixBy_DMD_DVD_eq_DVD$.apply(DenseMatrixOps.expanded.scala:274)
	at breeze.linalg.ImmutableNumericOps.$bslash(NumericOps.scala:128)
	at breeze.linalg.ImmutableNumericOps.$bslash$(NumericOps.scala:127)
	at breeze.linalg.DenseMatrix.$bslash(DenseMatrix.scala:52)
	at edu.ie3.powerflow.NewtonRaphsonPF$.$anonfun$correctVoltages$1(NewtonRaphsonPF.scala:482)
	at scala.util.control.Exception$Catch.$anonfun$withTry$1(Exception.scala:256)
	at scala.util.control.Exception$Catch.apply(Exception.scala:227)
	at scala.util.control.Exception$Catch.withTry(Exception.scala:256)
	at edu.ie3.powerflow.NewtonRaphsonPF$.edu$ie3$powerflow$NewtonRaphsonPF$$correctVoltages(NewtonRaphsonPF.scala:482)
	at edu.ie3.powerflow.NewtonRaphsonPF.solveIterationStepsRecursively(NewtonRaphsonPF.scala:153)
	at edu.ie3.powerflow.NewtonRaphsonPF.calculate(NewtonRaphsonPF.scala:106)
	at edu.ie3.simona.agent.grid.PowerFlowSupport.$anonfun$newtonRaphsonPF$1(PowerFlowSupport.scala:579)
	at scala.util.Try$.apply(Try.scala:217)
	at edu.ie3.simona.agent.grid.PowerFlowSupport.newtonRaphsonPF(PowerFlowSupport.scala:577)
	at edu.ie3.simona.agent.grid.PowerFlowSupport.newtonRaphsonPF$(PowerFlowSupport.scala:558)
	at edu.ie3.simona.agent.grid.GridAgent$.newtonRaphsonPF(GridAgent.scala:37)
	at edu.ie3.simona.agent.grid.DBFSAlgorithm$$anonfun$edu$ie3$simona$agent$grid$DBFSAlgorithm$$handlePowerFlowCalculations$1.applyOrElse(DBFSAlgorithm.scala:545)
	at edu.ie3.simona.agent.grid.DBFSAlgorithm$$anonfun$edu$ie3$simona$agent$grid$DBFSAlgorithm$$handlePowerFlowCalculations$1.applyOrElse(DBFSAlgorithm.scala:516)
	at org.apache.pekko.actor.typed.scaladsl.Behaviors$.$anonfun$receivePartial$1(Behaviors.scala:141)
	at org.apache.pekko.actor.typed.internal.BehaviorImpl$ReceiveBehavior.receive(BehaviorImpl.scala:146)
	at org.apache.pekko.actor.typed.Behavior$.interpret(Behavior.scala:283)
	at org.apache.pekko.actor.typed.Behavior$.interpretMessage(Behavior.scala:239)
	at org.apache.pekko.actor.typed.internal.adapter.ActorAdapter.handleMessage(ActorAdapter.scala:141)
	at org.apache.pekko.actor.typed.internal.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:117)
	at org.apache.pekko.actor.ActorCell.receiveMessage(ActorCell.scala:590)
	at org.apache.pekko.actor.ActorCell.invoke(ActorCell.scala:557)
	at org.apache.pekko.dispatch.Mailbox.processMailbox(Mailbox.scala:280)
	at org.apache.pekko.dispatch.Mailbox.run(Mailbox.scala:241)
	at org.apache.pekko.dispatch.Mailbox.exec(Mailbox.scala:253)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
18:32:58.459 WARN  e.i.s.a.g.GridAgent$$anonfun$edu$ie3$simona$agent$grid$GridAgent$$initializing$1 - Power flow calculation before asking for updated powers did finally not converge!
18:32:58.460 WARN  e.i.s.a.g.GridAgent$$anonfun$edu$ie3$simona$agent$grid$GridAgent$$initializing$1 - Received Failed Power Flow Result. Escalate to my parent.
18:32:58.462 WARN  e.i.s.a.g.GridAgent$$anonfun$edu$ie3$simona$agent$grid$GridAgent$$initializing$1 - Power flow failed! This incident will be reported!
18:32:58.462 ERROR e.i.s.a.g.GridAgent$$anonfun$edu$ie3$simona$agent$grid$GridAgent$$initializing$1 - Stopping because of failed power flow.
18:32:58.469 INFO  e.i.s.e.l.RuntimeEventListener$ - ******* Simulation until 2011-01-01T01:00:00Z completed. (duration: 0h : 0m : 1s , memory: 0.0 GB) ******
18:32:58.469 INFO  e.i.s.e.l.RuntimeEventListener$ - ******* Simulation until 2011-01-01T01:15:00Z completed. (duration: 0h : 0m : 1s , memory: 0.0 GB) ******

Error should be repeatable when setting parallel devices of one line element to zero.

@sebastian-peter
Copy link
Member

That validation should take part in PSDM I think

@danielfeismann danielfeismann changed the title GridValidation should check if parallel devices is >0 Stop simulation at powerflow exception Apr 30, 2024
@staudtMarius
Copy link
Member

This could be closed after the PSDM is updated. See PSDM 1077.

@danielfeismann
Copy link
Member Author

@staudtMarius: Yes, but it would be great if you could check why simona is not stopping despite we have a MatrixSingularException.

@staudtMarius staudtMarius self-assigned this May 24, 2024
@staudtMarius
Copy link
Member

I found the issue.

staudtMarius added a commit that referenced this issue May 31, 2024
staudtMarius added a commit that referenced this issue Jun 10, 2024
staudtMarius added a commit that referenced this issue Jul 1, 2024
staudtMarius added a commit that referenced this issue Jul 8, 2024
sebastian-peter added a commit that referenced this issue Jul 8, 2024
sebastian-peter added a commit that referenced this issue Jul 15, 2024
…n-power-flow-exception

Fix not stopping correctly on failed power flow if configured to stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants