اینکه چطور اجرا گرفتم
گتم به گام
:
یه پروچکت حدید ساختم به اسم مثلا mylrmcpelant
و مجداد یه پکیج به همین اسم اضافه کردم بهش و دوتا کاس در پکیج ایجاد شده 
اضافه کردم
یکی کلاس اصلی با این محتوا:
/*
 * To change this license header, choose License Headers in Project 
Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mylrmcpelant;

import java.io.IOException;
import org.cloudbus.cloudsim.examples.power.planetlab.PlanetLabRunner;



/**
 *
 * @author elham
 */
public class Mylrmcpelant {



/**
 * A simulation of a heterogeneous power aware data center that applies the 
Local Regression (LR) VM
 * allocation policy and Maximum Correlation (MC) VM selection policy.
 * 
 * This example uses a real PlanetLab workload: 20110303.
 * 
 * The remaining configuration parameters are in the Constants and 
PlanetLabConstants classes.
 * 
 * If you are using any algorithms, policies or workload included in the 
power package please cite
 * the following paper:
 * 
 * Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic 
Algorithms and Adaptive
 * Heuristics for Energy and Performance Efficient Dynamic Consolidation of 
Virtual Machines in
 * Cloud Data Centers", Concurrency and Computation: Practice and 
Experience (CCPE), Volume 24,
 * Issue 13, Pages: 1397-1420, John Wiley & Sons, Ltd, New York, USA, 2012
 * 
 * @author Anton Beloglazov
 * @since Jan 5, 2012
 */


/**
 * The main method.
 * 
 * @param args the arguments
 * @throws IOException Signals that an I/O exception has occurred.
 */
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder 
="C://Users/elham/Desktop/cloudsim-3.0.3/examples/workload/planetlab";
                        
//Mylrmcpelant.class.getClassLoader().getResource("C://Users/elham/Desktop/cloudsim-3.0.3/examples/workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lr"; // Local Regression (LR) VM allocation 
policy
String vmSelectionPolicy = "mc"; // Maximum Correlation (MC) VM selection 
policy
String parameter = "1.2"; // the safety parameter of the LR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}

}
این کلاس از پارت 
\cloudsim-3.0.3\examples\org\cloudbus\cloudsim\examples\power\planetlab 
گرفته شده است
فقط اسم کلاس اصلیو به اسم کلاس خودم تغییر دادم
و import org.cloudbus.cloudsim.examples.power.planetlab.PlanetLabRunner; را 
به کلاس اصافه کردم
 
آدرس پیش فرض پوشه ورودی را به String inputFolder 
="C://Users/elham/Desktop/cloudsim-3.0.3/examples/workload/planetlab";
تغییر دادم
نمیدونم چرا PlanetLabRunner را اررو میداد
بخاطر این کلاس دوم را به کد زیر که دقیقا از همون آدرس قبلی گرفته شد به 
برنامه اضافه کردم

/*
 * To change this license header, choose License Headers in Project 
Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mylrmcpelant;

import java.util.Calendar;
import org.cloudbus.cloudsim.Log;
import org.cloudbus.cloudsim.core.CloudSim;
import org.cloudbus.cloudsim.examples.power.Helper;
import org.cloudbus.cloudsim.examples.power.RunnerAbstract;
import org.cloudbus.cloudsim.examples.power.planetlab.PlanetLabConstants;
import org.cloudbus.cloudsim.examples.power.planetlab.PlanetLabHelper;


/**
 * The example runner for the PlanetLab workload.
 * 
 * If you are using any algorithms, policies or workload included in the 
power package please cite
 * the following paper:
 * 
 * Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic 
Algorithms and Adaptive
 * Heuristics for Energy and Performance Efficient Dynamic Consolidation of 
Virtual Machines in
 * Cloud Data Centers", Concurrency and Computation: Practice and 
Experience (CCPE), Volume 24,
 * Issue 13, Pages: 1397-1420, John Wiley & Sons, Ltd, New York, USA, 2012
 * 
 * @author Anton Beloglazov
 * @since Jan 5, 2012
 */
