Commit 07569fd7 authored by Sebastien Robin's avatar Sebastien Robin

Unused SimPy imports removed

parent cb1fc027
......@@ -26,7 +26,8 @@ Models an assembly object
it gathers frames and parts which are loaded to the frames
'''
from SimPy.Simulation import *
from SimPy.Simulation import Process, Resource
from SimPy.Simulation import waituntil, now, hold
import xlwt
from RandomNumberGenerator import RandomNumberGenerator
import scipy.stats as stat
......
......@@ -26,7 +26,8 @@ Models a conveyer object
it gathers entities and transfers them with a certain speed
'''
from SimPy.Simulation import *
from SimPy.Simulation import Process, Resource
from SimPy.Simulation import waituntil, now, hold, infinity, activate
import xlwt
import scipy.stats as stat
from CoreObject import CoreObject
......
......@@ -26,7 +26,8 @@ Models a dicmantle object
it gathers frames that have parts loaded, unloads the parts and sends the frame to one destination and the parts to another
'''
from SimPy.Simulation import *
from SimPy.Simulation import Process, Resource
from SimPy.Simulation import waituntil, now, hold, infinity
import xlwt
from RandomNumberGenerator import RandomNumberGenerator
import scipy.stats as stat
......@@ -93,7 +94,7 @@ class Dismantle(CoreObject):
self.nameLastFrameWasFull="" #holds the name of the last frame that was full, ie that assembly process started
self.nameLastEntityEntered="" #holds the name of the last frame that entered processing in the object
self.nameLastEntityEnded="" #holds the name of the last frame that ended processing in the object
self.Res=Resource(capacity=Infinity)
self.Res=Resource(capacity=infinity)
self.Res.activeQ=[]
self.Res.waitQ=[]
......
......@@ -25,7 +25,7 @@ Created on 6 Feb 2013
models the exit of the model
'''
from SimPy.Simulation import *
from SimPy.Simulation import now, Process, Resource, infinity, waituntil
import xlwt
import scipy.stats as stat
from CoreObject import CoreObject
......
......@@ -26,7 +26,7 @@ Created on 9 Nov 2012
models the failures that servers can have
'''
from SimPy.Simulation import *
from SimPy.Simulation import now, Process, hold, request, reactivate, release
import math
from RandomNumberGenerator import RandomNumberGenerator
from ObjectInterruption import ObjectInterruption
......
......@@ -26,7 +26,7 @@ Created on 18 Feb 2013
models a frame entity. This can flow through the system and carry parts
'''
from SimPy.Simulation import *
from SimPy.Simulation import Resource
from Globals import G
from Entity import Entity
......
......@@ -25,7 +25,7 @@ Created on 8 Nov 2012
carries some global variables
'''
from SimPy.Simulation import *
#from SimPy.Simulation import *
from Machine import Machine
from Queue import Queue
from Repairman import Repairman
......
......@@ -52,7 +52,7 @@
},
"successorList": ["E1"]
},
{"_class": "Dream.QueueLIFO",
{"_class": "Dream.Queue",
"id": "DummyQ",
"name": "DummyQ",
"isDummy": "1",
......
......@@ -50,7 +50,7 @@ except ImportError:
sys.modules['scipy'] = scipy
logger.error("Scipy cannot be imported, using dummy implementation")
from SimPy.Simulation import *
from SimPy.Simulation import activate, initialize, simulate
from Source import Source
from Globals import G
from Machine import Machine
......
......@@ -313,8 +313,7 @@ class Machine(CoreObject):
self.totalFailureTime+=now()-self.timeLastFailure
#we add the value only if it hasn't already been added
#if((len(self.next[0].Res.activeQ)>0) and (self.nameLastEntityEnded==self.nameLastEntityEntered) and (not alreadyAdded)):
if((self.nameLastEntityEnded==self.nameLastEntityEntered) and (not alreadyAdded)):
print "in"
if((mightBeBlocked) and (self.nameLastEntityEnded==self.nameLastEntityEntered) and (not alreadyAdded)):
self.totalBlockageTime+=(now()-self.timeLastEntityEnded)-(now()-self.timeLastFailure)-self.downTimeInTryingToReleaseCurrentEntity
#Machine was idle when it was not in any other state
......
......@@ -26,7 +26,8 @@ Models a FIFO queue where entities can wait in order to get into a server
'''
from SimPy.Simulation import *
from SimPy.Simulation import Process, Resource
from SimPy.Simulation import waituntil, now
from CoreObject import CoreObject
#the Queue object
......
......@@ -26,7 +26,7 @@ Created on 8 Nov 2012
models the source object that generates the entities
'''
from SimPy.Simulation import *
from SimPy.Simulation import now, Process, Resource, infinity, hold
from Part import Part
from RandomNumberGenerator import RandomNumberGenerator
from CoreObject import CoreObject
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment