public SimGroup(Wiazka wSymulowana) { _n = 0; _K = wSymulowana.sumaK; _V = wSymulowana.V; totRozklZaj = new double[_V + 1]; _maxVi = wSymulowana.maxVi; maxWolnePJP = new double[maxVi + 1]; maxWolnePJPrez = new double[maxVi + 1]; lPrzyjZglWstanieN = new int[_V + 1]; lUtrZglWstanieN = new int[_V + 1]; _q = (wSymulowana.AlgorytmRezerwacji == reservationAlgorithm.R3) ? _V : wSymulowana.q; sPodgr = new SimSubGroup[_K]; int lP = 0; foreach (Subgroup klPodgr in wSymulowana.ListaPodgrupLaczy) { int lokQ = (wSymulowana.AlgorytmRezerwacji == reservationAlgorithm.R3) ? klPodgr.v - wSymulowana.tMax : lokQ = klPodgr.v; for (int i = 0; i < klPodgr.k; i++) { sPodgr[lP++] = new SimSubGroup(klPodgr.v, lokQ, this); } } aRez = wSymulowana.AlgorytmRezerwacji; switch (wSymulowana.aWybPodgr) { case subgroupChooseAlgorithm.sequence: arbWybPodgr = new ChooseArbiterSequence(this); break; case subgroupChooseAlgorithm.RR: arbWybPodgr = new ChooseArbiterRR(this); break; case subgroupChooseAlgorithm.random: arbWybPodgr = new ChooseArbitrRandom(this); break; case subgroupChooseAlgorithm.randomCapacityProportional: arbWybPodgr = new ChooseArbiterRandomProportional(this); break; case subgroupChooseAlgorithm.randomOccupancyProportional: arbWybPodgr = new ChooseArbiterOccupancyProportional(this); break; default: arbWybPodgr = null; break; } }
public Wiazka(IBDwynsymulacji bazaDanych) { this.bazaDanych = bazaDanych; lSerii = 10; _AlgorytmRezerwacji = reservationAlgorithm.none; _aWybPodgr = subgroupChooseAlgorithm.random; _ListaPodgrupLaczy = new List <PodgrupaWiazek>(); _ListaKlasRuchu = new List <trClass>(); _ListaAlgorytmow = new List <Algorytm>(); // _ListaAlgorytmow.Add(new aSplotowyZalezny(this)); _ListaAlgorytmow.Add(new aHybrydowy(this)); _ListaAlgorytmow.Add(new aHybrydowyMISM(this, 0.001, 0)); _ListaAlgorytmow.Add(new aHybrydowyMISM(this, 0, 1)); _ListaAlgorytmow.Add(new aHybrydowyY(this)); _ListaAlgorytmow.Add(new aKaufmanRoberts(this)); _ListaAlgorytmow.Add(new aRobertsIteracyjny(this, 0.001, 0)); _ListaAlgorytmow.Add(new aRobertsIteracyjny(this, 0, 1)); _ListaAlgorytmow.Add(new aSigmaGen(this)); _ListaAlgorytmow.Add(new aSigmaGammaYm1(this)); _ListaAlgorytmow.Add(new aSigmaGammaYm2(this)); _ListaAlgorytmow.Add(new aGammaYc1(this)); _ListaAlgorytmow.Add(new aSigmaGammaYc2(this)); _ListaAlgorytmow.Add(new aSigma01(this)); _ListaAlgorytmow.Add(new aSigmaLambdaT(this)); _ListaAlgorytmow.Add(new aSigmaYt(this)); _ListaAlgorytmow.Add(new aMinR(this)); _ListaAlgorytmow.Add(new aSa3R(this)); _ListaAlgorytmow.Add(new aMaxR(this)); _ListaAlgorytmow.Add(new aRoberts(this)); _ListaAlgorytmow.Add(new aRobertsOgrDostSplotowy(this)); _ListaAlgorytmow.Add(new aRekBackForward(this, 0.001, 0)); _ListaAlgorytmow.Add(new gamma(this)); _ListaAlgorytmow.Add(new gammaV1(this)); _ListaAlgorytmow.Add(new gammaV2(this)); _ListaAlgorytmow.Add(new gammaV3(this)); _ListaAlgorytmow.Add(new aSimulationType1(this)); _ListaAlgorytmow.Add(new aSimulationType2(this)); _ListaAlgorytmow.Add(new aSimulationType3(this)); _ListaAlgorytmow.Add(new aSimulationType4(this)); _ListaAlgorytmow.Add(new aSimulationType5(this)); _ListaAlgorytmow.Add(new aSymulationTyp6(this)); }