예제 #1
0
파일: Cell.cpp 프로젝트: Chabrier/packages
 Cell(const devs::DynamicsInit& model,
      const devs::InitEventList& events) :
     extension::CellDevs(model, events)
 {
     if (events.exist("seed")) {
         mRand.seed(events.getInt("seed"));
     }
 }
예제 #2
0
        PetrinetMeteo(const devs::DynamicsInit& model,
              const devs::InitEventList& events) :
            devs::Dynamics(model, events)
        {
            mInit = value::toBoolean(events.get("init"));
            mMin = value::toInteger(events.get("min"));
            mMax = value::toInteger(events.get("max"));

            if (events.exist("seed")) {
                mRand.seed(events.getInt("seed"));
            } else {
                mRand.seed(1);
            }
        }