From 72b54541a5d682b1df29c69af80ada33748678b3 Mon Sep 17 00:00:00 2001 From: Bertrand Rix Date: Mon, 4 Nov 2024 10:17:36 +0100 Subject: [PATCH] Clean. Signed-off-by: Bertrand Rix --- cpp/powsybl-cpp/powsybl-cpp.cpp | 4 - cpp/powsybl-cpp/powsybl-cpp.h | 2 - data/rao/rao_results.json | 210 ------------------ .../python/commons/CommonCFunctions.java | 5 - 4 files changed, 221 deletions(-) delete mode 100644 data/rao/rao_results.json diff --git a/cpp/powsybl-cpp/powsybl-cpp.cpp b/cpp/powsybl-cpp/powsybl-cpp.cpp index 668b537a5f..49a56c7c70 100644 --- a/cpp/powsybl-cpp/powsybl-cpp.cpp +++ b/cpp/powsybl-cpp/powsybl-cpp.cpp @@ -412,10 +412,6 @@ void setJavaLibraryPath(const std::string& javaLibraryPath) { PowsyblCaller::get()->callJava<>(::setJavaLibraryPath, (char*) javaLibraryPath.data()); } -void loadORtoolsLib(const std::string& libraryPath) { - PowsyblCaller::get()->callJava<>(::loadORtoolsLib, (char*) libraryPath.data()); -} - void setConfigRead(bool configRead) { PowsyblCaller::get()->callJava<>(::setConfigRead, configRead); } diff --git a/cpp/powsybl-cpp/powsybl-cpp.h b/cpp/powsybl-cpp/powsybl-cpp.h index 1da4660708..fe6c04c52f 100644 --- a/cpp/powsybl-cpp/powsybl-cpp.h +++ b/cpp/powsybl-cpp/powsybl-cpp.h @@ -483,8 +483,6 @@ void init(std::function preJ void setJavaLibraryPath(const std::string& javaLibraryPath); -void loadORtoolsLib(const std::string& libraryPath); - void setConfigRead(bool configRead); void setDefaultLoadFlowProvider(const std::string& loadFlowProvider); diff --git a/data/rao/rao_results.json b/data/rao/rao_results.json deleted file mode 100644 index b6d69803e7..0000000000 --- a/data/rao/rao_results.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "type" : "RAO_RESULT", - "version" : "1.5", - "info" : "Generated by Open RAO http://farao-community.github.io", - "computationStatus" : "default", - "optimizationStepsExecuted" : "The RAO only went through first preventive", - "costResults" : { - "initial" : { - "functionalCost" : -2370.3, - "virtualCost" : { - "sensitivity-failure-cost" : 0.0 - } - }, - "preventive" : { - "functionalCost" : -2382.8, - "virtualCost" : { - "mnec-cost" : 0.0, - "sensitivity-failure-cost" : 0.0 - } - }, - "outage" : { - "functionalCost" : -2382.8, - "virtualCost" : { - "mnec-cost" : 0.0, - "sensitivity-failure-cost" : 0.0 - } - }, - "auto" : { - "functionalCost" : -2382.8, - "virtualCost" : { - "mnec-cost" : 0.0, - "sensitivity-failure-cost" : 0.0 - } - }, - "curative" : { - "functionalCost" : -2382.8, - "virtualCost" : { - "mnec-cost" : 0.0, - "sensitivity-failure-cost" : 0.0 - } - } - }, - "computationStatusMap" : [ ], - "flowCnecResults" : [ { - "flowCnecId" : "BBE2AA1 FFR3AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 4500.22, - "relativeMargin" : 2956.79, - "side1" : { - "flow" : 499.78, - "zonalPtdfSum" : 1.521993 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 4532.78, - "relativeMargin" : 2978.19, - "side1" : { - "flow" : 467.22, - "zonalPtdfSum" : 1.521993 - } - } - } - }, { - "flowCnecId" : "DDE2AA1 NNL3AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 3999.78, - "relativeMargin" : 2586.83, - "side1" : { - "flow" : -1000.22, - "zonalPtdfSum" : 1.54621 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 3967.22, - "relativeMargin" : 2565.77, - "side1" : { - "flow" : -1032.78, - "zonalPtdfSum" : 1.54621 - } - } - } - }, { - "flowCnecId" : "FFR1AA1 FFR2AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 2666.26, - "relativeMargin" : 5414.63, - "side1" : { - "flow" : 1333.74, - "zonalPtdfSum" : 0.492417 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 2677.13, - "relativeMargin" : 5436.72, - "side1" : { - "flow" : 1322.87, - "zonalPtdfSum" : 0.492417 - } - } - } - }, { - "flowCnecId" : "FFR2AA1 DDE3AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 3500.22, - "relativeMargin" : 2370.3, - "side1" : { - "flow" : 1499.78, - "zonalPtdfSum" : 1.476696 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 3532.78, - "relativeMargin" : 2392.35, - "side1" : { - "flow" : 1467.22, - "zonalPtdfSum" : 1.476696 - } - } - } - }, { - "flowCnecId" : "NNL1AA1 NNL3AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 4333.2, - "relativeMargin" : 10030.5, - "side1" : { - "flow" : 666.8, - "zonalPtdfSum" : 0.432002 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 4322.34, - "relativeMargin" : 10005.37, - "side1" : { - "flow" : 677.66, - "zonalPtdfSum" : 0.432002 - } - } - } - }, { - "flowCnecId" : "NNL2AA1 BBE3AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 3499.78, - "relativeMargin" : 2405.18, - "side1" : { - "flow" : -1500.22, - "zonalPtdfSum" : 1.455101 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 3467.22, - "relativeMargin" : 2382.8, - "side1" : { - "flow" : -1532.78, - "zonalPtdfSum" : 1.455101 - } - } - } - }, { - "flowCnecId" : "NNL2AA1 NNL3AA1 1 - preventive", - "initial" : { - "megawatt" : { - "margin" : 4166.58, - "relativeMargin" : 6243.56, - "side1" : { - "flow" : 833.42, - "zonalPtdfSum" : 0.667341 - } - } - }, - "preventive" : { - "megawatt" : { - "margin" : 4144.88, - "relativeMargin" : 6211.04, - "side1" : { - "flow" : 855.12, - "zonalPtdfSum" : 0.667341 - } - } - } - } ], - "angleCnecResults" : [ ], - "voltageCnecResults" : [ ], - "networkActionResults" : [ ], - "rangeActionResults" : [ { - "rangeActionId" : "PRA_PST_BE", - "initialSetpoint" : 0.0, - "activatedStates" : [ { - "instant" : "preventive", - "setpoint" : -1.1687933694373345 - } ] - } ] -} \ No newline at end of file diff --git a/java/src/main/java/com/powsybl/python/commons/CommonCFunctions.java b/java/src/main/java/com/powsybl/python/commons/CommonCFunctions.java index cfe4ef6aea..65b5bd05b8 100644 --- a/java/src/main/java/com/powsybl/python/commons/CommonCFunctions.java +++ b/java/src/main/java/com/powsybl/python/commons/CommonCFunctions.java @@ -37,11 +37,6 @@ public static void setJavaLibraryPath(IsolateThread thread, CCharPointer javaLib doCatch(exceptionHandlerPtr, () -> System.setProperty("java.library.path", CTypeUtil.toString(javaLibraryPath))); } - @CEntryPoint(name = "loadORtoolsLib") - public static void loadORtoolsLib(IsolateThread thread, CCharPointer libraryPath, ExceptionHandlerPointer exceptionHandlerPtr) { - doCatch(exceptionHandlerPtr, () -> System.load(CTypeUtil.toString(libraryPath))); - } - @CEntryPoint(name = "setConfigRead") public static void setConfigRead(IsolateThread thread, boolean read, ExceptionHandlerPointer exceptionHandlerPtr) { doCatch(exceptionHandlerPtr, () -> PyPowsyblConfiguration.setReadConfig(read));