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
8a3d8ac2
Commit
8a3d8ac2
authored
Aug 18, 2013
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added Entity generic class. Part and Frame inherit from it
parent
9529bfd3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
dream/simulation/Entity.py
dream/simulation/Entity.py
+40
-0
dream/simulation/Frame.py
dream/simulation/Frame.py
+3
-1
dream/simulation/Part.py
dream/simulation/Part.py
+2
-1
No files found.
dream/simulation/Entity.py
0 → 100644
View file @
8a3d8ac2
# ===========================================================================
# Copyright 2013 Georgios Dagkakis
#
# 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 18 Aug 2013
@author: George
'''
'''
Class that acts as an abstract. It should have no instances. All the Entities should inherit from it
'''
#The entity object
class
Entity
(
object
):
def
__init__
(
self
,
name
):
self
.
type
=
"Entity"
self
.
name
=
name
self
.
currentStop
=
None
#contains the current object that the material is in
self
.
creationTime
=
0
self
.
startTime
=
0
#holds the startTime for the lifespan
#dimension data
self
.
width
=
1.0
self
.
height
=
1.0
self
.
length
=
1.0
\ No newline at end of file
dream/simulation/Frame.py
View file @
8a3d8ac2
...
...
@@ -28,13 +28,15 @@ models a frame entity. This can flow through the system and carry parts
from
SimPy.Simulation
import
*
from
Globals
import
G
from
Entity
import
Entity
#The entity object
class
Frame
(
object
):
class
Frame
(
Entity
):
type
=
"Frame"
numOfParts
=
4
#the number of parts that the frame can take
def
__init__
(
self
,
name
):
self
.
type
=
"Frame"
self
.
name
=
name
self
.
currentStop
=
None
#contains the current object that the material is in
self
.
creationTime
=
0
...
...
dream/simulation/Part.py
View file @
8a3d8ac2
...
...
@@ -29,10 +29,11 @@ models a part entity that flows through the system
from
SimPy.Simulation
import
*
from
Globals
import
G
from
Entity
import
Entity
#The entity object
class
Part
(
object
):
class
Part
(
Entity
):
type
=
"Part"
def
__init__
(
self
,
name
):
...
...
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