Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

sdfsdf

  • Loading branch information...
commit 1559de99c229bf42919fa5f5be487fc902101d9e 2 parents 6539085 + 84a99d8
BergarSimonsen authored
4 AS.41/Part 1/Benchmark/BenchmarkSystem.cs
@@ -85,6 +85,7 @@ public void ExecuteAll()
85 85 {
86 86 while (true) {
87 87 Job job = Scheduler.PopJob();
  88 +
88 89 if (job != null)
89 90 {
90 91 job.State = Enum.Status.RUNNING;
@@ -102,6 +103,7 @@ public void ExecuteAll()
102 103 //}
103 104 JobRunning(job, EventArgs.Empty);
104 105 Thread thread = new Thread(()=>startJob(job));
  106 + thread.Start();
105 107
106 108 }
107 109 else break;
@@ -110,7 +112,9 @@ public void ExecuteAll()
110 112
111 113 private object startJob(Job job)
112 114 {
  115 +
113 116 job.Procces(null);
  117 +
114 118 JobTerminated(job, EventArgs.Empty);
115 119 //using (var dbContext = new BenchmarkDBEntities())
116 120 //{
28 AS.41/Part 1/Benchmark/Program.cs
@@ -9,35 +9,11 @@ namespace Benchmark
9 9 {
10 10 public class Program
11 11 {
12   - public static void TestMethod1()
13   - {
14   - BenchmarkSystem bs = new BenchmarkSystem();
15   - for (int i = 0; i < 21; i++)
16   - {
17   - Owner o = new Owner();
18   - o.Id = i;
19   - Job job = new Job(o, 3, 1, a => procces());
20   - bs.Submit(job);
21   - }
22   - Stopwatch sw = new Stopwatch();
23   - sw.Start();
24   -
25   - bs.ExecuteAll();
26   - Console.ReadLine();
27   -
28   - //Assert.IsTrue(sw.ElapsedMilliseconds < 9999);
29   -
30   - }
31   -
32   - private static string procces()
33   - {
34   - Thread.Sleep(1000);
35   - return "";
36   - }
  12 +
37 13
38 14 static void Main(string[] args)
39 15 {
40   - TestMethod1();
  16 +
41 17 //BenchmarkSystem bs = new BenchmarkSystem();
42 18
43 19 //foreach (OwnerSet owner in bs.SelectAllUsers()) {
139 AS.41/Part 1/Benchmark/Scheduler.cs
@@ -26,6 +26,8 @@ public class Scheduler
26 26 public static int CPUsRunning = 0;
27 27 // the main thread
28 28 private static Thread mainThread;
  29 + // object for locking the popJob method
  30 + private static object popJobLock = new Object();
29 31
30 32
31 33 static Scheduler()
@@ -51,7 +53,11 @@ static void BenchmarkSystem_JobTerminated(object sender, EventArgs e)
51 53 {
52 54 veryLongJobsRunning--;
53 55 }
54   - mainThread.Interrupt();
  56 +
  57 + lock (popJobLock)
  58 + {
  59 + Monitor.PulseAll(popJobLock);
  60 + }
55 61 }
56 62
57 63 static void BenchmarkSystem_JobRunning(object sender, EventArgs e)
@@ -147,69 +153,71 @@ public static void ReturnStatus()
147 153 /// <param name="job"></param>
148 154 public static Job PopJob()
149 155 {
150   - Job result;
151   - result = getEarliestJob();
152   -
153   -
154   - // if result is null, then either there are no jobs or none of the jobs
155   - // could be run at the time
156   - if (result == null)
  156 + lock (popJobLock)
157 157 {
158   - // if invalid job is empty then the method just returns null
159   - // otherwise it calls sleep to wait for other jobs to finish
160   - if (invalidJobs.Count == 0)
161   - {
162   - return null;
163   - }
164   - else
  158 + Job result;
  159 + result = getEarliestJob();
  160 +
  161 +
  162 + // if result is null, then either there are no jobs or none of the jobs
  163 + // could be run at the time
  164 + if (result == null)
165 165 {
166   - //clears the job list
167   - invalidJobs = new List<Job>();
168   - Thread.Sleep(0);
169   - result = PopJob();
  166 + // if invalid job is empty then the method just returns null
  167 + // otherwise it calls sleep to wait for other jobs to finish
  168 + if (invalidJobs.Count == 0)
  169 + {
  170 + return null;
  171 + }
  172 + else
  173 + {
  174 + //clears the job list
  175 + invalidJobs = new List<Job>();
  176 + Monitor.Wait(popJobLock);
  177 + result = PopJob();
  178 + }
170 179 }
171   - }
172   - // if to many jobs are running in the specific queue, the job
173   - // should be added to the ivalidJobs list.
174   - else if (isInvalidBecauseOfNumbersOfJobs(result))
175   - {
176   -
177   - invalidJobs.Add(result);
178   - result = PopJob();
179   - }
180   - //if the job is invalid because of too many cpu's running then
181   - // if the job has been canceled for more than too times the
182   - // thread should sleep and wait for more cpu's to get available
183   - // otherwise the job should just be added to the invalidJobs queue.
184   - else if (isInvalidBecauseOfNumbersOfCPU(result))
185   - {
186   - if (result.CPUCancelation <= 2)
  180 + // if to many jobs are running in the specific queue, the job
  181 + // should be added to the ivalidJobs list.
  182 + else if (isInvalidBecauseOfNumbersOfJobs(result))
187 183 {
188   - result.CPUCancelation++;
189 184 invalidJobs.Add(result);
190 185 result = PopJob();
191 186 }
192   - else
  187 + //if the job is invalid because of too many cpu's running then
  188 + // if the job has been canceled for more than too times the
  189 + // thread should sleep and wait for more cpu's to get available
  190 + // otherwise the job should just be added to the invalidJobs queue.
  191 + else if (isInvalidBecauseOfNumbersOfCPU(result))
193 192 {
194   - //this job should be returned no matter what it is just
195   - // a matter of time before enough CPU's are ready
196   - while (true)
  193 + if (result.CPUCancelation <= 2)
197 194 {
198   - Thread.Sleep(0);
199   - if(!isInvalidBecauseOfNumbersOfCPU(result))
  195 + result.CPUCancelation++;
  196 + invalidJobs.Add(result);
  197 + result = PopJob();
  198 + }
  199 + else
  200 + {
  201 + //this job should be returned no matter what it is just
  202 + // a matter of time before enough CPU's are ready
  203 + while (true)
200 204 {
201   - break;
  205 + Monitor.Wait(popJobLock);
  206 + if (!isInvalidBecauseOfNumbersOfCPU(result))
  207 + {
  208 + break;
  209 + }
202 210 }
203 211 }
204 212 }
205   - }
206   -
207   - //if the job passes the constraints it should be returned
208   - // and the ivalidJobs queue should be cleared
209   - invalidJobs = new List<Job>();
210   - RemoveJob(result);
211   - return result;
212 213
  214 + //if the job passes the constraints it should be returned
  215 + // and the ivalidJobs queue should be cleared
  216 + invalidJobs = new List<Job>();
  217 + RemoveJob(result);
  218 + return result;
  219 +
  220 + }
213 221 }
214 222
215 223 /// <summary>
@@ -264,17 +272,17 @@ private static Job getEarliestJob()
264 272 // Check to make sure the queue isn't empty.
265 273 if (!IsQueueEmpty(shortQueue))
266 274 {
267   - job1 = shortQueue[0];
  275 + job1 = findEarliestJobNotDisabled(shortQueue);
268 276 }
269 277
270 278 if (!IsQueueEmpty(longQueue))
271 279 {
272   - job2 = longQueue[0];
  280 + job2 = findEarliestJobNotDisabled(longQueue);
273 281 }
274 282
275 283 if (!IsQueueEmpty(veryLongQueue))
276 284 {
277   - job3 = veryLongQueue[0];
  285 + job3 = findEarliestJobNotDisabled(veryLongQueue);
278 286 }
279 287
280 288 if (job1.InsertionNumber.CompareTo(job2.InsertionNumber) < 0)
@@ -305,7 +313,30 @@ private static Job getEarliestJob()
305 313
306 314 }
307 315
308   -
  316 + private static Job findEarliestJobNotDisabled(List<Job> queue)
  317 + {
  318 + bool isInvalid;
  319 + for (int i = 0; i < queue.Count; i++)
  320 + {
  321 + Job curJob = queue[i];
  322 + isInvalid = false;
  323 + for (int j = 0; j < invalidJobs.Count; j++)
  324 + {
  325 + if (curJob == invalidJobs[j])
  326 + {
  327 + isInvalid = true;
  328 + }
  329 + }
  330 + //if job isn't invalid it should be returned
  331 + if (!isInvalid) return curJob;
  332 + }
  333 + //if there are no invalid jobs, a default job is returned
  334 + Job defaultJob = new Job();
  335 + defaultJob.InsertionNumber = int.MaxValue;
  336 + return defaultJob;
  337 + }
  338 +
  339 +
309 340
310 341 /// <summary>
311 342 /// Checks if a queue is empty.
128 AS.41/Part 1/BenchmarkTest/UnitScheduler.cs
@@ -9,6 +9,12 @@ namespace BenchmarkTest
9 9 [TestClass]
10 10 public class UnitScheduler
11 11 {
  12 + private int jobTerminatedCounter = 0;
  13 + private Job job6;
  14 + /// <summary>
  15 + /// This method test if it is possible to submit 20 jobs and
  16 + /// execute them.
  17 + /// </summary>
12 18 [TestMethod]
13 19 public void TestMethod1()
14 20 {
@@ -17,17 +23,135 @@ public void TestMethod1()
17 23 {
18 24 Owner o = new Owner();
19 25 o.Id = i;
20   - Job job = new Job(o,3,1,a=>procces());
  26 + Job job = new Job(o,1,1,a=>procces1Second());
21 27 bs.Submit(job);
22 28 }
23 29 Stopwatch sw = new Stopwatch();
24 30 sw.Start();
25 31 bs.ExecuteAll();
  32 + //This should happen in less than a second because no jobs need
  33 + // to wait for other jobs to finish
26 34 Assert.IsTrue(sw.ElapsedMilliseconds < 9999);
27 35
28 36 }
29 37
30   - private string procces()
  38 + /// <summary>
  39 + /// THis method test if it is possible to submit 21 jobs of same lenght
  40 + /// and execute them.
  41 + /// </summary>
  42 + [TestMethod]
  43 + public void TestMethod2()
  44 + {
  45 + BenchmarkSystem bs = new BenchmarkSystem();
  46 + for (int i = 0; i < 21; i++)
  47 + {
  48 + Owner o = new Owner();
  49 + o.Id = i;
  50 + Job job = new Job(o, 1, 1, a => procces1Second());
  51 + bs.Submit(job);
  52 + }
  53 + Stopwatch sw = new Stopwatch();
  54 + sw.Start();
  55 + bs.ExecuteAll();
  56 + //This should take more than a second because job number
  57 + // 21 needs to wait for one of the other jobs to complete
  58 + Assert.IsTrue(sw.ElapsedMilliseconds > 999);
  59 +
  60 + }
  61 +
  62 + /// <summary>
  63 + /// This method tests if the CPU constraint i working properly
  64 + /// </summary>
  65 + [TestMethod]
  66 + public void TestMethod3()
  67 + {
  68 + BenchmarkSystem bs = new BenchmarkSystem();
  69 + for (int i = 0; i < 4; i++)
  70 + {
  71 + Owner o = new Owner();
  72 + o.Id = i;
  73 + Job job = new Job(o, 10, 1, a => procces1Second());
  74 + bs.Submit(job);
  75 + }
  76 + Stopwatch sw = new Stopwatch();
  77 + sw.Start();
  78 + bs.ExecuteAll();
  79 + //This should take more than a second because job number
  80 + // 4 needs to wait for one of the other jobs to complete
  81 + // so that not more than 30 cpus are running
  82 + Assert.IsTrue(sw.ElapsedMilliseconds > 999);
  83 +
  84 + }
  85 +
  86 + /// <summary>
  87 + /// This method tests if the CPU constraint i working properly and
  88 + /// in particular that a given job only can be set on hold 2 times
  89 + /// </summary>
  90 + [TestMethod]
  91 + public void TestMethod4()
  92 + {
  93 + BenchmarkSystem bs = new BenchmarkSystem();
  94 +
  95 + Owner o = new Owner();
  96 + o.Id = 1;
  97 + Job job = new Job(o, 10, 10, a => procces10Seconds());
  98 + bs.Submit(job);
  99 +
  100 + Owner o2 = new Owner();
  101 + o2.Id = 2;
  102 + Job job2 = new Job(o2, 10, 10, a => procces10Seconds());
  103 + bs.Submit(job2);
  104 +
  105 + Owner o3 = new Owner();
  106 + o3.Id = 3;
  107 + Job job3 = new Job(o3, 1, 1, a => procces1Second());
  108 + bs.Submit(job3);
  109 +
  110 + Owner o4 = new Owner();
  111 + o4.Id = 4;
  112 + Job job4 = new Job(o4, 10, 10, a => procces10Seconds());
  113 + bs.Submit(job4);
  114 +
  115 + Owner o5 = new Owner();
  116 + o5.Id = 5;
  117 + Job job5 = new Job(o5, 1, 1, a => procces1Second());
  118 + bs.Submit(job5);
  119 +
  120 + Owner o6 = new Owner();
  121 + o6.Id = 6;
  122 + job6 = new Job(o6, 1, 1, a => procces1Second());
  123 + bs.Submit(job6);
  124 +
  125 + Owner o7 = new Owner();
  126 + o7.Id = 7;
  127 + Job job7 = new Job(o7, 1, 1, a => procces1Second());
  128 + bs.Submit(job7);
  129 +
  130 + BenchmarkSystem.JobRunning += BenchmarkSystem_JobRunning;
  131 + bs.ExecuteAll();
  132 + }
  133 +
  134 + private void BenchmarkSystem_JobRunning(object sender, EventArgs e)
  135 + {
  136 + Job job = (Job)sender;
  137 + jobTerminatedCounter++;
  138 + if (jobTerminatedCounter == 6)
  139 + {
  140 + Assert.AreEqual(job, job6);
  141 + }
  142 + else
  143 + {
  144 + Assert.Fail();
  145 + }
  146 + }
  147 +
  148 + private string procces1Second()
  149 + {
  150 + Thread.Sleep(1000);
  151 + return "";
  152 + }
  153 +
  154 + private string procces10Seconds()
31 155 {
32 156 Thread.Sleep(1000);
33 157 return "";
38 Report/CommunicationDiagram_NewEvent.graffle
@@ -14,7 +14,7 @@
14 14 <key>BackgroundGraphic</key>
15 15 <dict>
16 16 <key>Bounds</key>
17   - <string>{{0, 0}, {783, 558.99997711181641}}</string>
  17 + <string>{{0, 0}, {783, 559}}</string>
18 18 <key>Class</key>
19 19 <string>SolidGraphic</string>
20 20 <key>ID</key>
@@ -46,7 +46,7 @@
46 46 <key>Creator</key>
47 47 <string>Bergar Simonsen</string>
48 48 <key>DisplayScale</key>
49   - <string>1 0/72 in = 1 0/72 in</string>
  49 + <string>1 0/72 in = 1.0000 in</string>
50 50 <key>GraphDocumentVersion</key>
51 51 <integer>8</integer>
52 52 <key>GraphicsList</key>
@@ -76,7 +76,7 @@
76 76 </dict>
77 77 <dict>
78 78 <key>Bounds</key>
79   - <string>{{258.25, 299}, {75, 14}}</string>
  79 + <string>{{249.25, 299}, {93, 14}}</string>
80 80 <key>Class</key>
81 81 <string>ShapedGraphic</string>
82 82 <key>FitText</key>
@@ -110,12 +110,12 @@
110 110 <key>Pad</key>
111 111 <integer>0</integer>
112 112 <key>Text</key>
113   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  113 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
114 114 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
115 115 {\colortbl;\red255\green255\blue255;}
116 116 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
117 117
118   -\f0\fs24 \cf0 2: newEvent()}</string>
  118 +\f0\fs24 \cf0 2: newCalendar()}</string>
119 119 <key>VerticalPad</key>
120 120 <integer>0</integer>
121 121 </dict>
@@ -158,7 +158,7 @@
158 158 <key>Pad</key>
159 159 <integer>0</integer>
160 160 <key>Text</key>
161   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  161 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
162 162 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
163 163 {\colortbl;\red255\green255\blue255;}
164 164 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
@@ -229,7 +229,7 @@
229 229 <key>Pad</key>
230 230 <integer>0</integer>
231 231 <key>Text</key>
232   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  232 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
233 233 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
234 234 {\colortbl;\red255\green255\blue255;}
235 235 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
@@ -349,7 +349,7 @@
349 349 </dict>
350 350 <dict>
351 351 <key>Bounds</key>
352   - <string>{{478.75, 334}, {99, 14}}</string>
  352 + <string>{{495.75, 334}, {65, 14}}</string>
353 353 <key>Class</key>
354 354 <string>ShapedGraphic</string>
355 355 <key>FitText</key>
@@ -383,12 +383,12 @@
383 383 <key>Pad</key>
384 384 <integer>0</integer>
385 385 <key>Text</key>
386   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  386 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
387 387 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
388 388 {\colortbl;\red255\green255\blue255;}
389 389 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
390 390
391   -\f0\fs24 \cf0 2.2: store(Event e)}</string>
  391 +\f0\fs24 \cf0 2.2: Event e}</string>
392 392 <key>VerticalPad</key>
393 393 <integer>0</integer>
394 394 </dict>
@@ -397,7 +397,7 @@
397 397 </dict>
398 398 <dict>
399 399 <key>Bounds</key>
400   - <string>{{495.75, 299}, {65, 14}}</string>
  400 + <string>{{485.75, 299}, {85, 14}}</string>
401 401 <key>Class</key>
402 402 <string>ShapedGraphic</string>
403 403 <key>FitText</key>
@@ -431,12 +431,12 @@
431 431 <key>Pad</key>
432 432 <integer>0</integer>
433 433 <key>Text</key>
434   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  434 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
435 435 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
436 436 {\colortbl;\red255\green255\blue255;}
437 437 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
438 438
439   -\f0\fs24 \cf0 2.1: create()}</string>
  439 +\f0\fs24 \cf0 2.1: newEvent()}</string>
