Free cookie consent management tool by TermsFeed Policy Generator

source: branches/SimulationCore/SimulationSolution/HeuristicLab.Simulation/ModelImpl.cs @ 13100

Last change on this file since 13100 was 10525, checked in by abeham, 11 years ago

#1610: added visual model

File size: 1.5 KB
RevLine 
[10525]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using HeuristicLab.Common;
5using HeuristicLab.SimulationCore;
6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
7
8namespace HeuristicLab.Simulation {
9    partial class Activity1 {
10        private void ProcessAction4(Model1 model, Action4 lastAction) {
11            EnqueueAction1(model.CurrentTime + 1, new Action1());
12        }
13    }
14
15    partial class Activity2 {
16        private void ProcessAction1(Model1 model, Action1 lastAction) {
17            if (model.CurrentTime < 10) EnqueueAction2(model.CurrentTime + 1, new Action2());
18            else EnqueueAction3(model.CurrentTime + 1, new Action3());
19        }
20    }
21
22    partial class Activity3 {
23        private void ProcessAction1(Model1 model, Action1 lastAction) {
24            EnqueueAction4(model.CurrentTime + 1, new Action4());
25        }
26
27        private void ProcessAction2(Model1 model, Action2 lastAction) {
28            EnqueueAction4(model.CurrentTime + 1, new Action4());
29        }
30    }
31
32    partial class Action1 {
33        public override void Execute(Model1 model) {
34
35        }
36    }
37
38    partial class Action2 {
39        public override void Execute(Model1 model) {
40
41        }
42    }
43
44    partial class Action3 {
45        public override void Execute(Model1 model) {
46
47        }
48    }
49
50    partial class Action4 {
51        public override void Execute(Model1 model) {
52
53        }
54    }
55}
Note: See TracBrowser for help on using the repository browser.