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
c8dbdb45
Commit
c8dbdb45
authored
Aug 21, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QueueLIFO was deprecated
parent
1d4a885f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
56 deletions
+1
-56
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+1
-12
dream/simulation/QueueLIFO.py
dream/simulation/QueueLIFO.py
+0
-44
No files found.
dream/simulation/LineGenerationJSON.py
View file @
c8dbdb45
...
@@ -297,18 +297,7 @@ def createObjects():
...
@@ -297,18 +297,7 @@ def createObjects():
objectType
=
Globals
.
getClassFromName
(
objClass
)
objectType
=
Globals
.
getClassFromName
(
objClass
)
coreObject
=
objectType
(
inputsDict
=
element
)
coreObject
=
objectType
(
inputsDict
=
element
)
coreObject
.
nextIds
=
getSuccessorList
(
element
[
'id'
])
# update the nextIDs list of the machine
coreObject
.
nextIds
=
getSuccessorList
(
element
[
'id'
])
# update the nextIDs list of the machine
elif
objClass
==
'Dream.QueueLIFO'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
successorList
=
element
.
get
(
'successorList'
,
'not found'
)
capacity
=
int
(
element
.
get
(
'capacity'
)
or
1
)
isDummy
=
bool
(
int
(
element
.
get
(
'isDummy'
)
or
0
))
Q
=
QueueLIFO
(
id
,
name
,
capacity
,
isDummy
)
Q
.
nextIds
=
successorList
G
.
QueueList
.
append
(
Q
)
G
.
ObjList
.
append
(
Q
)
elif
objClass
==
'Dream.Assembly'
:
elif
objClass
==
'Dream.Assembly'
:
A
=
Assembly
(
**
element
)
A
=
Assembly
(
**
element
)
A
.
nextIds
=
getSuccessorList
(
element
[
'id'
])
A
.
nextIds
=
getSuccessorList
(
element
[
'id'
])
...
...
dream/simulation/QueueLIFO.py
deleted
100644 → 0
View file @
1d4a885f
# ===========================================================================
# Copyright 2013 University of Limerick
#
# This file is part of DREAM.
#
# DREAM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DREAM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with DREAM. If not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
'''
Created on 15 Feb 2013
@author: George
'''
'''
Models a LIFO queue where entities can wait in order to get into a server
'''
from
Queue
import
Queue
class
QueueLIFO
(
Queue
):
#gets an entity from the predecessor
def
getEntity
(
self
):
activeObject
=
self
#use this to refer to the current object which receives the Entity
activeEntity
=
[
self
.
previous
[
self
.
predecessorIndex
].
Res
.
activeQ
[
0
]]
#use this to refer to the Entity that is received
giverObject
=
self
.
previous
[
self
.
predecessorIndex
]
#use this to refer to the object that disposes the entity
activeObject
.
Res
.
activeQ
=
activeEntity
+
activeObject
.
Res
.
activeQ
#get the entity from the previous object
#and put it in front of the activeQ
giverObject
.
removeEntity
()
#remove the entity from the previous object
\ No newline at end of file
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