1 / 31

Embedding Optimization with Discrete Event Simulation

Embedding Optimization with Discrete Event Simulation. Anna Rotondo Paul Young John Geraghty Dublin City University, Dublin , Ireland. Georgios Dagkakis Cathal Heavey University of Limerick, Limerick, Ireland. Potentials and limitations of hybrid simulation–optimization.

rpolk
Download Presentation

Embedding Optimization with Discrete Event Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Embedding Optimization with Discrete Event Simulation • Anna Rotondo • Paul Young • John Geraghty • Dublin City University, • Dublin, Ireland • Georgios Dagkakis • Cathal Heavey • University of Limerick, • Limerick, Ireland

  2. Potentials and limitations of hybrid simulation–optimization • Flexibility: Simulation can represent more real systems than mathematical methods (Banks 2000, Kelton and Law 2000) • Increasing academic interest:recently there have been many researchers producing methodologies for their combination (Figueira and Almada-Lobo 2014) • Software support: most Commercial-Off-The-Shelf (COTS) software provides modules for optimization (April and Glover 2003) • Computational overhead: it is expensive in time and resources to incorporate DES into optimization. • Complexity: it is not frequent that users of simulation tools are also experts in optimization algorithms (Lacksonen 2001). • 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).

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

  4. Proposed Architecture

  5. 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 ManPy • Library of well-defined manufacturing objects that can be connected in a model

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

  7. ManPy – Manufacturing in Python

  8. ManPy - 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. SciPy (check http://www.scipy.org/). • Characteristics that make it ideal for Discrete Event Simulation code such as: • Effective list processing • Convenience in type-casting

  9. 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

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

  11. Case study model verification Plant Simulation model DREAM model ExtendSim model SimPy model Experimental Plan Verification though comparison Verification was conducted against COTS software and a dedicated SimPy model (Dagkakis et al 2014)

  12. 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) • Support uniform distribution of PBs across different stations • (at least 1 PB per station (when station has 2 machines)) 2 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

  13. Objective Functions 1 • Assign PBs to machines with highest WIP (Max WIP sum) (operators) (machines) • Max number of assigned PBs 6

  14. Optimization within simulation: Assignment of PBs The simulation model was set to call the LP algorithm in order to take decisions • LP Method: responsible to decide the allocation (Python module external to ManPy) Start Simulation t=0 • EventGenerator: invokes allocation in given intervals t=T • SkilledRouter: responsible to impose the allocation decision t=2T t=3T

  15. Optimization within simulation: Assignment of PBs The LP algorithm was coded using PuLP, 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

  16. 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 • assess ant ManPy Model Set 1 • … LP Method • Replications Set 2 Ranking ACO Set 3 • … Selection Set N • Adjust Selection Criteria

  17. 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 • AntX={'1': 0.2, '2': 0.3, '3': 1.0, '4': 0.7, '5': 0.3, '6': 0.8}

  18. 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: • AntX={'1': 0.2, '2': 0.3, '3': 0.1, '4': 0.7, '5': 0.3, '6': 0.8} • AntY={'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, 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, 0.8]} So the probability of selecting the weights of the best performing ants is increased

  19. Optimization using the simulation: Selection of the LP weights • Abstract Execution Plugin 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 ManPy ACO ExecutionPlugin … … run() createCollatedScenario() createAntData() calculateAntScore() runOneScenario() run() • Abstract ACO Plugin JSACO … BatchesACO createCollatedScenario() createAntData() calculateAntScore() … createCollatedScenario() createAntData() calculateAntScore() • Case Specific ACO plugins

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

  21. 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

  22. Results 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

  23. Results Experimenting with different ACO setup: • 20 generations with 10 ants per generation; • 25 generations with 8 ants per generation. • 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 i7 processor

  24. 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.8a, mean=a, max=1.2a

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

  26. 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 • We see that scenarios that perform similarly in the deterministic case differ significantly in the stochastic one. E.g: • Ant3 performs much worse than the others • Ant1 and Ant2 give the same average, but Ant2 has a narrower 95% confidence interval

  27. 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 • We do optimize the LP weights • Slow, but it can be run in the background • Complex to setup in a real environment (Database and KE needed)

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

  29. Future work and challenges Results confirm that theinterface 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

  30. 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, vol1, 9–16. • Banks, J., 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 40th 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 8th 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 Theory46 118–134.

  31. References • Kelton, W., Α. Law. 2000. Simulation modeling and analysis. McGraw-Hill. New York. • Lacksonen, T. 2001. Empirical comparison of search algorithms for discrete event simulation. Computers & Industrial Engineering40(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 ManPy, a Semantic-free Open-source Discrete Event Simulation Package, in a Job Shop. Procedia CIRP, 25, 253-260. • Smets-Solanes, J. P., Cérin, C., & Courteaud, R. 2011. Slapos: A multi-purpose distributed cloud operating system based on an erp billing model. In Services Computing (SCC), 2011 IEEE International Conference on (pp. 765-766). IEEE.

More Related