440 440 <key>VerticalPad</key>
441 441 <integer>0</integer>
442 442 </dict>
@@ -538,7 +538,7 @@
538 538 <key>Text</key>
539 539 <dict>
540 540 <key>Text</key>
541   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  541 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
542 542 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
543 543 {\colortbl;\red255\green255\blue255;}
544 544 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
@@ -569,7 +569,7 @@
569 569 <key>Text</key>
570 570 <dict>
571 571 <key>Text</key>
572   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  572 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
573 573 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
574 574 {\colortbl;\red255\green255\blue255;}
575 575 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
@@ -600,7 +600,7 @@
600 600 <key>Text</key>
601 601 <dict>
602 602 <key>Text</key>
603   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  603 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
604 604 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
605 605 {\colortbl;\red255\green255\blue255;}
606 606 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
@@ -631,7 +631,7 @@
631 631 <key>Text</key>
632 632 <dict>
633 633 <key>Text</key>
634   - <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
  634 + <string>{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
635 635 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
636 636 {\colortbl;\red255\green255\blue255;}
637 637 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
@@ -689,7 +689,7 @@
689 689 <key>MasterSheets</key>
690 690 <array/>
691 691 <key>ModificationDate</key>
692   - <string>2012-10-02 12:19:06 +0000</string>
  692 + <string>2012-10-22 19:15:25 +0000</string>
693 693 <key>Modifier</key>
694 694 <string>Bergar Simonsen</string>
695 695 <key>NotesVisible</key>
@@ -720,7 +720,7 @@
720 720 <key>NSPaperSize</key>
721 721 <array>
722 722 <string>size</string>
723   - <string>{594.99997711181641, 842}</string>
  723 + <string>{595, 842}</string>
724 724 </array>
725 725 <key>NSPrintReverseOrientation</key>
726 726 <array>
BIN  Report/CommunicationDiagram_NewEvent.jpg
79 Report/InteractionDiagram.graphml
@@ -15,7 +15,6 @@
15 15 <graph edgedefault="directed" id="G">
16 16 <data key="d7"/>
17 17 <node id="n0">
18   - <data key="d5"/>
19 18 <data key="d6">
20 19 <y:GenericNode configuration="com.yworks.flowchart.process">
21 20 <y:Geometry height="21.0" width="22.0" x="644.0" y="161.5"/>
@@ -219,23 +218,6 @@
219 218 <node id="n12">
220 219 <data key="d6">
221 220 <y:GenericNode configuration="com.yworks.flowchart.process">
222   - <y:Geometry height="21.0" width="34.0" x="420.0" y="161.5"/>
223   - <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
224   - <y:BorderStyle color="#000000" type="line" width="1.0"/>
225   - <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" textColor="#000000" visible="true" width="4.0" x="15.0" y="8.5">
226   - <y:LabelModel>
227   - <y:SmartNodeLabelModel distance="4.0"/>
228   - </y:LabelModel>
229   - <y:ModelParameter>
230   - <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
231   - </y:ModelParameter>
232   - </y:NodeLabel>
233   - </y:GenericNode>
234   - </data>
235   - </node>
236   - <node id="n13">
237   - <data key="d6">
238   - <y:GenericNode configuration="com.yworks.flowchart.process">
239 221 <y:Geometry height="21.0" width="22.0" x="117.0" y="256.0"/>
240 222 <y:Fill hasColor="false" transparent="false"/>
241 223 <y:BorderStyle hasColor="false" type="line" width="1.0"/>
@@ -250,7 +232,7 @@
250 232 </y:GenericNode>
251 233 </data>
252 234 </node>
253   - <node id="n14">
  235 + <node id="n13">
254 236 <data key="d6">
255 237 <y:GenericNode configuration="com.yworks.flowchart.process">
256 238 <y:Geometry height="21.0" width="22.0" x="117.0" y="161.5"/>
@@ -267,24 +249,7 @@
267 249 </y:GenericNode>
268 250 </data>
269 251 </node>
270   - <node id="n15">
271   - <data key="d6">
272   - <y:GenericNode configuration="com.yworks.flowchart.process">
273   - <y:Geometry height="21.0" width="34.0" x="420.0" y="175.0"/>
274   - <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
275   - <y:BorderStyle color="#000000" type="line" width="1.0"/>
276   - <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" textColor="#000000" visible="true" width="4.0" x="15.0" y="8.5">
277   - <y:LabelModel>
278   - <y:SmartNodeLabelModel distance="4.0"/>
279   - </y:LabelModel>
280   - <y:ModelParameter>
281   - <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
282   - </y:ModelParameter>
283   - </y:NodeLabel>
284   - </y:GenericNode>
285   - </data>
286   - </node>
287   - <node id="n16">
  252 + <node id="n14">
288 253 <data key="d6">
289 254 <y:GenericNode configuration="com.yworks.flowchart.process">
290 255 <y:Geometry height="21.0" width="34.0" x="420.0" y="256.0"/>
@@ -301,13 +266,13 @@
301 266 </y:GenericNode>
302 267 </data>
303 268 </node>
304   - <node id="n17">
  269 + <node id="n15">
305 270 <data key="d6">
306 271 <y:GenericNode configuration="com.yworks.flowchart.process">
307   - <y:Geometry height="148.0" width="34.0" x="420.0" y="144.0"/>
  272 + <y:Geometry height="89.0" width="34.0" x="420.0" y="203.0"/>
308 273 <y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
309 274 <y:BorderStyle color="#000000" type="line" width="1.0"/>
310   - <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" textColor="#000000" visible="true" width="4.0" x="15.0" y="72.0">
  275 + <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" textColor="#000000" visible="true" width="4.0" x="15.0" y="42.5">
311 276 <y:LabelModel>
312 277 <y:SmartNodeLabelModel distance="4.0"/>
313 278 </y:LabelModel>
@@ -318,7 +283,7 @@
318 283 </y:GenericNode>
319 284 </data>
320 285 </node>
321   - <node id="n18">
  286 + <node id="n16">
322 287 <data key="d6">
323 288 <y:GenericNode configuration="com.yworks.flowchart.process">
324 289 <y:Geometry height="21.0" width="22.0" x="443.0" y="238.0"/>
@@ -365,13 +330,13 @@
365 330 </y:PolyLineEdge>
366 331 </data>
367 332 </edge>
368   - <edge id="e2" source="n3" target="n17">
  333 + <edge id="e2" source="n3" target="n15">
369 334 <data key="d10">
370 335 <y:PolyLineEdge>
371 336 <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
372 337 <y:LineStyle color="#000000" type="dashed" width="1.0"/>
373 338 <y:Arrows source="none" target="none"/>
374   - <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-32.0" y="29.46826171875">
  339 + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-32.0" y="58.9727783203125">
375 340 <y:LabelModel>
376 341 <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
377 342 </y:LabelModel>
@@ -419,13 +384,13 @@
419 384 </y:PolyLineEdge>
420 385 </data>
421 386 </edge>
422   - <edge id="e5" source="n17" target="n8">
  387 + <edge id="e5" source="n15" target="n8">
423 388 <data key="d10">
424 389 <y:PolyLineEdge>
425 390 <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
426 391 <y:LineStyle color="#000000" type="dashed" width="1.0"/>
427 392 <y:Arrows source="none" target="none"/>
428   - <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-32.0" y="37.013916015625">
  393 + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-32.0" y="37.0076904296875">
429 394 <y:LabelModel>
430 395 <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
431 396 </y:LabelModel>
@@ -455,7 +420,7 @@
455 420 </y:PolyLineEdge>
456 421 </data>
457 422 </edge>
458   - <edge id="e7" source="n14" target="n0">
  423 + <edge id="e7" source="n13" target="n0">
459 424 <data key="d10">
460 425 <y:PolyLineEdge>
461 426 <y:Path sx="0.0" sy="0.0" tx="-11.033203125" ty="0.0"/>
@@ -480,16 +445,16 @@
480 445 </y:PolyLineEdge>
481 446 </data>
482 447 </edge>
483   - <edge id="e8" source="n17" target="n18">
  448 + <edge id="e8" source="n15" target="n16">
484 449 <data key="d10">
485 450 <y:PolyLineEdge>
486   - <y:Path sx="0.0" sy="-14.0" tx="0.0" ty="0.0">
487   - <y:Point x="507.0" y="203.0"/>
  451 + <y:Path sx="-2.5" sy="-17.5" tx="0.0" ty="0.0">
  452 + <y:Point x="507.0" y="230.0"/>
488 453 <y:Point x="507.0" y="248.5"/>
489 454 </y:Path>
490 455 <y:LineStyle color="#000000" type="line" width="1.0"/>
491 456 <y:Arrows source="none" target="standard"/>
492   - <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="27.964905253380152" y="28.975879251952904">
  457 + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="27.724953717146605" y="29.372380869610197">
493 458 <y:LabelModel>
494 459 <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
495 460 </y:LabelModel>
@@ -497,7 +462,7 @@
497 462 <y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="29.37238086961017" distanceToCenter="false" position="right" ratio="0.4941428032939482" segment="0"/>
498 463 </y:ModelParameter>
499 464 </y:EdgeLabel>
500   - <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="78.68359375" x="54.24010762195951" y="13.15114668788192">createEvent()<y:LabelModel>
  465 + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="66.51953125" x="60.30382832508451" y="0.2750273191800261">newEvent()<y:LabelModel>
501 466 <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
502 467 </y:LabelModel>
503 468 <y:ModelParameter>
@@ -508,7 +473,7 @@
508 473 </y:PolyLineEdge>
509 474 </data>
510 475 </edge>
511   - <edge id="e9" source="n16" target="n11">
  476 + <edge id="e9" source="n14" target="n11">
512 477 <data key="d10">
513 478 <y:PolyLineEdge>
514 479 <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
@@ -526,14 +491,13 @@
526 491 </y:PolyLineEdge>
527 492 </data>
528 493 </edge>
529   - <edge id="e10" source="n5" target="n17">
530   - <data key="d9"/>
  494 + <edge id="e10" source="n5" target="n15">
531 495 <data key="d10">
532 496 <y:PolyLineEdge>
533   - <y:Path sx="16.9765625" sy="-27.0" tx="-3.0" ty="-14.0"/>
  497 + <y:Path sx="16.9765625" sy="-27.0" tx="-4.5" ty="-43.5"/>
534 498 <y:LineStyle color="#000000" type="line" width="1.0"/>
535 499 <y:Arrows source="none" target="standard"/>
536   - <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="138.4874267578125" y="28.0">
  500 + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="138.48760986328125" y="28.0">
537 501 <y:LabelModel>
538 502 <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
539 503 </y:LabelModel>
@@ -541,7 +505,7 @@
541 505 <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
542 506 </y:ModelParameter>
543 507 </y:EdgeLabel>
544   - <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="66.51953125" x="101.2276611328125" y="-16.06640625">newEvent()<y:LabelModel>
  508 + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="86.8046875" x="91.68048646974864" y="-16.06640625">newCalendar()<y:LabelModel>
545 509 <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
546 510 </y:LabelModel>
547 511 <y:ModelParameter>
@@ -553,7 +517,6 @@
553 517 </data>
554 518 </edge>
555 519 <edge id="e11" source="n5" target="n6">
556   - <data key="d9"/>
557 520 <data key="d10">
558 521 <y:PolyLineEdge>
559 522 <y:Path sx="0.0" sy="76.0" tx="-17.0234375" ty="76.0"/>
BIN  Report/InteractionDiagram_CreateEvent.jpg
BIN  Report/InteractionDiagram_CreateEvent_OLD.jpg
11 Report/Report.log
... ... @@ -1,4 +1,4 @@
1   -This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2012.4.24) 2 OCT 2012 14:49
  1 +This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2012.4.24) 22 OCT 2012 21:19
