Initial commit

This commit is contained in:
Yentl Van Tendeloo 2016-08-04 17:38:43 +02:00
commit 66a6860316
407 changed files with 1254365 additions and 0 deletions

View file

@ -0,0 +1,21 @@
import sys
sys.path.append("../../src/")
from DEVS import *
class Generator(AtomicDEVS):
def __init__(self, num, ta):
AtomicDEVS.__init__(self, "Generator" + str(num))
self.state = None
self.ta = ta
def timeAdvance(self):
return self.ta
class StaticModel(CoupledDEVS):
def __init__(self, size, actives):
CoupledDEVS.__init__(self, "Root")
ta_counter = 0
for i in range(size):
self.addSubModel(Generator(i, 1.0 if ta_counter < actives else float('inf')))
ta_counter += 1