Скачать презентацию Embedding Optimization with Discrete Event Simulation Anna Rotondo Скачать презентацию Embedding Optimization with Discrete Event Simulation Anna Rotondo

4b08b5f4f19872024ce826b16c4f8bd2.ppt

  • Количество слайдов: 31

Embedding Optimization with Discrete Event Simulation Anna Rotondo Georgios Dagkakis Paul Young Cathal Heavey Embedding Optimization with Discrete Event Simulation Anna Rotondo Georgios Dagkakis Paul Young Cathal Heavey John Geraghty Dublin City University, University of Limerick, Dublin, Ireland Limerick, Ireland © DREAM Consortium

Potentials and limitations of hybrid simulation– optimization J Flexibility: Simulation can represent more real Potentials and limitations of hybrid simulation– optimization J Flexibility: Simulation can represent more real systems than mathematical methods (Banks 2000, Kelton and Law 2000) J Increasing academic interest: recently there have been many researchers producing methodologies for their combination (Figueira and Almada-Lobo 2014) J Software support: most Commercial-Off-The-Shelf (COTS) software provides modules for optimization (April and Glover 2003) L Computational overhead: it is expensive in time and resources to incorporate DES into optimization. L Complexity: it is not frequent that users of simulation tools are also experts in optimization algorithms (Lacksonen 2001). L Uncertainty: stochastic DES does not produce definitive results, but estimates, which makes it harder to be used within optimization algorithms (Banks, J. , Carson, J. S. , & Nelson 2000). © DREAM Consortium

Different approaches in hybrid simulation–optimization Describe a dual optimization architecture: i. simulation is used Different approaches in hybrid simulation–optimization Describe a dual optimization architecture: i. simulation is used to evaluate different scenarios that an optimization pattern produces ii. additionally, algorithms are used inside the simulation model in order to address decisions. Use an Open-Source (OS) Discrete Event Simulation (DES) engine (Man. Py) which can incorporate these methodologies. Advantages: • Modularity • Flexibility/interconnectivity • No license cost © DREAM Consortium

Proposed Architecture © DREAM Consortium Proposed Architecture © DREAM Consortium

DREAM Open Source modules provides the means of interfacing with an organization’s data repositories. DREAM Open Source modules provides the means of interfacing with an organization’s data repositories. KE stands for “Knowledge Extraction” a browser-based user interface that allows the user to build, run a model and view the results KE tool DREAM GUI Man. Py Library of well-defined manufacturing objects that can be connected in a model © DREAM Consortium

DREAM platform modules DREAM Platform GUI Man. Py JSON data model KE Tool DREAM DREAM platform modules DREAM Platform GUI Man. Py JSON data model KE Tool DREAM code is open-source in https: //github. com/nexedi/dream. A portal website is currently being built © DREAM Consortium

Man. Py – Manufacturing in Python © DREAM Consortium Man. Py – Manufacturing in Python © DREAM Consortium

Man. Py - Why Python? Slower than executable languages Python provides an intuitive syntax Man. Py - Why Python? Slower than executable languages Python provides an intuitive syntax that makes it easier for modellers to write code. Actively used in engineering being considered as a strong free alternative to MATLAB. Many successful scientific libraries exist in Python. E. g. Sci. Py (check http: //www. scipy. org/). Characteristics that make it ideal for Discrete Event Simulation code such as: ¢ Effective list processing ¢ Convenience in type-casting © DREAM Consortium

Case study problem • • Medical device fabrication facility The process is labour intensive; Case study problem • • Medical device fabrication facility The process is labour intensive; each station requires one or more Product Builders (PBs) A Team Leader (TL) is responsible of assigning PBs to machines How to redistribute PBs to machines during a shift when a limited number of PBs is available? # of Machines >>> # of available PBs © DREAM Consortium ?

Case study model A simulation model of the line was developed using DREAM platform Case study model A simulation model of the line was developed using DREAM platform (Dagkakis et al 2014) © DREAM Consortium

Case study model verification Verification was conducted against COTS software and a dedicated Sim. Case study model verification Verification was conducted against COTS software and a dedicated Sim. Py model (Dagkakis et al 2014) Plant Simulation model DREAM model Extend. Sim model Sim. Py model Experimental Plan Verification though comparison © DREAM Consortium

Optimization within simulation: Assignment of PBs multi-objective binary linear programming (LP) problem where the Optimization within simulation: Assignment of PBs multi-objective binary linear programming (LP) problem where the binary optimization variables consist of the assignment variables xij (i. e. operator i is assigned to machine j if xij is 1) and different objectives are taken into account: Objectives: 1 Assign PBs to machines with highest WIP (Max WIP sum) 2 Support uniform distribution of PBs across different stations (at least 1 PB per station (when station has 2 machines)) 3 Avoid unnecessary PB transfers 4 Complete assignment to one sub-line before the other is filled 5 Prioritise assignment to machines that have been idle for longer time 6 Max number of assigned PBs © DREAM Consortium

Objective Functions Assign PBs to machines with highest WIP (Max WIP sum) 1 (operators) Objective Functions Assign PBs to machines with highest WIP (Max WIP sum) 1 (operators) (machines) Max number of assigned PBs 6 © DREAM Consortium

Optimization within simulation: Assignment of PBs The simulation model was set to call the Optimization within simulation: Assignment of PBs The simulation model was set to call the LP algorithm in order to take decisions t=0 LP Method: responsible to decide the allocation (Python module external to Man. Py) Start Simulation Event. Generator: invokes allocation in given intervals t=T t=2 T Skilled. Router: responsible to impose the allocation decision t=3 T © DREAM Consortium

Optimization within simulation: Assignment of PBs The LP algorithm was coded using Pu. LP Optimization within simulation: Assignment of PBs The LP algorithm was coded using Pu. LP , a Python library that offers pre-defined methods to model a LP problem and generates LP or MPS files which can be solved by linear programming solvers, such as GLPK, COIN CLP/CBC and CPLEX (Mitchell 2009) LP solves the problem, but there are some issues: • • • Difficulty in the selections of weights for the objectives. Several sets of weights may lead the system being blocking The solution is not dynamic, since the decision is taken based only with the current situation The solution is not stochastic For these reasons an external optimization module was added © DREAM Consortium

Optimization using the simulation: Selection of the LP weights An Ant Colony Optimization (ACO) Optimization using the simulation: Selection of the LP weights An Ant Colony Optimization (ACO) algorithm was used in order to search models with different LP weights Generate ant population Set 1 assess ant Man. Py Model … LP Method ACO Set 2 Replications Ranking Set 3 … Selection Set N Adjust Selection Criteria © DREAM Consortium

Optimization using the simulation: Selection of the LP weights The potential values of weights Optimization using the simulation: Selection of the LP weights The potential values of weights are described in a Python dictionary {'1': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0], '2': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0], '3': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0], '4': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0], '5': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0], '6': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0]} Every ant is created randomly selecting one of the possible weights. An ant is represented by a Python dictionary Ant. X={'1': 0. 2, '2': 0. 3, '3': 1. 0, '4': 0. 7, '5': 0. 3, '6': 0. 8} © DREAM Consortium

Optimization using the simulation: Selection of the LP weights As the algorithm progresses it Optimization using the simulation: Selection of the LP weights As the algorithm progresses it gives advantage to best performing weights. For example, if in the first generation the best performing ants are: Ant. X={'1': 0. 2, '2': 0. 3, '3': 0. 1, '4': 0. 7, '5': 0. 3, '6': 0. 8} Ant. Y={'1': 0. 4, '2': 0. 2, '3': 0. 1, '4': 0. 6, '5': 0. 1, '6': 0. 8} Then the potential weights for next generations would be updated to: {'1': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0, 0. 2, 0. 4], '2': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0, 0. 3, 0. 2], '3': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0, 0. 1], '4': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0, 0. 7, 0. 6], '5': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0, 0. 3, 0. 1], '6': [0. 1, 0. 2, 0. 3, 0. 4, 0. 5, 0. 6, 0. 7, 0. 8, 0. 9, 1. 0, 0. 8]} So the probability of selecting the weights of the best performing ants is increased © DREAM Consortium

Optimization using the simulation: Selection of the LP weights Abstract Execution Plugin Execution. Plugin Optimization using the simulation: Selection of the LP weights Abstract Execution Plugin Execution. Plugin … run. One. Scenario() run() Abstract ACO Plugin ACO … run() create. Collated. Scenario() create. Ant. Data() calculate. Ant. Score() Case Specific ACO plugins JSACO Batches. ACO … create. Collated. Scenario() create. Ant. Data() calculate. Ant. Score() © DREAM Consortium ACO is utilized in 2 DREAM pilot cases. Both classes inherit from the same plugin but are adapted to fulfil the specific attributes of the case. For example, in the other case the ACO search for the optimal scheduling rules in buffers of a job-shop system (Olaitan et al 2014), so the representation of an Ant is different. • Potential for a future optimization layer in Man. Py

Integration in DREAM GUI User builds/edits the model in the GUI. For example: Flow Integration in DREAM GUI User builds/edits the model in the GUI. For example: Flow editor Shifts for operators © DREAM Consortium

Experiment We tested the methodology in a deterministic actualization: • One shift of 9 Experiment We tested the methodology in a deterministic actualization: • One shift of 9 hours • WIP set from real historic data • Processing times deterministic from company’s calculation sheets • ACO weights: • As KPI to rank the solutions throughput was used • Ran the experiment for different numbers of generations and ants per generation © DREAM Consortium

Results from 50 generations with 4 ants per generation. • Results of discrete nature; Results from 50 generations with 4 ants per generation. • Results of discrete nature; throughput takes the values 8, 9 and 12 • As ACO progresses the solutions with higher throughput get more frequent • We see some logical pattern, e. g. ACO tends to minimize “Min assignment variations” weight. Logical since allowing flexing may lead to higher throughput © DREAM Consortium

Results Experimenting with different ACO setup: i. 20 generations with 10 ants per generation; Results Experimenting with different ACO setup: i. 20 generations with 10 ants per generation; ii. 25 generations with 8 ants per generation. iii. 50 generations with 4 ants per generation. • Better convergence when we allow ACO to move through more generations • Experiments of 200 simulations needed 11 -16 minutes in a 1. 8 GHz Intel Core i 7 processor © DREAM Consortium

Shifting to stochastic • Experiments have been deterministic because that is how company uses Shifting to stochastic • Experiments have been deterministic because that is how company uses their data. • For the shake of experiment we used a rule to create triangular processing times: • If processing time is deterministic with mean=a, then set it to triangular with min=0. 8 a, mean=a, max=1. 2 a © DREAM Consortium

Stochastic Optimization – Approach 1 Ants produce a deterministic schedule. This is locked and Stochastic Optimization – Approach 1 Ants produce a deterministic schedule. This is locked and then stochastically assessed for its robustness J Quite fast implementation. Replications do not use the LP which was found the most time consuming part of simulation J The Gantt schedule given to TL is assessed to be robust L We do not optimize the weights in a stochastic manner, we just assess that the deterministically produced schedule is robust © DREAM Consortium

Stochastic Results – Approach 1 Below results from 5 ants we sampled. In the Stochastic Results – Approach 1 Below results from 5 ants we sampled. In the deterministic case they all produce a throughput of 12 batches. We ran them stochastically with, 20 replications each Ant 1 Ant 2 Ant 3 Ant 4 Ant 5 Assignment to Uniform Min Machines with Max number Average 95% LB 95% RB machines with assignment Fill subfurthest last of assigned Batch line higher WIP across stations variations assignment time PB Throughput 1. 5 1. 1 0 1. 6 1 0. 8 12. 45 12. 01 12. 89 1. 5 1. 1 0 1. 3 1. 4 0. 6 12. 45 12. 21 12. 69 1. 8 1. 1 0 1. 5 1 0. 8 8. 95 8. 84 9. 05 1. 1 0 1. 6 0. 5 12. 4 12. 16 12. 63 1. 5 1. 1 0 1. 9 1 0. 7 11. 7 10. 87 12. 53 We see that scenarios that perform similarly in the deterministic case differ significantly in the stochastic one. E. g: • Ant 3 performs much worse than the others • Ant 1 and Ant 2 give the same average, but Ant 2 has a narrower 95% confidence interval © DREAM Consortium

