excel dataset

247 views
Skip to first unread message

Atyaf

unread,
May 21, 2017, 9:31:31 AM5/21/17
to cloudsim
Hi all
How can I use dataset stored as Xls instead of cloudlets in cloudsim 

 

Mohammed Alanzy

unread,
May 21, 2017, 4:37:02 PM5/21/17
to clou...@googlegroups.com
Hi bros 
I'll share with you the excel code n the way to do it , just email me if I forgot 

Sent from my iPhone

On 21 May 2017, at 9:31 PM, Atyaf <atyafc...@gmail.com> wrote:

Hi all
How can I use dataset stored as Xls instead of cloudlets in cloudsim 

 

--

---
You received this message because you are subscribed to the Google Groups "cloudsim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rubee Tandan

unread,
May 22, 2017, 1:13:25 AM5/22/17
to cloudsim
hello M. Alanzy,
I have same problem can you please sent me code?

Sadegh Aslanpour

unread,
May 22, 2017, 11:14:23 AM5/22/17
to cloudsim
you should use its library

Atyaf Dhari

unread,
May 22, 2017, 11:17:49 AM5/22/17
to clou...@googlegroups.com
Thank you sir
I used apache but how can use the data instead of cloudlets

--

---
You received this message because you are subscribed to a topic in the Google Groups "cloudsim" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cloudsim/0ebkDvPqX5U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cloudsim+unsubscribe@googlegroups.com.

Atyaf

unread,
May 23, 2017, 4:11:13 AM5/23/17
to cloudsim
hi M. Alanzy 

l sent email for u 
pls share ur way of excel dataset code

M. Alanzy

unread,
May 23, 2017, 6:56:08 AM5/23/17
to cloudsim
Hi guys 
see the code below, put it after printing function,  U just need to add some libraries to ur Package to get it work 
Thanks ,,

 
try {
System.out.println("Suseccfully >> Go to D drive to see the result ");
FileOutputStream fileOut = new FileOutputStream("D://ResultS.xls");
@SuppressWarnings("resource")
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet worksheet = workbook.createSheet("Enizi");

HSSFCellStyle headcellStyle = workbook.createCellStyle();
HSSFCellStyle content_cellStyle = workbook.createCellStyle();
headcellStyle.setFillForegroundColor(HSSFColor.SKY_BLUE.index);
headcellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
headcellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
headcellStyle.setBorderRight(HSSFCellStyle.BORDER_THICK);
content_cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
HSSFRow row1 = worksheet.createRow((short) 0);
HSSFCell cellS1 = row1.createCell((short) 0);
cellS1.setCellValue("Cloudlet ID");
cellS1.setCellStyle(headcellStyle);

HSSFCell cellB1 = row1.createCell((short) 1);
cellB1.setCellValue("STATUS");
cellB1.setCellStyle(headcellStyle);

HSSFCell cellD1 = row1.createCell((short) 2);
cellD1.setCellValue("Data center ID");
cellD1.setCellStyle(headcellStyle);

HSSFCell cellH1 = row1.createCell((short) 3);
cellH1.setCellValue("VM ID");
cellH1.setCellStyle(headcellStyle);

HSSFCell cellv1 = row1.createCell((short) 7);
cellv1.setCellValue("LENGTH");
cellv1.setCellStyle(headcellStyle);

HSSFCell cellE1 = row1.createCell((short) 4);
cellE1.setCellValue("TIME");
cellE1.setCellStyle(headcellStyle);

HSSFCell cellF1 = row1.createCell((short) 5);
cellF1.setCellValue("START_TIME");
cellF1.setCellStyle(headcellStyle);

HSSFCell cellG1 = row1.createCell((short) 6);
cellG1.setCellValue("FINISH_TIME");
cellG1.setCellStyle(headcellStyle);

// DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) { // loop for printing
cloudlet = list.get(i);
HSSFRow row2 = worksheet.createRow( cloudlet.getCloudletId() + 1); // Row no.   cloudlet.getCloudletId() //  replacement for i 
HSSFCell cellA = row2.createCell((short) 0); // Column no.
cellA.setCellValue(cloudlet.getCloudletId());
cellA.setCellStyle(content_cellStyle);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
HSSFCell cellA1 = row2.createCell((short) 1); // colume no.
cellA1.setCellValue("SUCCESS");
cellA1.setCellStyle(content_cellStyle);
HSSFCell cellA2 = row2.createCell((short) 2); // colume no.
cellA2.setCellValue(cloudlet.getResourceId());
cellA2.setCellStyle(content_cellStyle);
HSSFCell cellA3 = row2.createCell((short) 3); // colume no.
cellA3.setCellValue(cloudlet.getVmId());
cellA3.setCellStyle(content_cellStyle);
HSSFCell cellA7 = row2.createCell((short) 7); // colume no.
cellA7.setCellValue(cloudlet.getCloudletLength());
cellA7.setCellStyle(content_cellStyle);
HSSFCell cellA4 = row2.createCell((short) 4); // colume no.
//cellA4.setCellValue(dft.format(cloudlet.getActualCPUTime()));
cellA4.setCellValue(cloudlet.getActualCPUTime());
cellA4.setCellStyle(content_cellStyle);
HSSFCell cellA5 = row2.createCell((short) 5); // colume no.
//cellA5.setCellValue(dft.format(cloudlet.getExecStartTime()));
cellA5.setCellValue(cloudlet.getExecStartTime());
cellA5.setCellStyle(content_cellStyle);
HSSFCell cellA6 = row2.createCell((short) 6); // colume no.
//cellA6.setCellValue(dft.format(cloudlet.getFinishTime()));
cellA6.setCellValue(cloudlet.getFinishTime());
cellA6.setCellStyle(content_cellStyle);
}
}
workbook.write(fileOut);
fileOut.flush();
fileOut.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

