acsicuib / YAFS

Yet Another Fog Simulator (YAFS)
MIT License
101 stars 73 forks source link

Multiple App Service Placement "For" Loop #4

Closed jamesn1197 closed 5 years ago

jamesn1197 commented 5 years ago

I added a for loop to the .initial_allocation() method call in line 1060 of core.py. This was meant to address a problem we were having where the Placement policy initial_allocation(self,sim,app_name) method override would only take in the last app_name. This is because it was using the same iterable from the Population policy initial allocation for loop. Because of this, if you tried to simulate multiple apps with different services, you would only see the first app_name (Sim.deploy_app would append placement policies from new apps at the front). By adding this for loop, we were able to simulate multiple apps using multiple services. I hope this is helpful.

wisaaco commented 5 years ago

You're right. Thanks