Skip to content

Commit

Permalink
Split modules Maven project
Browse files Browse the repository at this point in the history
  • Loading branch information
geofjamg committed Sep 29, 2016
1 parent c779b7f commit cc952a5
Show file tree
Hide file tree
Showing 239 changed files with 814 additions and 992 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* 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 eu.itesla_project.modules;
package eu.itesla_project.commons;

/**
*
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface Module {
public interface Versionable {

String getName();

Expand Down
32 changes: 32 additions & 0 deletions contingency-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016, 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/.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>itesla-parent</artifactId>
<groupId>eu.itesla_project</groupId>
<version>0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>contingency-api</artifactId>

<name>Contingency API</name>

<dependencies>
<dependency>
<groupId>eu.itesla_project</groupId>
<artifactId>iidm-network-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) 2016, 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 eu.itesla_project.contingency;

import eu.itesla_project.iidm.network.Network;

import java.util.List;

/**
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface ContingenciesProvider {

List<Contingency> getContingencies(Network network);

}
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
/**
* Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
* Copyright (c) 2016, 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 eu.itesla_project.modules.security;
package eu.itesla_project.contingency;

/**
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface SecurityIssue {

SecurityIssueType getIssueType();
public interface ContingenciesProviderFactory {

<T extends ContingenciesProvider> T create();
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* 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 eu.itesla_project.modules.contingencies;
package eu.itesla_project.contingency;

import java.util.Collection;

import eu.itesla_project.modules.contingencies.tasks.ModificationTask;
import eu.itesla_project.contingency.tasks.ModificationTask;

/**
*
Expand All @@ -19,9 +19,7 @@ public interface Contingency {
String getId();

Collection<ContingencyElement> getElements();

Collection<String> getZones();


ModificationTask toTask();

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* 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 eu.itesla_project.modules.contingencies;
package eu.itesla_project.contingency;

import eu.itesla_project.modules.contingencies.tasks.ModificationTask;
import eu.itesla_project.contingency.tasks.ModificationTask;

/**
*
Expand All @@ -19,7 +19,5 @@ public interface ContingencyElement {
ContingencyElementType getType();

ModificationTask toTask();



}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* 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 eu.itesla_project.modules.security;
package eu.itesla_project.contingency;

/**
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public enum SecurityIssueType {
LIMIT,
POST_CONTINGENCY_RULE
public enum ContingencyElementType {
LINE,
GENERATOR
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 eu.itesla_project.modules.contingencies.impl;
package eu.itesla_project.contingency;

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -13,10 +13,8 @@
import java.util.List;
import java.util.Set;

import eu.itesla_project.modules.contingencies.Contingency;
import eu.itesla_project.modules.contingencies.ContingencyElement;
import eu.itesla_project.modules.contingencies.tasks.CompoundModificationTask;
import eu.itesla_project.modules.contingencies.tasks.ModificationTask;
import eu.itesla_project.contingency.tasks.CompoundModificationTask;
import eu.itesla_project.contingency.tasks.ModificationTask;

/**
*
Expand All @@ -27,8 +25,6 @@ public class ContingencyImpl implements Contingency {
private final String id;

private final List<ContingencyElement> elements;

private Set<String> zones;

public ContingencyImpl(String id, ContingencyElement elements) {
this(id, Arrays.asList(elements));
Expand All @@ -37,13 +33,6 @@ public ContingencyImpl(String id, ContingencyElement elements) {
public ContingencyImpl(String id, List<ContingencyElement> elements) {
this.id = id;
this.elements = elements;

}

public ContingencyImpl(String id, List<ContingencyElement> elements, List<String> zones) {
this.id = id;
this.elements = elements;
this.zones = new HashSet<String>(zones);
}

@Override
Expand All @@ -55,12 +44,6 @@ public String getId() {
public Collection<ContingencyElement> getElements() {
return elements;
}

@Override
public Collection<String> getZones()
{
return zones;
}

@Override
public ModificationTask toTask() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* 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 eu.itesla_project.modules.contingencies;
package eu.itesla_project.contingency;

import eu.itesla_project.modules.contingencies.tasks.GeneratorTripping;
import eu.itesla_project.modules.contingencies.tasks.ModificationTask;
import eu.itesla_project.contingency.tasks.GeneratorTripping;
import eu.itesla_project.contingency.tasks.ModificationTask;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* 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 eu.itesla_project.modules.contingencies;
package eu.itesla_project.contingency;

import eu.itesla_project.modules.contingencies.tasks.BranchTripping;
import eu.itesla_project.modules.contingencies.tasks.ModificationTask;
import eu.itesla_project.contingency.tasks.BranchTripping;
import eu.itesla_project.contingency.tasks.ModificationTask;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 eu.itesla_project.modules.contingencies.tasks;
package eu.itesla_project.contingency.tasks;

import eu.itesla_project.commons.ITeslaException;
import eu.itesla_project.iidm.network.Network;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 eu.itesla_project.modules.contingencies.tasks;
package eu.itesla_project.contingency.tasks;

import eu.itesla_project.iidm.network.Network;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 eu.itesla_project.modules.contingencies.tasks;
package eu.itesla_project.contingency.tasks;

import eu.itesla_project.commons.ITeslaException;
import eu.itesla_project.iidm.network.Generator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 eu.itesla_project.modules.contingencies.tasks;
package eu.itesla_project.contingency.tasks;

import eu.itesla_project.iidm.network.Network;

Expand Down
27 changes: 1 addition & 26 deletions dymola-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,35 +70,10 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>iidm-network-impl</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>eu.itesla_project.iidm-ddb</groupId>
<artifactId>iidm-ddb-eurostag-import-export</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cim1-import</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>computation-local</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>computation-mpi</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -107,7 +82,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>modules</artifactId>
<artifactId>simulation-api</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
package eu.itesla_project.dymola;

import eu.itesla_project.computation.ComputationManager;
import eu.itesla_project.contingency.ContingenciesProvider;
import eu.itesla_project.iidm.network.Network;
import eu.itesla_project.modules.contingencies.ContingenciesAndActionsDatabaseClient;
import eu.itesla_project.modules.ddb.DynamicDatabaseClient;
import eu.itesla_project.modules.ddb.DynamicDatabaseClientFactory;
import eu.itesla_project.modules.simulation.ImpactAnalysis;
import eu.itesla_project.modules.simulation.SimulatorFactory;
import eu.itesla_project.modules.simulation.Stabilization;
import eu.itesla_project.simulation.ImpactAnalysis;
import eu.itesla_project.simulation.SimulatorFactory;
import eu.itesla_project.simulation.Stabilization;

/**
*
Expand All @@ -22,13 +20,13 @@
public class DymolaFactory implements SimulatorFactory {

@Override
public Stabilization createStabilization(Network network, ComputationManager computationManager, int priority, DynamicDatabaseClientFactory ddbClientFactory) {
return new DymolaStabilization(network, computationManager, priority, ddbClientFactory);
public Stabilization createStabilization(Network network, ComputationManager computationManager, int priority) {
return new DymolaStabilization(network, computationManager, priority);
}

@Override
public ImpactAnalysis createImpactAnalysis(Network network, ComputationManager computationManager, int priority, ContingenciesAndActionsDatabaseClient cadbClient) {
return new DymolaImpactAnalysis(network, computationManager, priority, cadbClient);
public ImpactAnalysis createImpactAnalysis(Network network, ComputationManager computationManager, int priority, ContingenciesProvider contingenciesProvider) {
return new DymolaImpactAnalysis(network, computationManager, priority, contingenciesProvider);
}

}

0 comments on commit cc952a5

Please sign in to comment.