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
274f5afd
Commit
274f5afd
authored
Aug 08, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
objects to read assembly space information
parent
f1e0669f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
dream/simulation/CapacityProject.py
dream/simulation/CapacityProject.py
+4
-1
dream/simulation/CapacityStationController.py
dream/simulation/CapacityStationController.py
+2
-0
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+7
-2
No files found.
dream/simulation/CapacityProject.py
View file @
274f5afd
...
...
@@ -34,12 +34,15 @@ from Entity import Entity
class
CapacityProject
(
Entity
):
type
=
"CapacityProject"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
capacityRequirementDict
=
{},
earliestStartDict
=
{},
dueDate
=
0
):
def
__init__
(
self
,
id
=
None
,
name
=
None
,
capacityRequirementDict
=
{},
earliestStartDict
=
{},
dueDate
=
0
,
assemblySpaceRequirement
=
0
):
Entity
.
__init__
(
self
,
id
,
name
,
dueDate
=
dueDate
)
# a dict that shows the required capacity from every station
self
.
capacityRequirementDict
=
capacityRequirementDict
# a dict that shows the earliest start in every station
self
.
earliestStartDict
=
earliestStartDict
# the assembly space the project requires
self
.
assemblySpaceRequirement
=
assemblySpaceRequirement
def
initialize
(
self
):
self
.
projectSchedule
=
[]
# a list of dicts to keep the schedule
...
...
dream/simulation/CapacityStationController.py
View file @
274f5afd
...
...
@@ -42,6 +42,8 @@ class CapacityStationController(EventGenerator):
self
.
dueDateThreshold
=
dueDateThreshold
# attribute that shows if we prioritize entities that can finish work in this station in the next interval
self
.
prioritizeIfCanFinish
=
prioritizeIfCanFinish
# the total assemblySpace in the system
self
.
assemblySpace
=
float
(
G
.
extraPropertyDict
.
get
(
'assemblySpace'
,
float
(
'inf'
)))
def
initialize
(
self
):
EventGenerator
.
initialize
(
self
)
...
...
dream/simulation/LineGenerationJSON.py
View file @
274f5afd
...
...
@@ -116,7 +116,9 @@ def readGeneralInput():
G
.
trace
=
general
.
get
(
'trace'
,
'No'
)
# get trace in order to check if trace is requested
G
.
console
=
general
.
get
(
'console'
,
'No'
)
# get console flag in order to check if console print is requested
G
.
confidenceLevel
=
float
(
general
.
get
(
'confidenceLevel'
,
'0.95'
))
# get the confidence level
G
.
seed
=
general
.
get
(
'seed'
)
G
.
seed
=
general
.
get
(
'seed'
)
# the seed for random number generation
G
.
extraPropertyDict
=
general
.
get
(
'extraPropertyDict'
,
{})
# a dict to put extra properties that are
# generic for the model
# ===========================================================================
# creates the simulation objects
...
...
@@ -1269,8 +1271,11 @@ def createWIP():
capacityRequirementDict
=
entity
.
get
(
'capacityRequirementDict'
,
{})
earliestStartDict
=
entity
.
get
(
'earliestStartDict'
,
{})
dueDate
=
float
(
entity
.
get
(
'dueDate'
,
0
))
assemblySpaceRequirement
=
float
(
entity
.
get
(
'assemblySpaceRequirement'
,
0
))
CP
=
CapacityProject
(
id
=
id
,
name
=
name
,
capacityRequirementDict
=
capacityRequirementDict
,
earliestStartDict
=
earliestStartDict
,
dueDate
=
dueDate
)
earliestStartDict
=
earliestStartDict
,
dueDate
=
dueDate
,
assemblySpaceRequirement
=
assemblySpaceRequirement
)
G
.
EntityList
.
append
(
CP
)
G
.
CapacityProjectList
.
append
(
CP
)
...
...
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