Skip to content

Commit

Permalink
Dependencies cleanup (remove unnecessary modules depedency)
Browse files Browse the repository at this point in the history
  • Loading branch information
geofjamg committed Sep 30, 2016
1 parent 6c79904 commit e1a4d5d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
5 changes: 0 additions & 5 deletions eurostag-integration/pom.xml
Expand Up @@ -53,11 +53,6 @@
<artifactId>eurostag-ech-export</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>modules</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>computation-local</artifactId>
Expand Down
Expand Up @@ -7,10 +7,13 @@
package eu.itesla_project.eurostag;

import com.google.auto.service.AutoService;
import eu.itesla_project.commons.io.ComponentDefaultConfig;
import eu.itesla_project.commons.tools.Command;
import eu.itesla_project.commons.tools.Tool;
import eu.itesla_project.computation.ComputationManager;
import eu.itesla_project.computation.local.LocalComputationManager;
import eu.itesla_project.contingency.ContingenciesProvider;
import eu.itesla_project.contingency.ContingenciesProviderFactory;
import eu.itesla_project.eurostag.network.EsgGeneralParameters;
import eu.itesla_project.eurostag.network.EsgNetwork;
import eu.itesla_project.eurostag.network.io.EsgWriter;
Expand All @@ -25,8 +28,6 @@
import eu.itesla_project.iidm.import_.Importer;
import eu.itesla_project.iidm.import_.Importers;
import eu.itesla_project.iidm.network.Network;
import eu.itesla_project.modules.contingencies.ContingenciesAndActionsDatabaseClient;
import eu.itesla_project.modules.offline.OfflineConfig;
import eu.itesla_project.simulation.SimulationParameters;
import org.apache.commons.cli.CommandLine;
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
Expand Down Expand Up @@ -54,7 +55,7 @@ public Command getCommand() {

@Override
public void run(CommandLine line) throws Exception {
OfflineConfig offlineConfig = OfflineConfig.load();
ComponentDefaultConfig config = new ComponentDefaultConfig();
EurostagConfig eurostagConfig = EurostagConfig.load();
String caseFormat = line.getOptionValue("case-format");
String caseDirName = line.getOptionValue("case-dir");
Expand Down Expand Up @@ -105,8 +106,8 @@ public void run(CommandLine line) throws Exception {
try (BufferedWriter writer = Files.newBufferedWriter(outputDir.resolve(PRE_FAULT_SEQ_FILE_NAME), StandardCharsets.UTF_8)) {
scenario.writePreFaultSeq(writer, PRE_FAULT_SAC_FILE_NAME);
}
ContingenciesAndActionsDatabaseClient cdb = offlineConfig.getContingencyDbClientFactoryClass().newInstance().create();
scenario.writeFaultSeqArchive(cdb.getContingencies(network), network, dictionary, faultNum -> FAULT_SEQ_FILE_NAME.replace(eu.itesla_project.computation.Command.EXECUTION_NUMBER_PATTERN, Integer.toString(faultNum)))
ContingenciesProvider contingenciesProvider = config.findFactoryImplClass(ContingenciesProviderFactory.class).newInstance().create();
scenario.writeFaultSeqArchive(contingenciesProvider.getContingencies(network), network, dictionary, faultNum -> FAULT_SEQ_FILE_NAME.replace(eu.itesla_project.computation.Command.EXECUTION_NUMBER_PATTERN, Integer.toString(faultNum)))
.as(ZipExporter.class).exportTo(outputDir.resolve(ALL_SCENARIOS_ZIP_FILE_NAME).toFile());

// export limits
Expand Down
2 changes: 1 addition & 1 deletion eurostag-step-up-transformer/pom.xml
Expand Up @@ -51,7 +51,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>modules</artifactId>
<artifactId>loadflow-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
12 changes: 11 additions & 1 deletion pclfsim-integration/pom.xml
Expand Up @@ -50,7 +50,17 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>modules</artifactId>
<artifactId>loadflow-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>simulation-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>security-analysis</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down

0 comments on commit e1a4d5d

Please sign in to comment.