Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
659f024c
Commit
659f024c
authored
Mar 03, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redundant code commented and comments refinement
parent
5a64e582
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
dream/simulation/Machine.py
dream/simulation/Machine.py
+1
-1
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+13
-13
No files found.
dream/simulation/Machine.py
View file @
659f024c
...
@@ -360,7 +360,7 @@ class Machine(CoreObject):
...
@@ -360,7 +360,7 @@ class Machine(CoreObject):
self
.
releaseOperator
()
self
.
releaseOperator
()
yield
waituntil
,
self
,
self
.
broker
.
brokerIsSet
yield
waituntil
,
self
,
self
.
broker
.
brokerIsSet
# if there is a failure
in the machine
it is passivated
# if there is a failure
in the machine or interruption due to preemption,
it is passivated
yield
passivate
,
self
yield
passivate
,
self
# use the timers to count the time that Machine is down and related
# use the timers to count the time that Machine is down and related
self
.
downTimeProcessingCurrentEntity
+=
now
()
-
breakTime
# count the time that Machine is down while processing this Entity
self
.
downTimeProcessingCurrentEntity
+=
now
()
-
breakTime
# count the time that Machine is down while processing this Entity
...
...
dream/simulation/MachineManagedJob.py
View file @
659f024c
...
@@ -178,19 +178,19 @@ class MachineManagedJob(MachineJobShop):
...
@@ -178,19 +178,19 @@ class MachineManagedJob(MachineJobShop):
# maybe we should work this way in all CoreObjects???
# maybe we should work this way in all CoreObjects???
return
self
.
entityToGet
return
self
.
entityToGet
# =======================================================================
#
# =======================================================================
# checks if the object is ready to receive an Entity
#
# checks if the object is ready to receive an Entity
# =======================================================================
#
# =======================================================================
def
isReadyToGet
(
self
):
#
def isReadyToGet(self):
# check if the entity that is about to be obtained has a manager (this should be true for this object)
#
# check if the entity that is about to be obtained has a manager (this should be true for this object)
if
self
.
entityToGet
.
manager
:
#
if self.entityToGet.manager:
manager
=
self
.
entityToGet
.
manager
#
manager=self.entityToGet.manager
if
len
(
manager
.
activeCallersList
)
>
0
:
#
if len(manager.activeCallersList)>0:
manager
.
sortEntities
()
# sort the callers of the manager to be used for scheduling rules
#
manager.sortEntities() # sort the callers of the manager to be used for scheduling rules
# return true if the manager is available
#
# return true if the manager is available
return
manager
.
checkIfResourceIsAvailable
()
#
return manager.checkIfResourceIsAvailable()
else
:
#
else:
return
True
#
return True
# =======================================================================
# =======================================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment