예제 #1
0
 public void WriteJobMix(TextOutput text)
 {
     text.WriteToText(this.ToString());
     text.WriteToText(this.jobManager.ToString());
     foreach (JobType jt in this.jobManager.JobMix.JobTypes)
     {
         text.WriteToText("   " + jt.ToString());
         foreach (JobRoute jr in jt.Alternates)
         {
             text.WriteToText("     " + jr.ToString());
             foreach (Operation op in jr.Operations)
             {
                 text.WriteToText("        " + op.ToString());
                 text.WriteToText("        " + op.Station.ToString());
                 if (op.Processor != null)
                 {
                     text.WriteToText("        " + op.Processor.ToString());
                 }
                 text.WriteToText("        " + op.OperationTime.ToString());
                 foreach (ComponentType ct in op.ComponentUsages.Keys)
                 {
                     text.WriteToText("          " + ct.ToString());
                     text.WriteToText("          " + op.ComponentUsages[ct].ToString());
                 }
             }
         }
     }
     text.CloseFile();
 }
예제 #2
0
 public void WriteLayout(TextOutput text)
 {
     text.WriteToText(layout.Parent.ToString());
     foreach (Station st in Layout.Stations)
     {
         text.WriteToText("   " + st.ToString());
         foreach (Processor p in st.Processors)
         {
             text.WriteToText("     " + p.ToString());
             foreach (Operation op in p.Operations)
             {
                 text.WriteToText("       " + op.ToString());
             }
         }
         text.WriteToText("     " + st.InQueue.ToString());
         foreach (Operation op in st.Operations)
         {
             text.WriteToText("     " + op.ToString());
             if (op.Processor != null)
             {
                 text.WriteToText("       " + op.Processor.ToString());
             }
             text.WriteToText("       " + op.OperationTime.ToString());
             foreach (ComponentType ct in op.ComponentUsages.Keys)
             {
                 text.WriteToText("        " + ct.ToString());
                 text.WriteToText("         " + op.ComponentUsages[ct].ToString());
             }
         }
         text.WriteToText("     " + st.BinMagazine.ToString());
         foreach (Bin b in st.BinMagazine.Content)
         {
             text.WriteToText("       " + b.ToString());
             //  text.WriteToText("         " + b.Location.ToString());
             text.WriteToText("         " + b.ComponentType.ToString());
             text.WriteToText("         " + b.ComponentType.AmountPerBin.ToString());
         }
     }
     //bins
     foreach (Bin b in this.Layout.Bins)
     {
         text.WriteToText("       " + b.ToString());
         // text.WriteToText("         " + b.Location.ToString());
         text.WriteToText("         " + b.ComponentType.ToString());
         text.WriteToText("         " + b.ComponentType.AmountPerBin.ToString());
     }
     //operations
     foreach (Operation op in this.Layout.Operations)
     {
         text.WriteToText("     " + op.ToString());
         if (op.Processor != null)
         {
             text.WriteToText("       " + op.Processor.ToString());
         }
         text.WriteToText("       " + op.OperationTime.ToString());
         foreach (ComponentType ct in op.ComponentUsages.Keys)
         {
             text.WriteToText("        " + ct.ToString());
             text.WriteToText("         " + op.ComponentUsages[ct].ToString());
         }
     }
     //nodes
     foreach (Node n in this.Layout.Nodes)
     {
         text.WriteToText("     " + n.ToString());
         text.WriteToText("       " + n.Location.X.ToString());
         text.WriteToText("       " + n.Location.Y.ToString());
         if (n.BinMagazine != null)
         {
             text.WriteToText("       " + n.BinMagazine.ToString());
         }
     }
     text.CloseFile();
 }