2 2 entering extended mode
3 3 restricted \write18 enabled.
4 4 %&-line parsing enabled.
@@ -271,7 +271,12 @@ Underfull \hbox (badness 10000) in paragraph at lines 237--238
271 271 []
272 272
273 273
274   -Underfull \hbox (badness 10000) in paragraph at lines 239--241
  274 +Underfull \hbox (badness 10000) in paragraph at lines 239--240
  275 +
  276 + []
  277 +
  278 +
  279 +Underfull \hbox (badness 10000) in paragraph at lines 241--242
275 280
276 281 []
277 282
@@ -289,7 +294,7 @@ mf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/texlive/2011/texm
289 294 f-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2011/texmf
290 295 -dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2011/texmf-d
291 296 ist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
292   -Output written on Report.pdf (14 pages, 265869 bytes).
  297 +Output written on Report.pdf (14 pages, 266264 bytes).
293 298 PDF statistics:
294 299 73 PDF objects out of 1000 (max. 8388607)
295 300 45 compressed objects within 1 object stream
BIN  Report/Report.pdf
Binary file not shown
BIN  Report/Report.synctex.gz
Binary file not shown
9 Report/Report.tex
@@ -224,10 +224,10 @@
224 224 \includegraphics[width=300px]{UMLPackageDiagram.jpg}
225 225
226 226 \section{Interaction Diagram}
227   - \textbf{Create event - Sequence diagram:} \\
  227 + \textbf{New Calendar \& New event - Sequence diagram:} \\
