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
3bafbca0
Commit
3bafbca0
authored
Feb 03, 2014
by
Ioannis Papagiannopoulos
Committed by
Jérome Perrin
Feb 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getEntity of MachinePreemptive collapsed to CoreObject
parent
936f288a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+5
-2
dream/simulation/MachinePreemptive.py
dream/simulation/MachinePreemptive.py
+4
-4
No files found.
dream/simulation/CoreObject.py
View file @
3bafbca0
...
...
@@ -97,7 +97,9 @@ class CoreObject(Process):
self
.
failureTimeInCurrentEntity
=
0
self
.
setupTimeCurrentEntity
=
0
self
.
shouldPreempt
=
False
#flag that shows that the machine should preempt or not
self
.
shouldPreempt
=
False
#flag that shows that the machine should preempt or not
self
.
lastGiver
=
None
# variable that holds the last giver of the object, used by machine in case of preemption
# =======================================================================
# the main process of the core object
...
...
@@ -155,7 +157,8 @@ class CoreObject(Process):
activeObjectQueue
=
self
.
getActiveObjectQueue
()
# remove entity from the giver
activeEntity
=
giverObject
.
removeEntity
()
# variable that holds the last giver; used in case of preemption
self
.
lastGiver
=
self
.
giver
#get the entity from the previous object and put it in front of the activeQ
activeObjectQueue
.
append
(
activeEntity
)
# if the giverObject is blocked then unBlock it
...
...
dream/simulation/MachinePreemptive.py
View file @
3bafbca0
...
...
@@ -45,10 +45,10 @@ class MachinePreemptive(MachineJobShop):
setupDistribution
,
setupMean
,
setupStdev
,
setupMin
,
setupMax
)
self
.
resetOnPreemption
=
resetOnPreemption
#flag that shows if the processing time should be reset or not
def
getEntity
(
self
):
activeEntity
=
MachineJobShop
.
getEntity
(
self
)
self
.
lastGiver
=
self
.
giver
return
activeEntity
#
def getEntity(self):
#
activeEntity=MachineJobShop.getEntity(self)
#
self.lastGiver=self.giver
#
return activeEntity
# =======================================================================
# method to execute the preemption
...
...
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