Repository navigation
Part of cloudsimplus/cloudsimplus#650: Stop sharing stateful UtilizationModels - #51
Merged
Merged
Conversation
…ionModels CloudSim Plus now throws when a stateful UtilizationModel is shared by many VMs or Cloudlets, since that gives inaccurate results. - LoggingExample, VmDestructionExample, MigrationExample1 and InterDatacenterMigration1 create one UtilizationModelDynamic with an update function for each Cloudlet. - UtilizationModelStochasticPerformance enables alwaysGenNewRandUtilization by default, so its single shared model is stateless, and gives each model a distinct seed when using one per Cloudlet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
manoelcampos
force-pushed
the
650-stateful-utilization-models
branch
from
November 13, 2026 07:08
d957c9d to
feb052f
Compare
7 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of cloudsimplus/cloudsimplus#650, which cloudsimplus/cloudsimplus#651 implemented.
CloudSim Plus now throws an
IllegalStateExceptionwhen a statefulUtilizationModel(aUtilizationModelDynamicwith an update function, or aUtilizationModelStochasticwithoutalwaysGenNewRandUtilization) is shared by many VMs or Cloudlets, since one changes the utilization the others get. These examples shared such models, so they were giving inaccurate results and now throw.Changes
LoggingExample:createCloudlets()takes aSupplier<UtilizationModel>, so each Cloudlet gets its own model.VmDestructionExample: a newcreateDynamicUtilizationModel()creates the CPU model for each Cloudlet.MigrationExample1andInterDatacenterMigration1: create the CPU model inside the loop, one for each Cloudlet.UtilizationModelStochasticPerformance:ALWAYS_GENERATE_NEW_RANDOM_UTILIZATIONis nowtrueby default, which is required to share a single model (the default,MULTIPLE_UTILIZATION_MODELS = false).SEED + i). With the same seed, all Cloudlets got the same random values.Tests
I ran the 11 examples that use
setUtilizationUpdateFunction()orUtilizationModelStochasticagainst cloudsimplusmaster(with cloudsimplus/cloudsimplus#651). All of them finish without exceptions.UtilizationModelStochasticPerformancetakes about 3.4 minutes (20,000 Hosts, 80,000 VMs, 160,000 Cloudlets).🤖 Generated with Claude Code