diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 6f5542289..c84993940 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -28,8 +28,7 @@
-
-
+
@@ -59,7 +58,7 @@
@@ -108,23 +107,23 @@
- {
+ "keyToString": {
+ "ASKED_ADD_EXTERNAL_FILES": "true",
+ "Git.Branch.Popup.ShowAllRemotes": "true",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "last_opened_file_path": "/home/santi/Documentos/Git/GitHub/GridCal/examples",
+ "node.js.detected.package.eslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "run.code.analysis.last.selected.profile": "aDefault",
+ "settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -146,7 +145,7 @@
-
+
@@ -600,6 +599,7 @@
+
@@ -608,10 +608,10 @@
+
-
@@ -1572,7 +1572,7 @@
1698766404661
-
+
@@ -1606,7 +1606,6 @@
-
@@ -1631,7 +1630,8 @@
-
+
+
@@ -2000,24 +2000,9 @@
- file://$PROJECT_DIR$/src/GridCalEngine/Utils/MIP/ortools_interface.py
- 253
-
-
-
- file://$PROJECT_DIR$/src/GridCalEngine/Utils/MIP/ortools_interface.py
- 251
-
-
-
- file://$PROJECT_DIR$/examples/dc_linear_opf_with_robust_solve.py
- 23
-
-
-
- file://$PROJECT_DIR$/src/GridCalEngine/Utils/MIP/ortools_interface.py
- 236
-
+ file://$PROJECT_DIR$/src/GridCalEngine/Simulations/PowerFlow/NumericalMethods/newton_raphson.py
+ 142
+
@@ -2036,7 +2021,7 @@
-
+
@@ -2240,7 +2225,7 @@
-
+
diff --git a/src/GridCalEngine/Utils/MIP/ortools_interface.py b/src/GridCalEngine/Utils/MIP/ortools_interface.py
index e0de130f3..d40f7b63a 100644
--- a/src/GridCalEngine/Utils/MIP/ortools_interface.py
+++ b/src/GridCalEngine/Utils/MIP/ortools_interface.py
@@ -272,14 +272,12 @@ def get_value(self, x: Union[float, int, LpVar, LpExp, LpCst, LpCstBounded]) ->
"""
Get the value of a variable stored in a numpy array of objects
:param x: solver object (it may be a LP var or a number)
- :return: result or previous numeric value
+ :return: result or zero
"""
if isinstance(x, LpVar):
val = self.solver.value(x)
elif isinstance(x, LpExp):
val = self.solver.value(x)
- elif isinstance(x, LpCst):
- val = self.solver.dual_value(x)
elif isinstance(x, LpCstBounded):
val = self.solver.value(x.expression)
elif isinstance(x, float) or isinstance(x, int):
@@ -294,9 +292,9 @@ def get_value(self, x: Union[float, int, LpVar, LpExp, LpCst, LpCstBounded]) ->
def get_dual_value(self, x: LpCst) -> float:
"""
- Get the value of a variable stored in a numpy array of objects
+ Get the dual value of a variable stored in a numpy array of objects
:param x: constraint
- :return: result or previous numeric value
+ :return: result or zero
"""
if isinstance(x, LpCst):
val = self.solver.dual_value(x)