Пример #1
0
 public PanelSlot(PanelSlot cloningParent,int categ)
     : this(cloningParent.internalEvaluators, categ, cloningParent.remainigVacancies)
 {
     for (int i = 0; i < cloningParent.externaEvaluators.Count; i++)
     {
         AddExternalEvaluator(cloningParent.externaEvaluators[i]);
         remainigVacancies++; //to make it neutral again
     }
 }
Пример #2
0
 private void BuildGeneration0(int category, List<PanelSlot> panelGeneration0)
 {
     for (int i = 0; i < panelMotiffs.Count; i++)
     {
         PanelSlot panel = new PanelSlot(panelMotiffs[i]);
         AddExternalEvaluatorToPanel(category, panel);
         panelGeneration0.Add(panel);
     }
 }
Пример #3
0
 private void AddExternalEvaluatorToPanel(int category, PanelSlot panel)
 {
     while(panel.RemainigVacancies>0)
     {
         String eval;
         do
         {
             eval = externalevaluatorVector[r.Next(0, externalevaluatorVector.Count)];
         } while (!tsmm.GetExternalEvaluaterPossibility(category, eval));
         externalevaluatorVector.Remove(eval);
         panel.AddExternalEvaluator(eval);
     }
 }
Пример #4
0
 public static int CompareSlotbySlotNumber(PanelSlot s1, PanelSlot s2)
 {
     if (s1.SlotNumber  < s2.SlotNumber )
         return -1;
     else if (s1.SlotNumber  == s2.SlotNumber)
         return 0;
     else
         return 1;
 }
Пример #5
0
 public PanelSlot(PanelSlot cloningParent)
     : this(cloningParent,cloningParent.category)
 {
 }
Пример #6
0
 private PanelSlot TransferExternalEvaluators(PanelSlot externalEvalDorner, PanelSlot externalEvalreceiver, int category)
 {
     PanelSlot resultantPanel = new PanelSlot(externalEvalreceiver, category);
     List<String> externallEvaluators = externalEvalDorner.ExternaEvaluators;
     for (int i = 0; i < externallEvaluators.Count; i++)
     {
         resultantPanel.AddExternalEvaluator(externallEvaluators[i]);
     }
     return (resultantPanel);
 }
Пример #7
0
 private List<PanelSlot> CreateSplitPanels(PanelSlot internalEvalDorner, PanelSlot externalEvalDorner,int category)
 {
     List<PanelSlot> newPanels = new List<PanelSlot>();
     PanelSlot seniorPanel = new PanelSlot(externalEvalDorner,category);
     PanelSlot juniorPanel = new PanelSlot(internalEvalDorner, category);
     String externalEvaluator = seniorPanel.RemoveExternalEvaluator(true);
     newPanels.Add(seniorPanel);
     String internalEvaluator = juniorPanel.RemoveInternalEvaluator();
     newPanels.Add(juniorPanel);
     PanelSlot splitPanel = new PanelSlot(category, 0);
     splitPanel.AddInternalEvaluator(internalEvaluator);
     splitPanel.AddExternalEvaluator(externalEvaluator);
     newPanels.Add(splitPanel);
     return (newPanels);
 }
Пример #8
0
 private void CreatePanelMotiff(string[] names, int categ, int remainigVac)
 {
     PanelSlot panelMotiff = new PanelSlot(categ,remainigVac);
     for (int i = 0; i < names.Length; i++)
     {
         panelMotiff.AddInternalEvaluator(names[i]);
     }
     panelMotiffs.Add(panelMotiff);
 }
Пример #9
0
        private void buildPanelSlots(List<PanelSlot> panelList, int categoryLength,Boolean firstGen)
        {
            for (int i = 0; i < panelList.Count; i++)
            {
                int limit = categoryLength;

                if (firstGen)
                {
                    limit -= 2;
                    if (i > 2)
                    {
                        limit++;
                    }
                }

                for (int j = 0; j < limit; j++)
                {
                    PanelSlot panelInstance = new PanelSlot(panelList[i]);
                    panelInstance.SlotNumber = j;
                    panelInstance.TemplateNumber = i;
                    panels.Add(panelInstance);
                }
            }
        }