[104] | 1 | package test.rewolucja.modules; |
---|
| 2 | import java.util.LinkedList; |
---|
| 3 | import java.util.Properties; |
---|
| 4 | |
---|
| 5 | import eduni.simjava.Sim_event; |
---|
| 6 | |
---|
| 7 | import schedframe.exceptions.ModuleException; |
---|
| 8 | import schedframe.scheduling.plugin.grid.Module; |
---|
| 9 | import schedframe.scheduling.plugin.grid.ModuleType; |
---|
| 10 | import test.rewolucja.extensions.Extension; |
---|
| 11 | import gridsim.ResourceCalendar; |
---|
| 12 | |
---|
| 13 | public class GSSIMResourceCalendar extends ResourceCalendar implements Module{ |
---|
| 14 | |
---|
| 15 | private static long seed_; |
---|
| 16 | private static double timeZone_; |
---|
| 17 | private static double peakLoad_; |
---|
| 18 | private static double offPeakLoad_; |
---|
| 19 | private static double holidayLoad_; |
---|
| 20 | private static LinkedList<Integer> Weekends_; |
---|
| 21 | private static LinkedList<Integer> Holidays_; |
---|
| 22 | |
---|
| 23 | static{ |
---|
| 24 | seed_ = 11L * 13L * 17L * 19L * 23L + 1L; |
---|
| 25 | timeZone_ = 0.0; |
---|
| 26 | peakLoad_ = 0.0; // the resource load during peak hour |
---|
| 27 | offPeakLoad_ = 0.0; // the resource load during off-peak hr |
---|
| 28 | holidayLoad_ = 0.0; // the resource load during holiday |
---|
| 29 | |
---|
| 30 | // incorporates weekends so the grid resource is on 7 days a week |
---|
| 31 | Weekends_ = new LinkedList<Integer>(); |
---|
| 32 | Weekends_.add(java.util.Calendar.SATURDAY); |
---|
| 33 | Weekends_.add(java.util.Calendar.SUNDAY); |
---|
| 34 | |
---|
| 35 | // incorporates holidays. However, no holidays are set in this example |
---|
| 36 | Holidays_ = new LinkedList<Integer>(); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | public GSSIMResourceCalendar(double timeZone, double peakLoad, |
---|
| 41 | double offPeakLoad, double relativeHolidayLoad, |
---|
| 42 | LinkedList weekendList, LinkedList holidayList, long seed) { |
---|
| 43 | super(timeZone, peakLoad, offPeakLoad, relativeHolidayLoad, weekendList, |
---|
| 44 | holidayList, seed); |
---|
| 45 | // TODO Auto-generated constructor stub |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | public GSSIMResourceCalendar(){ |
---|
| 49 | super(timeZone_, peakLoad_, offPeakLoad_, |
---|
| 50 | holidayLoad_, Weekends_, Holidays_, seed_); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | @Override |
---|
| 54 | public void init(Properties properties) throws ModuleException { |
---|
| 55 | // TODO Auto-generated method stub |
---|
| 56 | |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | @Override |
---|
| 60 | public void dispose() throws ModuleException { |
---|
| 61 | // TODO Auto-generated method stub |
---|
| 62 | |
---|
| 63 | } |
---|
| 64 | |
---|
| 65 | @Override |
---|
| 66 | public ModuleType getType() { |
---|
| 67 | return ModuleType.RESOURCE_CALENDAR; |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | } |
---|