// Constructor public Plant(string name) { Name = name; Workcenters = new List <IAcceptWorkorders>(); _dock = new Dock(); Workcenters.Add(_dock); Workcenters.Add(new Stage()); Mes = (IMes) new Mes(name); _enterprise = null; foreach (IAcceptWorkorders wc in Workcenters) { wc.SetMes(Mes); Mes.Add(wc); wc.AddPlant(this); } PlantScheduler = (ISchedulePlants) new PlantScheduler(this); InternalTransportation = new List <ITransportWork>() { new Transportation(_dock, this), new Transportation(_dock, this) }; }
public void Add(IAcceptWorkorders workcenter) { Workcenters.Add(workcenter); Mes.Add(workcenter); workcenter.SetMes(Mes); workcenter.AddPlant(this); }