Skip to content

Commit

Permalink
Removing custom strategy and NSGA-II script
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasroges committed Jan 3, 2024
1 parent f79c7b8 commit 58cd57c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 292 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edge-sim-py = {git = "[email protected]:lucasroges/EdgeSimPy.git"}
scikit-learn = "^1.3.0"
matplotlib = "^3.7.2"
ipykernel = "^6.27.0"
pymoo = "^0.6.1.1"


[build-system]
Expand Down
235 changes: 0 additions & 235 deletions run_nsgaii.py

This file was deleted.

2 changes: 1 addition & 1 deletion simulation/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main(

# Creating a Simulator object
simulator = edge_sim_py.Simulator(
dump_interval=4000 if algorithm != "custom" else float("inf"),
dump_interval=4000,
logs_directory=f"logs/algorithm={algorithm};dataset={dataset.split('/')[-1].split('.')[0]};seed={seed}" if algorithm != "resource_aware_dynamic" else f"logs/algorithm={algorithm};dataset={dataset.split('/')[-1].split('.')[0]};seed={seed};replicas={replicas};percentage={percentage_of_replicated_images}",
resource_management_algorithm=algorithm_wrapper,
resource_management_algorithm_parameters=algorithm_parameters,
Expand Down
1 change: 0 additions & 1 deletion simulation/strategies/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .p2p_registry_provisioning import p2p_registry_provisioning
from .dynamic_registry_provisioning import dynamic_registry_provisioning
from .custom_registry_provisioning import custom_registry_provisioning
from .resource_aware_dynamic_registry_provisioning import resource_aware_dynamic_registry_provisioning
from .dynamic_enhanced_registry_provisioning import dynamic_enhanced_registry_provisioning
52 changes: 0 additions & 52 deletions simulation/strategies/custom_registry_provisioning.py

This file was deleted.

4 changes: 2 additions & 2 deletions simulation/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .strategies import p2p_registry_provisioning, dynamic_registry_provisioning, custom_registry_provisioning, resource_aware_dynamic_registry_provisioning, dynamic_enhanced_registry_provisioning
from .strategies import p2p_registry_provisioning, dynamic_registry_provisioning, resource_aware_dynamic_registry_provisioning, dynamic_enhanced_registry_provisioning
from .utils import follow_user

import random
Expand All @@ -13,7 +13,7 @@ def algorithm_wrapper(parameters: dict):
random_state = random.getstate()

# Running the custom algorithm
if parameters["algorithm"] not in ["p2p", "dynamic", "custom", "resource_aware_dynamic", "dynamic_enhanced"]:
if parameters["algorithm"] not in ["p2p", "dynamic", "resource_aware_dynamic", "dynamic_enhanced"]:
print(f"{parameters['algorithm']} strategy does not require a custom algorithm.")
else:
eval(f"{parameters['algorithm']}_registry_provisioning")(parameters=parameters)
Expand Down

0 comments on commit 58cd57c

Please sign in to comment.