-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-dispatch-q
- Loading branch information
Showing
9 changed files
with
122 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/main/java/com/powsybl/openloadflow/ac/outerloop/OuterLoopContextImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** | ||
* Copyright (c) 2022, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package com.powsybl.openloadflow.ac.outerloop; | ||
|
||
import com.powsybl.openloadflow.ac.nr.NewtonRaphsonResult; | ||
import com.powsybl.openloadflow.network.LfNetwork; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com> | ||
*/ | ||
public class OuterLoopContextImpl implements OuterLoopContext { | ||
|
||
private final LfNetwork network; | ||
|
||
private int iteration; | ||
|
||
private NewtonRaphsonResult lastNewtonRaphsonResult; | ||
|
||
private Object data; | ||
|
||
OuterLoopContextImpl(LfNetwork network) { | ||
this.network = Objects.requireNonNull(network); | ||
} | ||
|
||
@Override | ||
public LfNetwork getNetwork() { | ||
return network; | ||
} | ||
|
||
@Override | ||
public int getIteration() { | ||
return iteration; | ||
} | ||
|
||
public void setIteration(int iteration) { | ||
this.iteration = iteration; | ||
} | ||
|
||
@Override | ||
public NewtonRaphsonResult getLastNewtonRaphsonResult() { | ||
return lastNewtonRaphsonResult; | ||
} | ||
|
||
public void setLastNewtonRaphsonResult(NewtonRaphsonResult lastNewtonRaphsonResult) { | ||
this.lastNewtonRaphsonResult = lastNewtonRaphsonResult; | ||
} | ||
|
||
@Override | ||
public Object getData() { | ||
return data; | ||
} | ||
|
||
@Override | ||
public void setData(Object data) { | ||
this.data = data; | ||
} | ||
} |