Skip to content

Commit

Permalink
Merge branch 'master' into security_rest_api
Browse files Browse the repository at this point in the history
  • Loading branch information
quinarygio committed Aug 7, 2017
2 parents ba4218f + ab53ca8 commit 253a9bc
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 46 deletions.
15 changes: 3 additions & 12 deletions iidm-ddb/iidm-ddb-ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
Expand Down Expand Up @@ -219,14 +220,4 @@
</profile>

</profiles>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
4 changes: 0 additions & 4 deletions modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ public void looseConstraints(String stateId, List<LimitViolation> violations, fl
}

private void setNewCurrentLimit(String stateId, LimitViolation violation, float margin, boolean applyToBaseCase) {
TwoTerminalsConnectable branch = network.getLine(violation.getSubjectId());
if ( branch == null ) {
branch = network.getTwoWindingsTransformer(violation.getSubjectId());
}
TwoTerminalsConnectable branch = network.getBranch(violation.getSubjectId());
if ( branch != null ) {
float newLimit = getNewUpperLimit(violation, margin);
if ( branch.getTerminal1().getI() == violation.getValue() ) {
Expand All @@ -127,11 +124,8 @@ private void setNewCurrentLimit(String stateId, LimitViolation violation, float
branch.newCurrentLimits1().setPermanentLimit(newLimit).add();
if ( applyToBaseCase && !StateManager.INITIAL_STATE_ID.equals(stateId) ) { // change the limit also to basecase
network.getStateManager().setWorkingState(StateManager.INITIAL_STATE_ID);
branch = network.getLine(violation.getSubjectId());
if ( branch == null ) {
branch = network.getTwoWindingsTransformer(violation.getSubjectId());
}
LOGGER.debug("State {}: changing current limit 1 of branch {}: {} -> {}",
branch = network.getBranch(violation.getSubjectId());
LOGGER.debug("State {}: changing current limit 1 of branch {}: {} -> {}",
StateManager.INITIAL_STATE_ID,
branch.getId(),
violation.getLimit(),
Expand All @@ -148,11 +142,8 @@ private void setNewCurrentLimit(String stateId, LimitViolation violation, float
branch.newCurrentLimits2().setPermanentLimit(newLimit).add();
if ( applyToBaseCase && !StateManager.INITIAL_STATE_ID.equals(stateId) ) { // change the limit also to basecase
network.getStateManager().setWorkingState(StateManager.INITIAL_STATE_ID);
branch = network.getLine(violation.getSubjectId());
if ( branch == null ) {
branch = network.getTwoWindingsTransformer(violation.getSubjectId());
}
LOGGER.debug("State {}: changing current limit 2 of branch {}: {} -> {}",
branch = network.getBranch(violation.getSubjectId());
LOGGER.debug("State {}: changing current limit 2 of branch {}: {} -> {}",
StateManager.INITIAL_STATE_ID,
branch.getId(),
violation.getLimit(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,7 @@ private boolean fixBranchesAlwaysDisconnectAtOneSide(int iteration, Network netw
String branchId = entry.getKey();
if (entry.getValue().size() == 1) {
String substationId = entry.getValue().iterator().next();
TwoTerminalsConnectable branch = network.getLine(branchId);
if (branch == null) {
branch = network.getTwoWindingsTransformer(branchId);
}
TwoTerminalsConnectable branch = network.getBranch(branchId);
if (branch == null) {
throw new RuntimeException();
}
Expand Down
8 changes: 1 addition & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
<ipstentsoe.version>0.1-SNAPSHOT</ipstentsoe.version>
<javaee-api-version>7.0</javaee-api-version>
<jackson.version>2.8.7</jackson.version>
<jackson-datatype-joda.version>2.4.1</jackson-datatype-joda.version>
<javacsv.version>2.0</javacsv.version>
<jgrapht.version>1.0.1</jgrapht.version>
<jimfs.version>1.1</jimfs.version>
Expand Down Expand Up @@ -259,11 +258,6 @@
<dependencyManagement>
<dependencies>
<!-- Compile dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand All @@ -272,7 +266,7 @@
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-datatype-joda.version}</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(CMAKE_BINARY_DIR ${prefix}/build)

if (download)
set(szip_url https://support.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz)
set(hdf5_url https://support.hdfgroup.org/ftp/HDF5//releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz)
set(hdf5_url https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz)
set(matio_url http://downloads.sourceforge.net/project/matio/matio/1.5.2/matio-1.5.2.tar.gz)
else()
set(szip_url ${packs}/szip-2.1.tar.gz)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ private static WCAEntity toEntity(HistoDbNetworkAttributeId attrId, Network netw
int entityNum;
int sideNum = 0;
float nomV;
TwoTerminalsConnectable branch = network.getLine(attrId.getEquipmentId());
if (branch == null) {
branch = network.getTwoWindingsTransformer(attrId.getEquipmentId());
}
TwoTerminalsConnectable branch = network.getBranch(attrId.getEquipmentId());
if (branch != null) {
entityType = 1;
entityNum = mapper.getInt(AmplSubset.BRANCH, attrId.getEquipmentId());
Expand Down

0 comments on commit 253a9bc

Please sign in to comment.