diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/CastorFullOptimization.java b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/CastorFullOptimization.java index 8b75260443..5193c95e28 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/CastorFullOptimization.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/CastorFullOptimization.java @@ -339,7 +339,7 @@ private Map optimizeContingencyScenarios(Crac crac, contingencyScenarioResults.put(curativeState, new SkippedOptimizationResultImpl(curativeState, new HashSet<>(), new HashSet<>(), ComputationStatus.FAILURE)); } } - TECHNICAL_LOGS.info("Remaining post-contingency scenarios to optimize: {}", remainingScenarios.decrementAndGet()); + TECHNICAL_LOGS.debug("Remaining post-contingency scenarios to optimize: {}", remainingScenarios.decrementAndGet()); try { networkPool.releaseUsedNetwork(networkClone); contingencyCountDownLatch.countDown(); diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/commons/parameters/UnoptimizedCnecParameters.java b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/commons/parameters/UnoptimizedCnecParameters.java index 13475b5bf9..3ddb39359f 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/commons/parameters/UnoptimizedCnecParameters.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/commons/parameters/UnoptimizedCnecParameters.java @@ -21,7 +21,7 @@ import java.util.Set; import java.util.stream.Collectors; -import static com.farao_community.farao.commons.logs.FaraoLoggerProvider.BUSINESS_WARNS; +import static com.farao_community.farao.commons.logs.FaraoLoggerProvider.TECHNICAL_LOGS; /** * @author Joris Mancini {@literal } @@ -109,12 +109,12 @@ private static Map getUnoptimizedCnecsInSeriesWithPsts private static boolean skipEntry(String cnecId, String pstId, Set flowCnecs, Set pstRangeActions) { if (flowCnecs.isEmpty()) { - BUSINESS_WARNS.warn("No flowCnec with network element id {} exists in unoptimized-cnecs-in-series-with-psts parameter", cnecId); + TECHNICAL_LOGS.debug("No flowCnec with network element id {} exists in unoptimized-cnecs-in-series-with-psts parameter", cnecId); return true; } if (pstRangeActions.isEmpty()) { - BUSINESS_WARNS.warn("No pst range actions are defined with network element {}", pstId); + TECHNICAL_LOGS.debug("No pst range actions are defined with network element {}", pstId); return true; } return false; @@ -122,7 +122,7 @@ private static boolean skipEntry(String cnecId, String pstId, Set flow private static boolean skipFlowCnec(Set availablePstRangeActions, String pstId) { if (availablePstRangeActions.size() > 1) { - BUSINESS_WARNS.warn("{} pst range actions are defined with network element {} instead of 1", availablePstRangeActions.size(), pstId); + TECHNICAL_LOGS.debug("{} pst range actions are defined with network element {} instead of 1", availablePstRangeActions.size(), pstId); return true; } diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/linear_optimisation/algorithms/fillers/UnoptimizedCnecFiller.java b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/linear_optimisation/algorithms/fillers/UnoptimizedCnecFiller.java index 55838e457c..c562670c75 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/linear_optimisation/algorithms/fillers/UnoptimizedCnecFiller.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/linear_optimisation/algorithms/fillers/UnoptimizedCnecFiller.java @@ -14,8 +14,8 @@ import com.farao_community.farao.data.crac_api.range_action.PstRangeAction; import com.farao_community.farao.search_tree_rao.commons.RaoUtil; import com.farao_community.farao.search_tree_rao.commons.optimization_perimeters.OptimizationPerimeter; -import com.farao_community.farao.search_tree_rao.linear_optimisation.algorithms.linear_problem.LinearProblem; import com.farao_community.farao.search_tree_rao.commons.parameters.UnoptimizedCnecParameters; +import com.farao_community.farao.search_tree_rao.linear_optimisation.algorithms.linear_problem.LinearProblem; import com.farao_community.farao.search_tree_rao.result.api.FlowResult; import com.farao_community.farao.search_tree_rao.result.api.RangeActionActivationResult; import com.farao_community.farao.search_tree_rao.result.api.SensitivityResult; @@ -26,7 +26,6 @@ import java.util.stream.Collectors; import static com.farao_community.farao.commons.Unit.MEGAWATT; -import static com.farao_community.farao.commons.logs.FaraoLoggerProvider.BUSINESS_WARNS; import static java.lang.Math.abs; /** @@ -315,7 +314,7 @@ private State getLastStateWithRangeActionAvailableForCnec(FlowCnec cnec) { optimizationContext.getRangeActionsPerState().get(state).contains(flowCnecPstRangeActionMap.get(cnec))) .findFirst(); if (lastState.isEmpty()) { - BUSINESS_WARNS.warn("Range action {} is unavailable for cnec {}", flowCnecPstRangeActionMap.get(cnec).getId(), cnec.getId()); + // Range action (referenced for "cnec" in flowCnecPstRangeActionMap) is unavailable for cnec return null; } else { return lastState.get(); diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTree.java b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTree.java index b0319adf1a..7de704ce2d 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTree.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTree.java @@ -125,7 +125,7 @@ public CompletableFuture run() { applyForcedNetworkActionsOnRootLeaf(); - TECHNICAL_LOGS.info("Evaluating root leaf"); + TECHNICAL_LOGS.debug("Evaluating root leaf"); rootLeaf.evaluate(input.getObjectiveFunction(), getSensitivityComputerForEvaluation()); this.preOptimFunctionalCost = rootLeaf.getFunctionalCost(); this.preOptimVirtualCost = rootLeaf.getVirtualCost(); diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTreeTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTreeTest.java index 2bb3cd4c75..4e43337cd7 100644 --- a/ra-optimisation/search-tree-rao/src/test/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTreeTest.java +++ b/ra-optimisation/search-tree-rao/src/test/java/com/farao_community/farao/search_tree_rao/search_tree/algorithms/SearchTreeTest.java @@ -448,7 +448,7 @@ public void testLogsVerbose() { when(rootLeaf.toString()).thenReturn("root leaf description"); Mockito.doReturn(rootLeaf).when(searchTree).makeLeaf(optimizationPerimeter, network, prePerimeterResult, appliedRemedialActions); - String expectedLog1 = "[INFO] Evaluating root leaf"; + String expectedLog1 = "[DEBUG] Evaluating root leaf"; String expectedLog2 = "[INFO] Could not evaluate leaf: root leaf description"; String expectedLog3 = "[INFO] Scenario \"preventive\": initial cost = 0.00 (functional: 0.00, virtual: 0.00), no remedial actions activated, cost after PRA = 0.00 (functional: 0.00, virtual: 0.00)"; @@ -471,7 +471,7 @@ public void testLogsDontVerbose() { when(rootLeaf.toString()).thenReturn("root leaf description"); Mockito.doReturn(rootLeaf).when(searchTree).makeLeaf(optimizationPerimeter, network, prePerimeterResult, appliedRemedialActions); - String expectedLog1 = "[INFO] Evaluating root leaf"; + String expectedLog1 = "[DEBUG] Evaluating root leaf"; String expectedLog2 = "[INFO] Could not evaluate leaf: root leaf description"; String expectedLog3 = "[INFO] Scenario \"preventive\": initial cost = 0.00 (functional: 0.00, virtual: 0.00), no remedial actions activated, cost after PRA = 0.00 (functional: 0.00, virtual: 0.00)"; diff --git a/util/src/main/java/com/farao_community/farao/util/MultipleNetworkPool.java b/util/src/main/java/com/farao_community/farao/util/MultipleNetworkPool.java index 3dcfad9156..cb918ec214 100644 --- a/util/src/main/java/com/farao_community/farao/util/MultipleNetworkPool.java +++ b/util/src/main/java/com/farao_community/farao/util/MultipleNetworkPool.java @@ -27,11 +27,11 @@ protected MultipleNetworkPool(Network network, String targetVariant, int paralle @Override protected void initAvailableNetworks(Network network) { - TECHNICAL_LOGS.info("Filling network pool with copies of network '{}' on variant '{}'", network.getId(), targetVariant); + TECHNICAL_LOGS.debug("Filling network pool with copies of network '{}' on variant '{}'", network.getId(), targetVariant); String initialVariant = network.getVariantManager().getWorkingVariantId(); network.getVariantManager().setWorkingVariant(targetVariant); for (int i = 0; i < getParallelism(); i++) { - TECHNICAL_LOGS.info("Copy n°{}", i + 1); + TECHNICAL_LOGS.debug("Copy n°{}", i + 1); Network copy = NetworkXml.copy(network); // The initial network working variant is VariantManagerConstants.INITIAL_VARIANT_ID // in cloned network, so we need to copy it again.