diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index ec376811d..e0898160a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -28,9 +28,11 @@
-
+
-
+
+
+
@@ -127,7 +129,7 @@
"Python tests.Nosetests in test_ac_opf.py.executor": "Run",
"Python tests.Nosetests in test_topology_processor.py.executor": "Debug",
"Python tests.Nosetests in tests.executor": "Run",
- "Python.ExecuteGridCal.executor": "Debug",
+ "Python.ExecuteGridCal.executor": "Run",
"Python.ac_opf.executor": "Run",
"Python.acopf_run.executor": "Run",
"Python.endpoints.executor": "Run",
@@ -1488,7 +1490,7 @@
-
+
1656059954202
@@ -1833,7 +1835,7 @@
1698766404661
-
+
@@ -1879,8 +1881,6 @@
-
-
@@ -1904,7 +1904,9 @@
-
+
+
+
@@ -2297,36 +2299,6 @@
280
-
- file://$PROJECT_DIR$/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
- 4706
-
-
-
- file://$PROJECT_DIR$/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
- 1026
-
-
-
- file://$PROJECT_DIR$/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
- 2426
-
-
-
- file://$PROJECT_DIR$/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
- 2406
-
-
-
- file://$PROJECT_DIR$/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
- 2398
-
-
-
- file://$PROJECT_DIR$/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
- 2378
-
-
@@ -2486,7 +2458,7 @@
-
+
diff --git a/requirements.txt b/requirements.txt
index 1d0321c0a..2a603ab6b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -25,7 +25,6 @@ pyqtdarktheme
nptyping
windpowerlib
pvlib
-hyperopt
requests
pytest >= 7.2.0
rdflib
diff --git a/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py b/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
index 59ea08e1d..8430061c5 100644
--- a/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
+++ b/src/GridCal/Gui/Diagrams/SchematicWidget/schematic_widget.py
@@ -4858,12 +4858,18 @@ def get_devices_to_expand(circuit: MultiCircuit, root_bus: Bus, max_level: int =
list(fluid_nodes), fluid_paths)
-def make_vecinity_diagram(circuit: MultiCircuit, root_bus: Bus, max_level: int = 1):
+def make_vecinity_diagram(circuit: MultiCircuit,
+ root_bus: Bus,
+ max_level: int = 1,
+ prog_func: Union[Callable, None] = None,
+ text_func: Union[Callable, None] = None):
"""
Create a vecinity diagram
:param circuit: MultiCircuit
:param root_bus: Bus
:param max_level: max expansion level
+ :param prog_func:
+ :param text_func:
:return:
"""
@@ -4891,8 +4897,8 @@ def make_vecinity_diagram(circuit: MultiCircuit, root_bus: Bus, max_level: int =
fluid_nodes=list(fluid_nodes),
fluid_paths=fluid_paths,
explode_factor=1.0,
- prog_func=None,
- text_func=print,
+ prog_func=prog_func,
+ text_func=text_func,
name=root_bus.name + 'vecinity')
return diagram
diff --git a/src/GridCalEngine/Simulations/InvestmentsEvaluation/investments_evaluation_driver.py b/src/GridCalEngine/Simulations/InvestmentsEvaluation/investments_evaluation_driver.py
index 0772602a1..1a9aaa22c 100644
--- a/src/GridCalEngine/Simulations/InvestmentsEvaluation/investments_evaluation_driver.py
+++ b/src/GridCalEngine/Simulations/InvestmentsEvaluation/investments_evaluation_driver.py
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import numpy as np
-import hyperopt
-import functools
-
from typing import List, Dict
from GridCalEngine.Simulations.driver_template import DriverTemplate
from GridCalEngine.Simulations.PowerFlow.power_flow_driver import PowerFlowDriver, PowerFlowOptions
@@ -309,36 +306,6 @@ def independent_evaluation(self) -> None:
self.report_done()
- def optimized_evaluation_hyperopt(self) -> None:
- """
- Run an optimized investment evaluation without considering multiple evaluation groups at a time
- """
-
- self.report_text("Evaluating investments with Hyperopt")
-
- # number of random evaluations at the beginning
- rand_evals = round(self.dim * 1.5)
-
- # binary search space
- space = [hyperopt.hp.randint(f'x_{i}', 2) for i in range(self.dim)]
-
- if self.options.max_eval == rand_evals:
- algo = hyperopt.rand.suggest
- else:
- algo = functools.partial(hyperopt.tpe.suggest, n_startup_jobs=rand_evals)
-
- # compile the snapshot
- self.results = InvestmentsEvaluationResults(investment_groups_names=self.grid.get_investment_groups_names(),
- max_eval=self.options.max_eval + 1)
-
- # add baseline
- self.objective_function_so(combination=np.zeros(self.results.n_groups, dtype=int))
-
- # run
- results = hyperopt.fmin(self.objective_function_so, space, algo, self.options.max_eval)
-
- self.report_done()
-
def optimized_evaluation_mvrsm(self) -> None:
"""
Run an optimized investment evaluation without considering multiple evaluation groups at a time
@@ -464,9 +431,6 @@ def run(self) -> None:
if self.options.solver == InvestmentEvaluationMethod.Independent:
self.independent_evaluation()
- elif self.options.solver == InvestmentEvaluationMethod.Hyperopt:
- self.optimized_evaluation_hyperopt()
-
elif self.options.solver == InvestmentEvaluationMethod.MVRSM:
self.optimized_evaluation_mvrsm_pareto()