public class PlanetLabRunner extends RunnerAbstract {

/**
 * Instantiates a new planet lab runner.
 * 
 * @param enableOutput the enable output
 * @param outputToFile the output to file
 * @param inputFolder the input folder
 * @param outputFolder the output folder
 * @param workload the workload
 * @param vmAllocationPolicy the vm allocation policy
 * @param vmSelectionPolicy the vm selection policy
 * @param parameter the parameter
 */
public PlanetLabRunner(
boolean enableOutput,
boolean outputToFile,
String inputFolder,
String outputFolder,
String workload,
String vmAllocationPolicy,
String vmSelectionPolicy,
String parameter) {
super(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}

/*
 * (non-Javadoc)
 * 
 * @see 
org.cloudbus.cloudsim.examples.power.RunnerAbstract#init(java.lang.String)
 */
@Override
protected void init(String inputFolder) {
try {
CloudSim.init(1, Calendar.getInstance(), false);

broker = Helper.createBroker();
int brokerId = broker.getId();

cloudletList = PlanetLabHelper.createCloudletListPlanetLab(brokerId, 
inputFolder);
vmList = Helper.createVmList(brokerId, cloudletList.size());
hostList = Helper.createHostList(PlanetLabConstants.NUMBER_OF_HOSTS);
} catch (Exception e) {
e.printStackTrace();
Log.printLine("The simulation has been terminated due to an unexpected 
error");
System.exit(0);
}
}

}

 حالا باید کتابخونشو کامل میکردم

متابق شکل تمام jarهای زیر را به پروجکت اضافه کردم
در نهایت اجرا گرفتم
 هر بار یکسریو اررو میداد با اینکه تابع در کتابخونه وجود داشت
باید میرفتیم و آخرین نسخه ها رو میگرفتیمو آپدیت میکردیم
:)
امیدوارم مفید باشه
احتمالا یه جاهای کارای الکی یا اضافه انجام دادم اما خوب با سعیو خطا پیش 
رفتم :)
On Wednesday, June 10, 2015 at 2:58:16 PM UTC+3:30, Elham Askari wrote:
>
> سلام
> من یه مثال آماده خود کلود سیمو ران کردن زود جواب داد
> حالا مثالی که ورکلود آن planetlab
> هستو اجرا کردم داره خیلی طول میکشه
> عادیه؟
> معمولا چقدر طول میکشه؟
> اون ورک لود اولیو دادم بهش
>
> ممنون:)
>

-- 
شما به این دلیل این پیغام را دریافت کرده اید که در گروه تخصصی رایانش ابری 
وابسته به مرکز رایانش ابری دانشگاه صنعتی امیرکبیر و جامعه آزاد رایانش ابری 
ایران عضو شده اید.
http://crc.aut.ac.ir
http://occc.ir

این گروه برای بحث پیرامون مسائل مختلف در حوزه رایانش ابری و اطلاع از آخرین 
اخبار مربوط به این حوزه می باشد
برای ارتباط با افراد فعال در این حوزه میتوانید در جلسات حضوری جامعه آزاد رایانش 
ابری ایران که بصورت عمومی برگزار میشود شرکت کنید

برای طرح پرسش و دریافت پاسخ میتوانید به سایت زیر نیز مراجعه نمایید
http://ask.occc.ir

برای استفاده از دانشنامه آزاد رایانش ابری میتوانید به سایت زیر مراجعه نمایید
http://wiki.occc.ir

برای اطلاع از آخرین اخبار و فعالیت های انجام شده در جامعه رایانش ابری میتوانید 
به بورد عمومی مراجعه نمایید
https://trello.com/occc_board

همچنین میتوانید سری به رصد خانه رایانش ابری بزنید تا از رویدادهای اخیر در سطح 
جهان مطلع شوید
http://news.occc.ir/index.php?hours=168
--- 
You received this message because you are subscribed to the Google Groups "Aut 
Cloud Computing Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/aut-cloud-computing-group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/aut-cloud-computing-group/912c1634-2b96-44d3-a91c-9114ec63b611%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to