public CaseProjector(Network network, ComputationManager computationManager, LoadFlowFactory loadFlowFactory, SimulatorFactory simulatorFactory, CaseProjectorConfig config) throws Exception { this.network = Objects.requireNonNull(network); this.computationManager = Objects.requireNonNull(computationManager); this.loadFlowFactory = Objects.requireNonNull(loadFlowFactory); this.simulatorFactory = Objects.requireNonNull(simulatorFactory); this.config = Objects.requireNonNull(config); loadFlow = loadFlowFactory.create(network, computationManager, 0); stabilization = simulatorFactory.createStabilization(network, computationManager, 0); stabilization.init(SimulationParameters.load(), new HashMap<>()); }
@Override public void process(Network network, ComputationManager computationManager) throws Exception { LoadFlowFactory loadFlowFactory = defaultConfigSupplier.get().newFactoryImpl(LoadFlowFactory.class); LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, 0); CaseProjectorUtils.project(computationManager, network, loadFlow, network.getStateManager().getWorkingStateId(), caseProjectorConfigSupplier.get()).join(); }
private void runLoadFlow(ComputationManager computationManager) throws Exception { int priority = 1; LoadFlow loadflow = loadFlowFactory.create(_network, computationManager, priority); //((HELMLoadFlow) loadflow).setSlack(this._slackId); LoadFlowResult lfResults = loadflow.run(_network.getStateManager().getWorkingStateId(), LoadFlowParameters.load()).join(); if (!lfResults.isOk()) { System.out.println("LF has not been successfuly completed."); LOGGER.info("Loadflow finished. isOk == false"); System.exit(-1); } }
PostContLoadFlowSimImpactAnalysis(Network network, ComputationManager computationManager, int priority, ContingenciesProvider contingenciesProvider, PostContLoadFlowSimConfig config, LoadFlowFactory loadFlowFactory) { Objects.requireNonNull(network, "network is null"); Objects.requireNonNull(computationManager, "computation manager is null"); Objects.requireNonNull(contingenciesProvider, "contingencies provider is null"); Objects.requireNonNull(config, "config is null"); this.network = network; this.computationManager = computationManager; this.contingenciesProvider = contingenciesProvider; this.config = config; loadFlow = loadFlowFactory.create(network, computationManager, priority); loadFlowParameters = new LoadFlowParameters().setVoltageInitMode(config.isWarnStartActivated() ? LoadFlowParameters.VoltageInitMode.PREVIOUS_VALUES : LoadFlowParameters.VoltageInitMode.DC_VALUES); baseVoltageFilter = new LimitViolationFilter(null, config.getMinBaseVoltageFilter()); }
long start = System.currentTimeMillis(); LoadFlow loadFlow = loadFlowFactory.create(n, computationManager, 0); LoadFlowResult result = loadFlow.run(n.getStateManager().getWorkingStateId(), new LoadFlowParameters(LoadFlowParameters.VoltageInitMode.UNIFORM_VALUES)).join();
LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, loadFlowPriority); LoadFlowResult result = loadFlow.run(network.getStateManager().getWorkingStateId(), loadFlowParameters).join(); if (!result.isOk()) { LoadFlow loadFlow = loadFlowFactory.create(merge, computationManager, loadFlowPriority); LoadFlowResult result = loadFlow.run(merge.getStateManager().getWorkingStateId(), loadFlowParameters).join(); if (!result.isOk()) {
throw new PowsyblException("Case '" + caseFile + "' not found"); LoadFlow loadFlow = defaultConfig.newFactoryImpl(LoadFlowFactory.class).create(network, context.getShortTimeExecutionComputationManager(), 0);
LoadFlow loadFlow = config.getLoadFlowFactoryClass().newInstance().create(network, context.getShortTimeExecutionComputationManager(), 0);
Map<RuleId, Map<HistoDbAttributeId, Object>> valuesPerRule = new HashMap<>(); LoadFlow loadFlow = loadFlowFactory.create(network, context.getShortTimeExecutionComputationManager(), 0); LoadFlowResult loadFlowResult = loadFlow.run(network.getStateManager().getWorkingStateId(), loadFlowParameters).join();
ImpactAnalysis impactAnalysis = simulatorFactory.createImpactAnalysis(network, computationManager, IMPACT_ANALYSIS_PRIORITY, cadbClient); Optimizer optimizer = optimizerFactory.create(network, computationManager, STARTING_POINT_INIT_PRIORITY, histoDbClient, topologyMiner); LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, LOAD_FLOW_PRIORITY);
LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, 0);
.runAsync(() -> { context.network = loadAndMergeNetwork(date, LOADFLOW_PRIORITY); context.loadFlow = loadFlowFactory.create(context.network, computationManager, LOADFLOW_PRIORITY); context.stabilization = simulatorFactory.createStabilization(context.network, computationManager, STABILIZATION_PRIORITY); context.impactAnalysis = simulatorFactory.createImpactAnalysis(context.network, computationManager, IMPACT_ANALYSIS_PRIORITY, cadbClient);
LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, 0);
Stabilization stabilization = simulatorFactory.createStabilization(oCtx.getNetwork(), computationManager, Integer.MAX_VALUE); ImpactAnalysis impactAnalysis = simulatorFactory.createImpactAnalysis(oCtx.getNetwork(), computationManager, Integer.MAX_VALUE, cadbClient); LoadFlow loadflow = loadFlowFactory.create(oCtx.getNetwork(), computationManager, 0); ConstraintsModifier constraintsModifier = new ConstraintsModifier(oCtx.getNetwork()); StateAnalizerListener stateListener = new StateAnalizerListener();
network.getVariantManager().setWorkingVariant(tmpStateId); LoadFlowFactory loadFlowFactory = config.getLoadFlowFactoryClass().newInstance(); LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, 0); runLoadFlow(loadFlow, tmpStateId); if (phaseShifter.getTerminal1().getI() >= phaseShifter.getCurrentLimits1().getPermanentLimit()) {