GreenCloud Simulator
resdemand.cc
Go to the documentation of this file.
1 /*
2  * resdemand.cc
3  *
4  * @date Sep 5, 2013
5  * @author Guzek:Mateusz
6  */
7 
8 #include "resdemand.h"
9 #include "dcresource.h"
10 
12  capacity_location = std::vector <Capacity *>(res.capacity.size(),NULL) ;
13  current_performance = std::vector <double>(res.capacity.size(),0);
15 
16 }
17 
19  capacity_location = std::vector <Capacity *>(res.capacity.size(),NULL) ;
20  current_performance = std::vector <double>(res.capacity.size(),0);
21  if(svr != NULL){
22  std::vector<Capacity>::iterator i_res;
23  std::vector<Capacity>::iterator i_dem;
24  for(i_res = svr->capacity.begin(), i_dem = this->capacity.begin();
25  i_res != svr->capacity.end();
26  i_res++, i_dem++){
27  i_dem->virtual_capacities.push_back(&(*i_res));
28  }
29  }
31 }
32 
std::vector< Capacity > capacity
Definition: resource.h:87
ResDemand(Resource &res)
Definition: resdemand.cc:11
DcResource * supported_virtual_resource
Definition: resdemand.h:28
std::vector< double > current_performance
Definition: resdemand.h:23
std::vector< Capacity * > capacity_location
Definition: resdemand.h:21