Esempio n. 1
0
        public Sink(ILuggageQueue queue)
        {
            Contract.Requires(queue != null, "queue cannot be null");

            this.LuggageCounter = 0;
            this.queue = queue;
        }
        public SortingForwarder(ILuggageQueue queue, List<IComponent> nextComponents)
        {
            Contract.Requires(queue != null, "queue cannot be null");
            Contract.Requires(nextComponents != null, "nextComponents cannot be null");

            this.LuggageCounter = 0;
            this.queue = queue;
            this.nextComponents = nextComponents;
        }
Esempio n. 3
0
 public Source(ILuggageQueue queue, List<Tuple<int, LuggageBag>> luggageAndDequeueDelta)
 {
     Contract.Requires(luggageAndDequeueDelta != null, "List of luggage may not be null");
     Contract.Requires(luggageAndDequeueDelta.Count > 0, "List of luggage may not be empty.");
     Contract.Requires(queue != null, "queue cannot be null");
     this.LuggageCounter = 0;
     this.queue = queue;
     this.luggageAndDequeueDelta = luggageAndDequeueDelta;
 }
Esempio n. 4
0
        public Forward(ILuggageQueue queue, IComponent nextComponent)
        {
            Contract.Requires(queue != null, "queue cannot be null");
            Contract.Requires(nextComponent != null, "nextComponent cannot be null");

            this.LuggageCounter = 0;
            this.queue = queue;
            this.nextComponent = nextComponent;
        }
Esempio n. 5
0
 public Truck(int dequeueDeltaMiliSeconds, List<IProblem> problems, int id)
 {
     this.queue = new FIFOQueue();
     this.name = "Trucky number: " + id.ToString();
     this.enqueueBehaviour = new Receive(this.queue, dequeueDeltaMiliSeconds);
     this.initialized = false;
     this.problems = problems;
     this.stuck = false;
 }
 public SortingMachine(int dequeueDeltaMiliSeconds, List<IProblem> problems, int id)
 {
     this.queue = new FIFOQueue();
     this.sinks = new List<IComponent>();
     this.name = "Sorting m. number: " + id.ToString();
     this.enqueueBehaviour = new Receive(this.queue, dequeueDeltaMiliSeconds);
     this.initialized = false;
     this.problems = problems;
     this.stuck = false;
     this.allSinks = null;
 }
 public ConveyorBeltSplitter(int dequeueDeltaMiliSeconds, List<IProblem> problems, int id)
 {
     this.sinks = new List<IComponent>();
     this.queue = new FIFOQueue();
     this.name = "Splitter number: " + id.ToString();
     this.enqueueBehaviour = new Receive(this.queue, dequeueDeltaMiliSeconds);
     this.initialized = false;
     this.initialized_thread = false;
     this.problems = problems;
     this.stuck = false;
     this.allSinks = null;
 }