Stochastic Optimization – Approach 2 Ants are assessed stochastically to determine the optimal weights. Stochastic Optimization – Approach 2 Ants are assessed stochastically to determine the optimal weights. These are stored and when TL wants to take a decision only the LP method with the optimal weights is run J We do optimize the LP weights L Slow, but it can be run in the background L Complex to setup in a real environment (Database and KE needed) © DREAM Consortium

Cloud distribution of Simulation • Parallel cloud distribution of the experiments has been prototyped Cloud distribution of Simulation • Parallel cloud distribution of the experiments has been prototyped using the Simple Language for Accounting and Provisioning Operating System (Slap. OS) (Smets. Solanes et al 2011) • Implementation still in progress, so results are left for future work © DREAM Consortium

Future work and challenges Results confirm that the interface of simulation and optimization, which Future work and challenges Results confirm that the interface of simulation and optimization, which is the main research question of this study, is working. However, there is still work to be conducted: • Experiments so far have been deterministic (see next slides) • Ranking the solution only based on throughput may not be enough. It was observed that best performing solutions tend to allocate PBs near the end of the line, not leaving normalized WIP for next shifts. Given the discrete nature of results more KPIs could be considered • Computational overhead in current implementation may be too high for stochastic cases © DREAM Consortium

References • April, J. , F. Glover. 2003. Practical introduction to simulation optimization. Proceedings References • April, J. , F. Glover. 2003. Practical introduction to simulation optimization. Proceedings of the 2003 Winter Simulation Conference, vol. 1, 71– 78. • Banks, J. , 2000. Introduction to simulation. Proceedings of the 2000 Winter Simulation Conference, vol 1, 9– 16. • Banks, J. S. Carson, B. L. Nelson. 2000. DM Nicol, Discrete-Event System Simulation. Prentice hall. Englewood Cliffs, NJ, USA. • Can, B. , A. Beham, C. Heavey. 2008. A comparative study of genetic algorithm components in simulation-based optimisation. Proceedings of the 40 th Winter Simulation Conference. • Dagkakis G. , Rotondo A. , Papagiannopoulos I. , Heavy C. , Geraghty J. and Young P. 2014. From COTS simulation software to an open-source platform  a use case in the medical device industry. In: Proceedings of the 8 th International Conference on Digital Enterprise Technology (DET 2014). • Figueira, G. , B. Almada-Lobo. 2014. Hybrid simulation-optimization methods: A taxonomy and discussion. Simulation Modelling Practice and Theory 46 118– 134. © DREAM Consortium

References • Kelton, W. , Α. Law. 2000. Simulation modeling and analysis. Mc. Graw-Hill. References • Kelton, W. , Α. Law. 2000. Simulation modeling and analysis. Mc. Graw-Hill. New York. • Lacksonen, T. 2001. Empirical comparison of search algorithms for discrete event simulation. Computers & Industrial Engineering 40(1)133– 148. • Mitchell, S. 2009. An introduction to pulp for Python programmers. Python Papers Monograph, 1, 14. • Olaitan, O. , Geraghty, J. , Young, P. , Dagkakis, G. , Heavey, C. , Bayer, M. , . . . & Robin, S. (2014). Implementing Man. Py, a Semantic-free Open-source Discrete Event Simulation Package, in a Job Shop. Procedia CIRP, 253260. • Smets-Solanes, J. P. , Cérin, C. , & Courteaud, R. 2011. Slapos: A multipurpose distributed cloud operating system based on an erp billing model. In Services Computing (SCC), 2011 IEEE International Conference on (pp. 765 -766). IEEE. © DREAM Consortium