Ejemplo n.º 1
0
 public void Initialize(NetParams netParams)
 {
     // first generators
     m_genMgr = new GeneratorsMgr(netParams.netSize, netParams.modelTime, netParams.scenario);
     // second net
     m_net = new PetriNet();
     m_net.Initialize(netParams);
     m_net.LoadStartInfo(m_genMgr.MakeStartData());
 }
Ejemplo n.º 2
0
        public bool AddPC(string name, NetParams netParams)
        {
            if (m_pcStorage.ContainsKey(name))
            {
                return(false);
            }
            Computer newPc = new Computer(name, netParams);

            SetFlushToPC(newPc);
            m_pcStorage.Add(name, newPc);
            return(true);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// C-tor with comp name
        /// </summary>
        /// <param name="name"></param>
        public Computer(string name, NetParams netParams)
        {
            m_name         = name;
            m_warningCoast = netParams.wCoast;
            m_alertCoast   = netParams.aCoast;

            m_warningAnalyzer.AddPlaceIn(m_input, m_warningCoast);
            m_warningAnalyzer.AddPlaceOut(m_warning);
            m_alertAnalyzer.AddPlaceIn(m_warning, m_alertCoast);
            m_alertAnalyzer.AddPlaceOut(m_alert);
            m_localFlushAnalyzer.AddPlaceIn(m_warning, 1);
            m_localFlushAnalyzer.AddPlaceOut(m_localFlush);
        }
Ejemplo n.º 4
0
 public void Initialize(NetParams netParams)
 {
     m_netParams = netParams;
 }