M. Alanzy

unread,
May 23, 2017, 7:09:53 AM5/23/17
to cloudsim
I cannot Post the libraries here so just check this link take the lib. and add this code for ur simulation >> it will work inshallah 

Atyaf Dhari

unread,
May 23, 2017, 7:16:02 AM5/23/17
to clou...@googlegroups.com
thank u very much I will try and inform u

--

M. Alanzy

unread,
May 23, 2017, 10:37:40 AM5/23/17
to cloudsim
https://www.youtube.com/watch?v=RsrF2Ku7ad4&t=483s 
this link Working with Excel and Apache POI

Atyaf

unread,
May 29, 2017, 3:41:39 AM5/29/17
to cloudsim
 
thank u for replying 
I added excel file into example 6

 for reading does not write the dataset  
from excel
but there are errors
pls can u check the attachment
بتاريخ الأحد، 21 مايو، 2017 4:31:31 م UTC+3، كتب Atyaf:
ex6 with excel file.txt

Mohammed Alanzy

unread,
May 29, 2017, 4:23:59 PM5/29/17
to clou...@googlegroups.com
Pls just add it after this function or inside it after finish the process of printing add it image1.PNG

Sent from my iPhone
--

---
You received this message because you are subscribed to the Google Groups "cloudsim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<ex6 with excel file.txt>

Atyaf

unread,
May 30, 2017, 2:31:01 AM5/30/17
to cloudsim

thank you for replying

I want to read Excel cells as cloudlet characteristics, not for print cloudlet characteristics in Excel file
 PLS can u guide me 


بتاريخ الأحد، 21 مايو، 2017 4:31:31 م UTC+3، كتب Atyaf:

Arif Ullah

unread,
Mar 19, 2019, 4:39:39 AM3/19/19
to cloudsim


On Sunday, May 21, 2017 at 9:31:31 PM UTC+8, Atyaf wrote:
Hi all
How can I use dataset stored as Xls instead of cloudlets in cloudsim 

 

Where can i find the benchmark Dataset for testing scheduling cost in cloudsim?

Sohaib Ajmal

unread,
Mar 19, 2019, 4:46:30 AM3/19/19
to clou...@googlegroups.com
Check cloudsimplus there is benchmark dataset but i am not sure it can be used in your work or not.

--

SS

unread,
Sep 4, 2020, 12:27:49 PM9/4/20
to cloudsim
Hello Cloudsim Experts,
I want to get the output results data in the excel sheet. Please share ideas on how can I do that.
I will be very much thankful to you if you could share its codes and suggest where I can add those codes.

Hamed Akrami

unread,
Sep 5, 2020, 2:09:04 AM9/5/20
to clou...@googlegroups.com
Hello. You have to save parts of results that you needed in some data structures like array or class and save them.
At the end of simulation you use them and use some Excel component and enter them in a sheet.


--

---
You received this message because you are subscribed to the Google Groups "cloudsim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim+u...@googlegroups.com.

succ8181

unread,
Dec 11, 2023, 5:23:44 AM12/11/23
to cloudsim
hello did u find a way to input dataset into cloudsim please share if you go it ..
Reply all
Reply to author
Forward
0 new messages