cloudsim 学习笔记 实例5(4)

时间:2026-01-16

cloudsim 学习笔记 实例

cloudletList2.add(cloudlet2); //submit cloudlet list to the brokers 【云任务列表提交给代理】 broker1.submitCloudletList(cloudletList1); broker2.submitCloudletList(cloudletList2);

【比较例子4 没有了bind the cloudlets to the vms !!!】

// Sixth step: Starts the simulation 【开始仿真】

CloudSim.startSimulation();

// Final step: Print results when simulation is over 【仿真结束 打印结果】 List<Cloudlet> newList1 = broker1.getCloudletReceivedList();

List<Cloudlet> newList2 = broker2.getCloudletReceivedList();

CloudSim.stopSimulation();

Log.print("=============> User "+brokerId1+" ");

printCloudletList(newList1);

Log.print("=============> User "+brokerId2+" ");

printCloudletList(newList2);

//Print the debt of each user to each datacenter 【打印账单】

datacenter0.printDebts();

datacenter1.printDebts();

Log.printLine("CloudSimExample5 finished!");

}

catch (Exception e) {

e.printStackTrace();

Log.printLine("Unwanted errors happen");

}

}

private static Datacenter createDatacenter(String name){

// Here are the steps needed to create a PowerDatacenter:

// 1. We need to create a list to store 【创建列表储存机器】

// our machine

List<Host> hostList = new ArrayList<Host>();

// 2. A Machine contains one or more PEs or CPUs/Cores.

// In this example, it will have only one core.

List<Pe> peList = new ArrayList<Pe>();

cloudsim 学习笔记 实例5(4).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:4.9 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:19元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219