228 228 \includegraphics[width=300px]{InteractionDiagram_CreateEvent.jpg} \\
229 229
230   - \textbf{Crete event - Communication diagram:} \\
  230 + \textbf{New Calendar \& New Event - Communication diagram:} \\
231 231 \includegraphics[width=300px]{CommunicationDiagram_NewEvent.jpg}
232 232
233 233 \section{Design class diagram}
@@ -236,8 +236,9 @@
236 236 \section{Software attributes / qualities}
237 237 We are using a layered architecture for our system which comes with some advantages and some disadvantages \\
238 238
239   - \textbf{Performance:} The layered architecture sacrifices a bit of performance because a method call has to go through multiple layers. \\
240   - We don't believe this will be an issue in our system because our system doesn't rely that much on performance. Those extra 5ms the system uses to go through the layers won't have any affect on the system. \\
  239 + \textbf{Performance:} When designing large scale software with larger/higher number of layers, the layered architecture might sacrifice some of the performance because a method call must go through multiple layers. \\
  240 +
  241 + However, in our application this won't be an issue because the software isn't that big and we only have a few layers. \\
241 242
242 243 \textbf{Maintenance:} The layered architecture gives the system a great advantage when it comes to maintainability and extensions. For example if we want to extend the system with a web interface or perhaps a mobile client, it is easily dealt with by the layered architecture.
243 244

0 comments on commit 1559de9

Please sign in to comment.
Something went wrong with that request. Please try again.