Commit b73cc328 authored by Georgios Dagkakis's avatar Georgios Dagkakis

sample script to take DB extracted data and put it in CapacityStation configuration. WIP is missing

parent 97d48c06
# ===========================================================================
# 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/>.
# ===========================================================================
import json
from datetime import datetime
configuration=open("PilotCases\CapacityStations\sampleConfiguration.json", "r")
# configuration=open("sampleConfiguration.json", "r")
configurationData=configuration.read()
configurationJSON=json.loads(configurationData)
db=open("PilotCases\CapacityStations\sampleDBExtraction.json", "r")
# configuration=open("sampleConfiguration.json", "r")
dbData=db.read()
dbJSON=json.loads(dbData)
operations=dbJSON.get('operations',{})
stations=configurationJSON['graph']['node']
currentDate=configurationJSON['general']['currentDate']
currentDate=datetime.strptime(currentDate, '%Y/%m/%d')
# set the interval capacity of the stations
for operationId, operation in operations.iteritems():
intervalCapacity=operation.get('intervalCapacity',[])
for stationId, station in stations.iteritems():
if stationId==operationId:
station['intervalCapacity']=intervalCapacity
orders=dbJSON.get('orders',{})
configurationJSON['input']['BOM']['productionOrders']=[]
capacityRequirementDict={}
earliestStartDict={}
for order in orders:
for operation in order['sequence']:
operationId=operation.keys()[0]
capacityRequirementDict[operationId]=operation[operationId]['requiredCapacity']
earliestStart=operation[operationId].get('earliestStart',None)
if earliestStart:
earliestStart=datetime.strptime(earliestStart, '%Y-%m-%d')
earliestStartDict[operationId]=(earliestStart-currentDate).days
assemblySpaceRequirement=order.get('floorSpaceRequired',100)
orderId=order['orderID']
dueDate=order.get('dueDate',100)
dueDate=datetime.strptime(dueDate, '%Y-%m-%d')
dueDate=(dueDate-currentDate).days
orderDate=order.get('orderDate',0)
orderDate=datetime.strptime(orderDate, '%Y-%m-%d')
orderDate=(orderDate-currentDate).days
name=order.get('orderName',orderId)
configurationJSON['input']['BOM']['productionOrders'].append({
"capacityRequirementDict":capacityRequirementDict,
"assemblySpaceRequirement":assemblySpaceRequirement,
"name":name,
"id":orderId,
"earliestStartDict":earliestStartDict,
"_class": "dream.simulation.applications.CapacityStations.CapacityProject.CapacityProject",
"dueDate":dueDate,
"orderDate":orderDate
})
updatedModelJSONString=json.dumps(configurationJSON, indent=5)
updatedModel=open('UpdatedModel.json', mode='w')
updatedModel.write(updatedModelJSONString)
# ===========================================================================
# 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/>.
# ===========================================================================
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
\ No newline at end of file
{
"application_configuration": {
"pre_processing": {
"plugin_list": [
{
"_class": "dream.plugins.CapacityStationsSetAssemblySpace.CapacityStationsSetAssemblySpace",
"input_id": "assemblySpace"
},
{
"_class": "dream.plugins.AvailableCapacitySpreadsheet.AvailableCapacitySpreadsheet",
"input_id": "availableCapacity"
},
{
"_class": "dream.plugins.CapacityProjectSpreadsheet.CapacityProjectSpreadsheet",
"input_id": "capacityProject"
},
{
"_class": "dream.plugins.CreateCapacityStations.CreateCapacityStations",
"input_id": "createCapacityStations"
},
{
"_class": "dream.plugins.CapacityStationWIPSpreadsheet.CapacityStationWIPSpreadsheet",
"input_id": "createCapacityStationWIP"
}
]
},
"general": {
"properties": {
"assemblySpace": {
"default": 100,
"type": "number",
"description": "Total assembly Space in square meters",
"title": "Assembly Space"
},
"numberOfReplications": {
"default": 10,
"type": "integer",
"description": "Number of replications to run",
"title": "Number of replications"
},
"trace": {
"default": "No",
"enum": [
"No",
"Yes"
],
"type": "string",
"description": "Create an excel trace file (Yes or No)",
"title": "OutputTrace"
},
"ke_url": {
"default": "http: //git.erp5.org/gitweb/dream.git/blob_plain/HEAD: /dream/KnowledgeExtraction/Mockup_Processingtimes.xls",
"type": "string",
"description": "The URL for knowledge extraction to access its data for example http: //git.erp5.org/gitweb/dream.git/blob_plain/HEAD: /dream/KnowledgeExtraction/Mockup_Processingtimes.xls",
"title": "URL for Knowledge Extraction Spreadsheet"
},
"processTimeout": {
"default": 10,
"type": "number",
"description": "Number of seconds before the calculation process is interrupted",
"title": "ProcessTimeout"
},
"seed": {
"default": "1",
"type": "number",
"description": "When using the same seed, the random number generator produce the same sequence of numbers",
"title": "Seed for random number generator"
},
"confidenceLevel": {
"default": 0.95,
"type": "number",
"description": "Confidence level for statistical analysis of stochastic experiments",
"title": "Confidence level"
},
"maxSimTime": {
"default": 100,
"type": "number",
"description": "Length of the simulation run",
"title": "Length of Experiment"
},
"currentDate": {
"default": "2014/10/01",
"type": "string",
"description": "The day the experiment starts, in YYYY/MM/DD format",
"title": "SimulationStartTime"
},
"timeUnit": {
"default": "day",
"enum": [
"minute",
"hour",
"day",
"week",
"month",
"year"
],
"type": "string",
"description": "Used for input and reporting widgets.",
"name": "Time unit"
}
}
},
"input": {
"view_management": {
"gadget": "Input_viewDocumentManagement",
"type": "object_view",
"title": "Manage document"
},
"view_wip_spreadsheet": {
"gadget": "Input_viewSpreadsheet",
"configuration": {
"handsontable_options": {
"minSpareCols": 1
},
"columns": [
{
"type": "string",
"name": "Operation"
},
{
"type": "string",
"name": "Project1 (Rename)"
},
{
"type": "string",
"name": "Project2 (Rename)"
}
],
"extend": [
"x",
"y"
]
},
"type": "object_view",
"title": "Work in Progress Spreadsheet"
},
"view_projects_spreadsheet": {
"gadget": "Input_viewSpreadsheet",
"configuration": {
"columns": [
{
"type": "string",
"name": "Project ID"
},
{
"type": "string",
"name": "Order Date",
"format": "date"
},
{
"type": "string",
"name": "Due Date",
"format": "date"
},
{
"type": "number",
"name": "Assembly Space"
},
{
"type": "string",
"name": "Operation"
},
{
"type": "number",
"name": "Capacity Requirement"
},
{
"type": "string",
"name": "Earliest Start Date",
"format": "date"
}
],
"extend": [
"y"
]
},
"type": "object_view",
"title": "Projects Spreadsheet"
},
"debug": {
"gadget": "Input_viewDebugJson",
"type": "object_view",
"title": "Edit Configuration"
},
"view_result": {
"gadget": "Input_viewResultList",
"type": "object_view",
"title": "Results"
},
"view_run_simulation": {
"gadget": "Input_viewSimulation",
"type": "object_view",
"title": "Run Simulation"
},
"view_available_capacity_spreadsheet": {
"gadget": "Input_viewSpreadsheet",
"configuration": {
"handsontable_options": {
"minSpareCols": 1
},
"columns": [
{
"type": "string",
"name": "Day",
"format": "date-time"
},
{
"type": "string",
"name": "Station 1 (Rename)"
},
{
"type": "string",
"name": "Station 2 (Rename)"
}
],
"extend": [
"x",
"y"
]
},
"type": "object_view",
"title": "Available Capacity Spreadsheet"
},
"view": {
"gadget": "Input_viewProductionLine",
"type": "object_view",
"title": "ProductionLine"
}
},
"output": {
"view_station_gantt": {
"gadget": "Output_viewGantt",
"configuration": {
"output_id": "capacity_station_gantt"
},
"type": "object_view",
"title": "Station Schedule"
},
"view_project_gantt": {
"gadget": "Output_viewGantt",
"configuration": {
"output_id": "capacity_project_gantt"
},
"type": "object_view",
"title": "Project Schedule"
},
"view_station_utilization": {
"gadget": "Output_viewGraph",
"configuration": {
"output_id": "station_utilization"
},
"type": "object_view",
"title": "Station Utilization"
}
},
"post_processing": {
"plugin_list": [
{
"output_id": "station_utilization",
"_class": "dream.plugins.CapacityProjectStationUtilization.CapacityProjectStationUtilization",
"family": "CapacityStation"
},
{
"output_id": "capacity_project_gantt",
"_class": "dream.plugins.CapacityProjectGantt.CapacityProjectGantt"
},
{
"output_id": "capacity_station_gantt",
"_class": "dream.plugins.CapacityStationGantt.CapacityStationGantt"
}
]
},
"processing_plugin": {
"_class": "dream.plugins.plugin.DefaultExecutionPlugin",
"input_id": "Simulation"
}
},
"graph": {
"node": {
"ASBTST_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "ASBTST_Exit",
"nextCapacityStationBufferId": null
},
"EEP": {
"name": "EEP",
"intervalCapacity": [
290.0,
100.0,
200.0,
300.0,
390.0,
20.0,
0.0
],
"intervalCapacityStart": 3,
"coordinate": {
"top": 0.08206596769592567,
"left": 0.47570913933753145
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"intervalCapacityExceptions": {
"33.0": 370.0,
"2.0": 70.0,
"9.0": 70.0
}
},
"CNC_B": {
"requireFullProject": 0,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "CNC_Buffer",
"wip": []
},
"CNC_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "CNC_Exit",
"nextCapacityStationBufferId": "PPASB_B"
},
"SMF": {
"name": "SMF",
"intervalCapacity": [
20.0,
30.0,
130.0,
80.0,
180.0,
20.0,
0.0
],
"intervalCapacityStart": 3,
"coordinate": {
"top": 0.06693194658097301,
"left": 0.0679425723598465
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"intervalCapacityExceptions": {
"33.0": 120.0,
"2.0": 70.0,
"9.0": 70.0
}
},
"WELD": {
"name": "WELD",
"intervalCapacity": [
70.0,
170.0,
270.0,
80.0,
180.0,
20.0,
0.0
],
"intervalCapacityStart": 3,
"coordinate": {
"top": 0.47035271303157006,
"left": 0.05224682159961414
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"intervalCapacityExceptions": {
"33.0": 170.0,
"2.0": 90.0,
"9.0": 90.0
}
},
"ASBTST": {
"intervalCapacityStart": 3,
"name": "ASBTST",
"intervalCapacity": [
170.0,
270.0,
370.0,
20.0,
20.0,
20.0,
0.0
],
"priority": 3,
"sharedResources": {
"stationIds": [
"PPASB"
],
"priority": 3
},
"notProcessOutsideThreshold": 1,
"coordinate": {
"top": 0.725986317834675,
"left": 0.4748049078628899
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"id": "ASBTST",
"pool": "ASB",
"intervalCapacityExceptions": {
"33.0": 80.0,
"2.0": 50.0,
"9.0": 80.0
}
},
"SMF_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "SMF_Exit",
"nextCapacityStationBufferId": "WELD_B"
},
"SMF_B": {
"requireFullProject": 0,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "SMF_Buffer",
"wip": []
},
"WELD_B": {
"requireFullProject": 0,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "WELD_Buffer",
"wip": []
},
"PPASB_B": {
"notRequiredOperations": [
"EEP",
"ASBTST",
"PAINT",
"PPASB"
],
"requireFullProject": 1,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "PPASB_Buffer",
"wip": []
},
"CSC": {
"dueDateThreshold": 14,
"name": "CSC",
"prioritizeIfCanFinish": 1,
"interval": "1",
"start": "0",
"interruptions": {},
"_class": "dream.simulation.applications.CapacityStations.CapacityStationController.CapacityStationController"
},
"PAINT": {
"name": "PAINT",
"intervalCapacity": [
20.0,
20.0,
20.0,
320.0,
420.0,
20.0,
0.0
],
"intervalCapacityStart": 3,
"coordinate": {
"top": 0.7430615552634912,
"left": 0.3111040179667153
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"intervalCapacityExceptions": {
"33.0": 170.0,
"2.0": 70.0,
"9.0": 170.0
}
},
"CNC": {
"name": "CNC",
"intervalCapacity": [
90.0,
190.0,
290.0,
390.0,
490.0,
20.0,
0.0
],
"intervalCapacityStart": 3,
"coordinate": {
"top": 0.055153702206292815,
"left": 0.19503291923602395
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"intervalCapacityExceptions": {
"33.0": 80.0,
"2.0": 80.0,
"9.0": 80.0
}
},
"PPASB_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "PPASB_Exit",
"nextCapacityStationBufferId": "PAINT_B"
},
"EEP_B": {
"requireFullProject": 0,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "EEP_Buffer",
"wip": []
},
"MCH_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "MCH_Exit",
"nextCapacityStationBufferId": "PPASB_B"
},
"MCH_B": {
"requireFullProject": 0,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "MCH_Buffer",
"wip": []
},
"EEP_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "EEP_Exit",
"nextCapacityStationBufferId": "ASBTST_B"
},
"ASBTST_B": {
"notRequiredOperations": [
"ASBTST"
],
"requireFullProject": 1,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "ASBTST_Buffer",
"wip": []
},
"MCH": {
"name": "MCH",
"intervalCapacity": [
20.0,
70.0,
170.0,
270.0,
370.0,
20.0,
0.0
],
"intervalCapacityStart": 3,
"coordinate": {
"top": 0.06653715527072322,
"left": 0.3349253399057431
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"intervalCapacityExceptions": {
"33.0": 160.0,
"2.0": 20.0,
"9.0": 60.0
}
},
"PPASB": {
"intervalCapacityStart": 3,
"name": "PPASB",
"intervalCapacity": [
170.0,
270.0,
370.0,
20.0,
20.0,
20.0,
0.0
],
"priority": 2,
"sharedResources": {
"stationIds": [
"ASBTST"
],
"priority": 2
},
"notProcessOutsideThreshold": 1,
"coordinate": {
"top": 0.7563202742806299,
"left": 0.15782822210919625
},
"_class": "dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation",
"id": "PPASB",
"pool": "ASB",
"intervalCapacityExceptions": {
"33.0": 80.0,
"2.0": 50.0,
"9.0": 80.0
}
},
"PAINT_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "PAINT_Exit",
"nextCapacityStationBufferId": "ASBTST_B"
},
"PAINT_B": {
"requireFullProject": 0,
"_class": "dream.simulation.applications.CapacityStations.CapacityStationBuffer.CapacityStationBuffer",
"name": "PAINT_Buffer",
"wip": []
},
"WELD_E": {
"_class": "dream.simulation.applications.CapacityStations.CapacityStationExit.CapacityStationExit",
"name": "WELD_Exit",
"nextCapacityStationBufferId": "PPASB_B"
}
},
"edge": {
"WELD_to_WELD_E": {
"source": "WELD",
"destination": "WELD_E",
"data": {},
"_class": "Dream.Edge"
},
"MCH_B_to_MCH": {
"source": "MCH_B",
"destination": "MCH",
"data": {},
"_class": "Dream.Edge"
},
"WELD_B_to_WELD": {
"source": "WELD_B",
"destination": "WELD",
"data": {},
"_class": "Dream.Edge"
},
"EEP_to_EEP_E": {
"source": "EEP",
"destination": "EEP_E",
"data": {},
"_class": "Dream.Edge"
},
"ASBTST_to_ASBTST_E": {
"source": "ASBTST",
"destination": "ASBTST_E",
"data": {},
"_class": "Dream.Edge"
},
"MCH_to_MCH_E": {
"source": "MCH",
"destination": "MCH_E",
"data": {},
"_class": "Dream.Edge"
},
"PAINT_to_PAINT_E": {
"source": "PAINT",
"destination": "PAINT_E",
"data": {},
"_class": "Dream.Edge"
},
"ASBTST_B_to_ASBTST": {
"source": "ASBTST_B",
"destination": "ASBTST",
"data": {},
"_class": "Dream.Edge"
},
"EEP_B_to_EEP": {
"source": "EEP_B",
"destination": "EEP",
"data": {},
"_class": "Dream.Edge"
},
"CNC_to_CNC_E": {
"source": "CNC",
"destination": "CNC_E",
"data": {},
"_class": "Dream.Edge"
},
"PPASB_B_to_PPASB": {
"source": "PPASB_B",
"destination": "PPASB",
"data": {},
"_class": "Dream.Edge"
},
"PAINT_B_to_PAINT": {
"source": "PAINT_B",
"destination": "PAINT",
"data": {},
"_class": "Dream.Edge"
},
"CNC_B_to_CNC": {
"source": "CNC_B",
"destination": "CNC",
"data": {},
"_class": "Dream.Edge"
},
"PPASB_to_PPASB_E": {
"source": "PPASB",
"destination": "PPASB_E",
"data": {},
"_class": "Dream.Edge"
},
"SMF_B_to_SMF": {
"source": "SMF_B",
"destination": "SMF",
"data": {},
"_class": "Dream.Edge"
},
"SMF_to_SMF_E": {
"source": "SMF",
"destination": "SMF_E",
"data": {},
"_class": "Dream.Edge"
}
}
},
"general": {
"extraPropertyDict": {
"assemblySpace": 600
},
"assemblySpace": 600,
"numberOfReplications": "1",
"trace": "No",
"ke_url": "http: //git.erp5.org/gitweb/dream.git/blob_plain/HEAD: /dream/KnowledgeExtraction/Mockup_Processingtimes.xls",
"processTimeout": 10,
"seed": 1,
"confidenceLevel": 0.95,
"maxSimTime": -1,
"currentDate": "2014/08/01",
"timeUnit": "day"
},
"class_definition": {
"node": {
"required": [
"name",
"_class"
],
"type": "object",
"description": "Base definition for node",
"properties": {
"coordinate": {
"type": "object",
"properties": {
"top": "number",
"left": "number"
}
},
"_class": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"definitions": {
"_capacity": {
"default": 1,
"oneOf": [
{
"enum": [
-1
]
},
{
"multipleOf": 1
}
],
"type": "number",
"description": "capacity of the queue. -1 means infinite"
},
"_failureDist": {
"allOf": [
{
"type": "object",
"properties": {
"failureDistribution": {
"default": "No",
"enum": [
"No",
"Yes"
],
"type": "string"
}
}
},
{
"oneOf": [
{
"$ref": "#/definitions/distributionTypes/_failure"
},
{
"$ref": "#/definitions/distributionTypes/_no"
}
]
}
]
},
"_operationType": {
"default": "Automatic",
"enum": [
"Automatic",
"Manual"
],
"type": "string",
"description": "the type of operations that are performed manually in the machine"
},
"_dist": {
"allOf": [
{
"type": "object",
"properties": {
"distribution": {
"default": "Fixed",
"enum": [
"Fixed",
"Exp",
"Normal",
"Lognormal",
"Binomial",
"Poisson",
"Logistic",
"Cauchy",
"Geometric",
"Gama",
"Weibull"
],
"type": "string"
}
}
},
{
"oneOf": [
{
"$ref": "#/definitions/distributionTypes/_fixed"
},
{
"$ref": "#/definitions/distributionTypes/_exp"
},
{
"$ref": "#/definitions/distributionTypes/_normal"
},
{
"$ref": "#/definitions/distributionTypes/_lognormal"
},
{
"$ref": "#/definitions/distributionTypes/_binomial"
},
{
"$ref": "#/definitions/distributionTypes/_poisson"
},
{
"$ref": "#/definitions/distributionTypes/_logistic"
},
{
"$ref": "#/definitions/distributionTypes/_cauchy"
},
{
"$ref": "#/definitions/distributionTypes/_geometric"
},
{
"$ref": "#/definitions/distributionTypes/_gama"
},
{
"$ref": "#/definitions/distributionTypes/_weibull"
}
]
}
]
},
"distributionTypes": {
"_geometric": {
"properties": {
"probability": {
"default": 0,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Geometric",
"title": "Geometric"
},
"_weibull": {
"properties": {
"shape": {
"default": 0,
"required": true,
"type": "number"
},
"scale": {
"default": 0,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Weibull",
"title": "Weibull"
},
"_poisson": {
"properties": {
"lambda": {
"default": 0,
"type": "number"
}
},
"type": "object",
"description": "Poisson",
"title": "Poisson"
},
"_lognormal": {
"properties": {
"mean": {
"default": 0,
"_class": "Dream.Property",
"type": "number",
"name": "Mean"
},
"stdev": {
"default": 0,
"_class": "Dream.Property",
"type": "number",
"name": "Standard Deviation"
}
},
"type": "object",
"description": "Lognormal",
"title": "Lognormal"
},
"_normal": {
"properties": {
"mean": {
"default": 0,
"required": true,
"type": "number"
},
"stdev": {
"default": 0,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Normal",
"title": "Normal"
},
"_exp": {
"properties": {
"mean": {
"default": 0,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Exponential",
"title": "Exp"
},
"_logistic": {
"properties": {
"scale": {
"default": 0,
"required": true,
"type": "number"
},
"location": {
"default": 0,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Logistic",
"title": "Logistic"
},
"_cauchy": {
"properties": {
"scale": {
"default": 0,
"type": "number"
},
"location": {
"default": 0,
"type": "number"
}
},
"type": "object",
"description": "Cauchy",
"title": "Cauchy"
},
"_binomial": {
"properties": {
"mean": {
"default": 0,
"type": "number"
},
"size": {
"default": 0,
"type": "number"
}
},
"type": "object",
"description": "Binomial",
"title": "Binomial"
},
"_gama": {
"properties": {
"rate": {
"default": 0,
"required": true,
"type": "number"
},
"shape": {
"default": 0,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Gama",
"title": "Gama"
},
"_failure": {
"properties": {
"TTR": {
"name": "Time to Repair",
"$ref": "#/definitions/_dist"
},
"repairman": {
"required": true,
"type": "string",
"description": "Repairman"
},
"TTF": {
"name": "Time to Failure",
"$ref": "#/definitions/_dist"
}
},
"type": "object",
"description": "Fixed",
"title": "Yes"
},
"_fixed": {
"properties": {
"mean": {
"default": 0.75,
"required": true,
"type": "number"
}
},
"type": "object",
"description": "Fixed",
"title": "Fixed"
},
"_no": {
"type": "string",
"description": "None",
"title": "No"
}
},
"_schedulingRule": {
"default": "FIFO",
"enum": [
"FIFO",
"Priority",
"EDD",
"EOD",
"NumStages",
"RPC",
"LPT",
"SPT",
"MS",
"WINQ",
"WT"
],
"type": "string",
"description": "Scheduling Rule, one of FIFO Priority EDD EOD NumStages RPC LPT SPT MS WINQ"
}
},
"dream.simulation.applications.CapacityStations.CapacityStation.CapacityStation": {
"allOf": [
{
"$ref": "#/node"
},
{
"type": "object",
"properties": {
"priority": {
"_default": "",
"required": false,
"type": "number",
"description": "The priority against other stations. If this station does not share resources leave empty"
},
"requireFullProject": {
"_default": 0,
"required": true,
"type": "number",
"description": "Is this station an assembly? Yes: 1, No: 0"
},
"id": {
"default": "M",
"required": true,
"type": "string"
},
"pool": {
"_default": "",
"required": false,
"type": "string",
"description": "The pool of workers that is used for this station. If this station does not share resources leave empty"
},
"name": {
"default": "Machine",
"type": "string"
}
}
}
],
"_class": "node",
"name": "Machine",
"css": {
"backgroundImage": "linear-gradient(to bottom, #fef 0%, #ede 100%)",
"border": "1px solid #cbc",
"backgroundColor": "#fef"
},
"description": "A station processing items for some time given by a distribution"
},
"edge": {
"required": [
"_class",
"source",
"destination"
],
"type": "object",
"description": "Base definition for edge",
"properties": {
"source": {
"type": "string"
},
"destination": {
"type": "string"
},
"_class": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"Dream.Edge": {
"_class": "edge",
"description": "Connect stations together",
"allOf": [
{
"$ref": "#/class_defintion/edge"
}
]
}
},
"result": {
"result_list": []
},
"input": {
"wip_spreadsheet": [
[
"Operation",
"P1",
""
],
[
"SMF",
"80",
null
],
[
"WELD",
"0",
null
],
[
"CNC",
"130",
null
],
[
"MCH",
"125",
null
],
[
"EEP",
"30",
null
],
[
"PPASB",
"0",
null
],
[
"PAINT",
"0",
null
],
[
"ASBTST",
"0",
null
],
[
null,
null,
null
]
],
"projects_spreadsheet": [
[
"Project ID",
"Order Date",
"Due Date",
"Assembly Space",
"Operation",
"Capacity Requirement",
"Earliest Start Date"
],
[
"P1",
"2014/01/26",
"2014/03/26",
"400",
"SMF",
"80",
""
],
[
"",
"",
"",
"",
"WELD",
"90",
""
],
[
"",
"",
"",
"",
"CNC",
"130",
""
],
[
"",
"",
"",
"",
"MCH",
"125",
""
],
[
"",
"",
"",
"",
"EEP",
"30",
""
],
[
"",
"",
"",
"",
"PPASB",
"700",
""
],
[
"",
"",
"",
"",
"PAINT",
"50",
""
],
[
"",
"",
"",
"",
"ASBTST",
"300",
""
],
[
null,
null,
null,
null,
null,
null,
null
]
],
"BOM": {
"productionOrders": [
{
"capacityRequirementDict": {
"WELD": 90.0,
"MCH": 125.0,
"ASBTST": 300.0,
"EEP": 30.0,
"PAINT": 50.0,
"CNC": 130.0,
"PPASB": 700.0,
"SMF": 80.0
},
"name": "P1",
"earliestStartDict": {},
"orderDate": -25,
"assemblySpaceRequirement": 400.0,
"dueDate": 34,
"_class": "dream.simulation.applications.CapacityStations.CapacityProject.CapacityProject",
"id": "P1"
}
]
},
"available_capacity_spreadsheet": [
[
"DAY",
"SMF",
"WELD",
"CNC",
"MCH",
"EEP",
"PPASB",
"ASBTST",
"PAINT",
null
],
[
"MONDAY",
"20",
"70",
"90",
"20",
"290",
"170",
"170",
"20",
null
],
[
"TUESDAY",
"30",
"170",
"190",
"70",
"100",
"270",
"270",
"20",
null
],
[
"WEDNESDAY",
"130",
"270",
"290",
"170",
"200",
"370",
"370",
"20",
null
],
[
"THURSDAY",
"80",
"80",
"390",
"270",
"300",
"20",
"20",
"320",
null
],
[
"FRIDAY",
"180",
"180",
"490",
"370",
"390",
"20",
"20",
"420",
null
],
[
"SATURDAY",
"20",
"20",
"20",
"20",
"20",
"20",
"20",
"20",
null
],
[
"SUNDAY",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
null
],
[
"2014/02/22",
"70",
"90",
"80",
"20",
"70",
"50",
"50",
"70",
null
],
[
"2014/03/01",
"70",
"90",
"80",
"60",
"70",
"80",
"80",
"170",
null
],
[
"2014/03/25",
"120",
"170",
"80",
"160",
"370",
"80",
"80",
"170",
null
],
[
"",
null,
null,
null,
null,
null,
null,
null,
null,
null
]
]
},
"constraints": {}
}
\ No newline at end of file
{
"operations": {
"WELD": {
"name": "WELD",
"intervalCapacity": [
250,
350,
450,
550,
650,
0,
0
]
},
"MCH": {
"name": "MCH",
"intervalCapacity": [
310,
410,
510,
610,
710,
0,
0
]
},
"EEP": {
"name": "EEP",
"intervalCapacity": [
345,
445,
545,
645,
745,
0,
0
]
},
"ASBTST": {
"name": "ASBTST",
"intervalCapacity": [
420,
350,
380,
480,
560,
0,
0
]
},
"PAINT": {
"name": "PAINT",
"intervalCapacity": [
415,
515,
615,
715,
815,
0,
0
]
},
"CNC": {
"name": "CNC",
"intervalCapacity": [
270,
370,
470,
570,
670,
0,
0
]
},
"PPASB": {
"name": "PPASB",
"intervalCapacity": [
380,
300,
580,
680,
780,
0,
0
]
},
"SMF": {
"name": "SMF",
"intervalCapacity": [
180,
300,
400,
500,
600,
0,
0
]
}
},
"orders": [
{
"orderID": "Tade",
"customer": "t1",
"floorSpaceRequired": 400,
"sequence": [
{
"SMF": {
"operation": "SMF",
"earliestStart": "2014-08-25",
"task_id": "ID-001",
"requiredCapacity": 30
}
},
{
"WELD": {
"operation": "WELD",
"earliestStart": "2014-08-26",
"task_id": "ID-002",
"requiredCapacity": 15
}
},
{
"CNC": {
"operation": "CNC",
"earliestStart": "2014-08-27",
"task_id": "ID-003",
"requiredCapacity": 45
}
},
{
"MCH": {
"operation": "MCH",
"earliestStart": "2014-08-28",
"task_id": "ID-004",
"requiredCapacity": 25
}
},
{
"EEP": {
"operation": "EEP",
"earliestStart": "2014-08-29",
"task_id": "ID-005",
"requiredCapacity": 15
}
},
{
"PPASB": {
"operation": "PPASB",
"earliestStart": "2014-08-30",
"task_id": "ID-006",
"requiredCapacity": 25
}
},
{
"PAINT": {
"operation": "PAINT",
"earliestStart": "2014-08-31",
"task_id": "ID-007",
"requiredCapacity": 35
}
},
{
"ASBTST": {
"operation": "ASBTST",
"earliestStart": "2014-09-01",
"task_id": "ID-008",
"requiredCapacity": 45
}
}
],
"dueDate": "2014-08-25",
"orderName": "italy",
"orderDate": "2014-08-19"
}
],
"WIP": {
"WELD_idTade": {
"order_id": "Tade",
"buffered": 10.0,
"operation": "WELD"
},
"ID-001": {
"End date": "None",
"Total Capacity required": 30,
"Capacity required": 10,
"order_id": "Tade",
"operation": "SMF",
"Start date": "2015-03-13"
}
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment