Onni Ronkainen Optimising tactical production planning with Mixed-Integer Linear Programming How can the tactical production planning processes be optimised in terms of profitability in Outokumpu Chrome Oy using MILP -based model? Vaasa 2024 School of Technology and Innovations Master’s thesis in Industrial Management Master of Science in Economics and Business Administration 2 UNIVERSITY OF VAASA School of Technology and Innovations Author: Onni Ronkainen Title of the Thesis: Optimising tactical production planning with Mixed-Integer Lin- ear Programming : How can the tactical production planning processes be optimised in terms of profitability in Outokumpu Chrome Oy using MILP -based model? Degree: Master of Science in Economics and Business Administration Programme: Master's Programme in Industrial Management Supervisor: Binod Timilsina Year: 2024 Sivumäärä: 86 ABSTRACT: This paper explores optimization in tactical production planning within resource-constrained en- vironments, where medium- to short-term decisions are essential for operational efficiency. Op- timizing production planning under these conditions can confer competitive advantages and im- prove resource utilization, supporting sustainability and green development goals. Through a theoretical framework, this research identifies effective methodologies suitable for case com- pany for enhancing tactical production planning with a focus on profitability. Guided by this framework, a simulation model based on mixed-integer linear programming (MILP) was devel- oped and tested using historical production data from a case company. Simulation tool was de- veloped with Microsoft Excel, with OpenSolver add-on. Simulation tool was developed in collab- oration with the case company and targeted to be a usable tool in production planning. MILP was chosen based on findings in theoretical framework and empirical analysis as simulation tool was developed further and new requirements emerged. The model aims to maximize profitabil- ity by improving allocation of production volumes to more profitable period. Tool will generate optimized production plans that increase profit per tonne produced, while still fulfilling certain production restrictions and requirements. Performance was assessed by comparing the simu- lation model's suggested plans to actual historical production plans over a three-year period. Results demonstrate the model’s potential for profitability improvements, while the simulation tool requires further development to fully cover all characteristics of the production environ- ment. Based on these findings, the paper provides recommendations for future research, along with suggestions for further enhancing the simulation tool. 3 TIIVISTELMÄ: Tämän tutkielman tarkoituksena on perehtyä taktisen tuotannonsuunnittelun optimointiin re- surssi rajoitteisessa ympäristössä, missä keskipitkän ja lyhyen aikavälin päätöksillä on merkit- tävä vaikutus operatiiviseen tehokkuuteen. Tällaisessa ympäristössä tuotannon suunnittelun optimointi voi tuoda kilpailuetua, parantaa resurssien käytön tehokkuutta, sekä tukea ympäris- tön kannalta kestävää kehitystä. Teoreettisen viitekehyksen avulla tutkielma esittelee yrityk- seen sovellettavia keinoja parantaa tuotannon suunnittelun tehokkuutta, etenkin tuottavuuden saralla. Teoreettiseen tutkimukseen pohjautuen, empiirisessä osiossa esitellään tuotannon suunnitteluun soveltuva simulaatiotyökalu, joka hyödyntää mixed-integer-pohjaista lineaarista optimointia. Työkalu kehitettiin käyttäen Microsoft Excel -ohjelmistoa, jossa lisäksi oli OpenSol- ver -lisäosa. Simulaatiotyökalu on kehitetty yhteistyössä yrityksen edustajien kanssa, tarkoituk- sena kehittää työkalu tuotannon suunnittelun tueksi. Mixed-integer optimointi valittiin mallin pohjaksi teoreettisen viitekehyksen, sekä empiirisen tutkimuksen pohjalta, kun huomattiin kriittiset tarpeet työkalun kehityksessä. Malli pyrkii parantamaan tonni -kohtaista katetta allo- koimalla tarvittavat tuotantomäärät tuottavammille aikakausille, samalla kun tuotannon muut tarpeet ja rajoitteet täytetään. Simulaation suorituskykyä testattiin vertailemalla työkalun eh- dottamia optimoituja tuotantosuunnitelmia yrityksen historiallisiin tuotantosuunnitelmiin ja niiden kannattavuuteen kolmen vuoden ajanjaksolla. Tulokset osoittavat, että esitetyllä mallilla on potentiaalia tuottavuuden parantamisen näkökulmasta. Esitetty simulaatiotyökalu itsessään tarvitsee lisää kehitystä, jotta se pystyisi huomioimaan kaikki tuotantoympäristölle ominaiset tekijät. Tutkielman tulosten perusteella annetaan ehdotukset jatkotutkimuksia varten, sekä ke- hitystarpeet suunnitteluun soveltuvan simulaatiotyökalun parantamiseksi. KEYWORDS: production planning, aggregate planning, linear programming, mixed-integer programming, optimisation 4 Contents 1 Introduction 6 1.1 Background 6 1.2 Case study: Ferrochrome production 6 1.3 Purpose 7 1.4 Delimitations 8 1.5 Research questions and objectives 8 1.6 Structure of the thesis 8 2 Operations management and production planning 9 2.1 Introduction to Operations management 9 2.2 Production management 10 2.3 Production systems and processes 11 2.4 Production planning 14 2.4.1 Strategic planning 14 2.4.2 Tactical / Aggregate planning 15 2.4.3 Operational planning and control 17 2.5 Operations planning and scheduling 18 2.6 Optimising productivity 19 2.7 Multi-product multi-period optimisation problem 20 2.8 Literature review of methodologies for optimising 22 2.8.1 Linear Programming 22 2.8.2 Dynamic Programming 23 2.8.3 Goal programming 23 2.8.4 Uncertainty and fuzziness in programming optimisation models DONE 24 2.8.5 Heuristic programming 25 2.8.6 Economic Production Quantity, EPQ and Economic Order Quantity, EOQ 26 3 Linear programming as optimisation tool 29 3.1 Introduction and basics of linear programming 29 3.2 Mixed-integer Linear Programming 32 3.3 Sensitivity analysis 34 5 3.4 Linear programming in production planning 35 3.5 Validity of linear programming and delimitations 47 4 Research Methods 48 4.1 Research methods 48 4.2 Research approach and strategy 49 4.3 Data collection and analysis 50 4.4 Reliability and Validity 51 4.5 Sensitive data 51 5 Empirical Analysis 52 5.1 Introduction and Background 52 5.2 Collection of historical data 52 5.3 Simulation tool 53 5.3.1 Background 53 5.3.2 Parameters and constraints 53 5.3.3 MILP -model 56 5.3.4 Excel -tool 59 5.4 Optimisation 61 5.5 Simulation results compared to historical data 62 5.6 Sensitivity analysis of key parameters 70 6 Conclusions 77 6.1 Best practices for optimising production planning 77 6.2 Reflecting literature methods with case example 77 6.3 Implementation of linear programming to case study 78 6.4 Factors influencing optimal profitability 80 6.5 Validity of results 81 6.6 For future research and development 81 7 Bibliography 84 6 1 Introduction 1.1 Background Optimisation is important aspect of business now and in the future. Efficient and contin- uously improving utilization of resources is crucial for business, but also for sustainable development and environment. Case organization Outokumpu is forerunner in sustain- able stainless-steel manufacturing, which requires sustainable resources and optimised production processes. To be able to keep development ongoing, new ways to improve ways of working should be sought and studied. In this thesis, we are seeking ways to improve tactical production planning processes – ways to improve forecasting and pro- duction planning for more efficient utilisation of resources. Due to macroeconomic chal- lenges and uncertainty in the world, the importance of preparation and planning has increased more than ever. Preparedness for different economic scenarios is indispensa- ble for both business and environment. I have previously studied process performance and measurement through performance metrics, which has deepened my interest in optimization. In this thesis, my goal is to explore quantitative methods to enhance efficiency and identify optimal solutions. I aim to develop models that are not only capable of delivering the best possible outcomes for the case organization but are also adaptable to various scenarios and industries. 1.2 Case study: Ferrochrome production This case study focuses on the ferrochrome production process at Outokumpu, with product types limited to lumpy products manufactured during the 2021–2023 period. Ferrochrome production relies on various raw materials, electricity, and coke. Upgraded chromite lumpy ores and fine chromite concentrate are transported from the Ou- tokumpu’s Kemi Mine to the ferrochrome works. Lumpy ores are directly used in the smelting process, while fine concentrate is pelletized with coke and bentonite. Ferrochrome is produced in submerged arc furnaces by smelting pellets, quartz, coke, and upgraded lumpy ores into liquid ferrochrome. The liquid ferrochrome is either 7 transported to steel melt shop as raw material of stainless steel or casted and crushed into lumpy form for external sales or internal use. Coke, used as a reductant in the smelt- ing process, is available in three grades: high, medium, and low, based on phosphorus concentration. Additionally, biocoke is employed for producing special "green" ferro- chrome. The different grades of coke vary in price and influence product characteristics and sales pricing. Coke and electricity represent the largest cost components in ferro- chrome production, playing a critical role in the optimization process. In addition to raw materials coke, bentonite, quartz, fine concentrate, and lumpy ores, subcontracting costs are included as variable costs. Subcontracting costs include trans- portation expenses between the Kemi Mine and Ferrochrome plant, as well as contract- related fees. Raw material requirements vary between product types, and these differ- ences are accounted for in the simulation tool described in subsequent chapters. All pa- rameter prices fluctuate on a monthly basis, creating opportunities for optimization. 1.3 Purpose Purpose of this study is to find how tactical production planning can be optimised in case organization based on literature review and empirical analysis. Aim is to develop simulation tool that helps in forecasting and planning future production and product portfolio by best profitability under certain restrictions set for production. When plan- ning seasonal and complex optimisation problems, simulation is often most effective forecasting tool. Best strategies for different scenarios can be found in by rerunning simulated scenarios with computer program (Nahmias, 2005). Theoretical framework is gathered from field of operations and production management, production planning and optimisation. Simulation tool based on most suitable methodologies is presented with analysis in this study. Objective is to form simulation tool that has capabilities to calculate optimal monthly production level for three different production lines, with current resources and restrictions in mind. 8 1.4 Delimitations This study will focus on planning the scope of ferrochrome production. Other functions such as procurement and sales are not in scope. However, if some information regarding empirical data collection requires collaboration with other functions, supporting infor- mation may be gathered, but solely to improve production planning. Inventories are not in scope. Optimisation will be done in four-month cycles, with scope of three years from 2021 to 2023. 1.5 Research questions and objectives 1. What methodologies and best practices have been shown to effectively optimise production planning processes in existing literature, particularly in terms of effi- ciency and profitability? 2. How can Linear Programming -based simulation be applied in the case organisa- tion to enhance production efficiency and profitability? 3. What factors influence optimal profitability in the case organisation, and how should production planning consider risks related to production variables? 4. How well suggested simulation tool performs compared to historical production planning, and how it should be developed further? 1.6 Structure of the thesis Chapters 2 and 3 will form the theoretical framework for this study. Chapter 4 will pre- sent the research methods used in this research. Chapter five will analyse empirical data with previously presented methodologies, and chapter six will present conclusions and recommendations for future research. 9 2 Operations management and production planning 2.1 Introduction to Operations management Krajewski et al. (2021) gives following definition for operations management: Operations management = the systematic design, direction, and control of pro- cesses that transform inputs into services and products for internal, as well as ex- ternal, customers. (Krajewski et al., 2021) Another way to define operations management according to Kumar & Suresh (2009) is to extend production management to include services management, whereas produc- tion management is described as set of interrelated management activities that are re- lated to produce certain product (Kumar & Suresh, 2009). Overall conception is, that operations management is crucial activity that defines how organisation can maintain its main processes that turn inputs into outputs. Term process is activity or series of activities that turn inputs into outputs. Processes should have objectives, inputs, outputs, activities, and resources defined, and preferably in measurable form. Input defines what is required for the process, activity what and how should be done, and output what is required from the product or service (ISO 9000, 2024). Objective of a process is to create additional value through activities for internal or external stakeholders. Process can be divided into manufacturing and service processes. In this study, we will focus on manufacturing processes. Manufacturing processes turn raw or already pro- cessed materials into products that can be stored, transported or further on refined in another manufacturing process. Distinctive characteristics for manufacturing process are e.g.: - Physical, durable output that can be inventoried. - Low customer interaction. - Long response times. - Capital intensive. (Krajewski et al, 2021) 10 Processes can be also divided based on their role within the organization. In this case three categories for processes can be named: management processes, main or core pro- cesses, and support processes. Management processes play significant role in decision making and include often processes such as planning, budgeting, and management of support and core processes. Main or also known as core processes are the core business processes of the organization. For manufacturing organization, manufacturing processes are the core processes. Support processes are crucial to successfully maintain the oper- ation of core processes but are not necessary the core business for the organization (von Rosing et al, 2014). An operation is an activity where resources are used partially or completely in one or more processes (Krajewski et al, 2021). Organisations have often multiple processes and operations linked together before product or service is finished and received by cus- tomer. These linked chains of processes are called supply chains. Supply chains may have multiple companies involved and further on companies can have multiple supply chains. To operate successfully, supply chain management is activity that seeks to ensure effi- cient flow of resources, activities, processes, and services within organisation’s supply chains (Krajewski et al, 2021). 2.2 Production management As mentioned in the operations management -chapter, production management is part of operations management focusing solely into production processes and all the activi- ties related to production function. Production management focuses on creating prod- ucts as planned, in schedule and with minimum cost. Kumar & Suresh (2009) in book Operations Management present four objectives of Production Management. These four objectives are, as presented in the book: 1. Right quality - the product should be fulfilling customer’s needs as well as tech- nical characteristics and with reasonable cost. 11 2. Right quantity – amount of product produces should meet the demand as well as possible. Excess amounts of inventories should be avoided due to higher stor- age costs while product shortage will mean losses in potential sales. 3. Right time – optimal usage of resources requires right timing in production. 4. Right manufacturing cost – actual manufacturing costs should be as close to pre- established standard cost as possible. Meaning that actual production cost should not overrun previously planned budget. (Kumar & Suresh, 2009) 2.3 Production systems and processes Picture 1 Schematic production system (Kumar & Suresh, 2009) Production system is the entirety of production function, including production processes and material flow. Every production function has an objective, every system transforms inputs into desired outputs, is connected to other functions to ensure data flow, and includes and feedback functions to improve the production system (Kumar & Suresh, 2009). Production systems are classified based on their production/operation volume and out- put/product variety. In the book by Kumar & Suresh, four classes of production systems are identified as, continuous production, mass production, batch production, and job- shop production. Continuous production has the largest production volume, and 12 smallest variety in products while job-shop production has the largest variety in products while production volumes are lowest (Kumar & Suresh, 2009). Krajewski et al. (2021) presents job process views for different manufacturing processes using same classification as Kumar & Suresh for production systems. These process types are determined with process choice structuring, based on level of customization, volume, divergency and line flows. Picture 2 Process Matrix for Manufacturing processes (Krajewski, et al. (2021) Above is the product-process matrix that represents different process characteristics based on different scenarios. Process type should be always determined to be best suitable for different case. Optimal process type makes best usage of resources and maximizes customer value. These are identical with previously mentioned production system types. Job process or job-shop production type is commonly used when level of customization and variety between products is high. Respectively volumes are low and often products are made to order. Process flows in job process can vary a lot, which re- quires competence and thorough process planning for every job. This type also requires 13 often large space requirements and inventories which increase cost requirements (Ku- mar & Suresh, 2009) (Krajewski;Malhotra;& Ritzman, 2021). Batch production type or batch process is step towards mass production from job processes by now having multi- ple batches that are being made often regular intervals, but still having limited volume. Batch production utilizes machinery and resources better than job production, as it can use some line flow and larger quantities. Batch production and processes share same limitations as job production, if not as severe (Krajewski;Malhotra;& Ritzman, 2021) (Ku- mar & Suresh, 2009). Mass production is associated with very large quantities of product that are manufac- tured in standardized production lines. Krajewski et al. (2021) uses line process -term for this process type. This type is between batch production and continuous production. Process steps are highly standardized. Production quantities are high, cycle times short and process inventories low compared to previous types of manufacturing. Production planning and controlling are relatively easy, material handling often automated. Due to high standardised and process step dependency on each other, changes can be challeng- ing to implement and line is vulnerable to breakdowns (Krajewski;Malhotra;& Ritzman, 2021) (Kumar & Suresh, 2009). Continuous production is completely standardised, and the facilities are built to follow certain sequence of production flow and operations. Products or items will be following standardized process flows, from beginning to finished product. This type of production has the highest level of volume, and lowest level of variability. Material handling is auto- mated, unit cost lowest of the production types. Due to high level of standardization and possibly automation, changes and differentiations to products are difficult to implement if impossible (Kumar & Suresh, 2009) (Krajewski;Malhotra;& Ritzman, 2021). Case or- ganization of this research utilizes continuous production processes in production. Therefore, it is important to forecast and plan production well ahead before possible implementation due to high number of preparations. 14 2.4 Production planning Production planning can be divided into three categories based on their level of involve- ment in the production process and time frame. Characteristics and aspects can overlap between these dimensions, especially between strategical and tactical planning and vice versa. 2.4.1 Strategic planning Highest level of planning with a time frame often multiple year, and at least one year. Strategical planning seeks to set high objectives for upcoming years and what kind of plan should be adhered to. Strategic planning involves both top-down and bottom-up reflection – high-level strategies based on market demand and set goals of higher man- agement are put into practice, while operational findings are used to improve goals and strategy. Strategic planning gives the framework for tactical and operational planning to operate in (Slack & Lewis, Operations Strategy. Available from: VitalSource Bookshelf, (6th Edition), 2019). Strategical planning strives to form objectives based on market demand and set the strat- egy of the organization. The successful strategy seeks to find those competitive factors that improve the competitiveness of the organization and what performance objectives help to measure these factors. Slack et al. (2010) gives examples of competitive factors that should be considered in strategic planning. 15 Figure 1 Competitive factors in Strategic planning (Slack et al. 2010) Three factors pictured above determine how a change in performance can increase or decrease competitive benefits. Performance in order-winning factors is directly related to competitive advantage. With qualifying factors, change in competitiveness is big in certain performance levels, but minor after that level has been surpassed. Less im- portant factors have a lower relation from performance improvements to competitive- ness, and therefore as named, should not play as important role as the previous two factors (Slack;Chambers;& Johnston, Operations management (6th edition), 2010). Ex- amples of order-winning factors can be quality, price, service etc. Qualifying factors can be certain qualifications or certifications, for example low carbon dioxide footprint of a product. Strategic production planning should determine goals and focus areas, where an organization can achieve the highest possible competitive efficiency. 2.4.2 Tactical / Aggregate planning Capacity and inventory management are the focus areas in tactical production planning while implementing strategic objectives and production plans into practice. Optimising and improving tactical decisions lead to better resource utilization and improved com- petitiveness. Tactical planning connects strategical top-level plans to operative bottom- level details. Key themes for tactical planning are capacity planning, inventory manage- ment and master scheduling. Aggregate planning is another term often used for tacti- cal planning (Waters, 2003). Nahmias (2005) describes aggregate planning as follows: 16 “To develop techniques for aggregating units of production and determining suit- able production levels and workforce levels based on predicted demand for ag- gregate units” (Nahmias, 2005). The key problem related to aggregate planning is to seek the optimal level of quantity and mix of different products that manufacturing firms should have. Also known as macro production planning, the aggregate planning process should always start with de- mand or forecast. Forecasts can and will vary from actual demand, and therefore aggre- gate planning is based on the best possible assumption for future demand. Ability to adjust production planning to fluctuations in demand or forecast is one competitive ob- jective that tactical & aggregate planning strives to improve. Changes in demand can lead to challenges regarding workforce – low demand may result to lay-offs while having too large workforce leads to increasing inventories and increased inventory-related costs. Having an optimal stable workforce can be seen as a second competitive objective. Third competitive objective is optimising the production plan where company can maximize profit from production, while limited by different constraints and capacity restrictions (Nahmias, 2005). This third competitive objective is the goal of this thesis case study. Capacity management is another part of tactical production planning. Capacity is a term that describes the maximum rate of output from a production line, system, or process. Capacity should be adjusted and controlled based on the demand of the production and abilities of the company. Too high capacity can lead to excess inventories that further lead to high inventory costs and other liabilities. Too low capacity where demand sur- passes supply, the company loses the opportunity for extra sales (Krajewski;Malhotra;& Ritzman, 2021). Capacity management consists of capacity planning and Constraint man- agement. Capacity planning can be viewed as long-term planning while constraint man- agement is more focused in short-term challenges (Krajewski;Malhotra;& Ritzman, 2021). Constraint management seeks to prevent and mitigate possible bottlenecks that can decrease or even stop normal production processes. However, constraints always exist, and therefore should be an important part of the planning process. 17 Capacity management can be part of both tactical and production planning. Large, long- term investments regarding expansions in production capacity and production strategy are common with strategic production planning. Mid-term capacity management such as optimising capacity usage and timing production are common with tactical planning. Figure 2 Capacity management (Krajewski et al. 2021) 2.4.3 Operational planning and control Operational production planning is about planning and controlling production in a short time frame from hours and days to months. Planning and controlling activities are done with different time horizons in scope, which affects to the activities. 18 Figure 3 Significance of planning or control (Nigel et al. 2010) The figure above presents the relation of time horizon with planning & control. In oper- ative planning, importance of control plays in major role, since the activities and results are viewed in shorter time frame (Slack;Chambers;& Johnston, Operations management (6th edition), 2010). Operative production planning focuses on daily production activi- ties, implementing production plans and schedules into practice. 2.5 Operations planning and scheduling Sales and operations plan (S&OP) seeks to find optimal use of resources that ensure bal- ance between supply and demand. It consists of sales plan that seeks to forecast future demand for products or services and operations plan that consists of constraint manage- ment and operations strategy. S&OP is adjusted based on long term business strategy and shorter business plan that should be set at least for the oncoming year. S&OP plan determines product mixes, inventory levels, and production capacities and other 19 relevant information that will build the framework for production (Krajewski;Malhotra;& Ritzman, 2021). Krajewski et al. (2021) presents Sales and operations planning as the first level of opera- tions planning and scheduling. Second level is resource planning, which specifies use of resources and capabilities to as far as product level descriptions of required materials and capacities. Where S&OP plan has determined what product categories production should focus on based on demand forecasts and other drivers, resource planning seeks to present requirements of resources, production times, and other needs from whole product categories to individual products. Third level is the scheduling itself, which divides resources plan into operational pro- cesses and activities that must take place efficiently and meet the requirements set in S&OP plan. Scheduling seeks to find optimal level of production, which takes constraints and bottlenecks into account. 2.6 Optimising productivity In this chapter, objective is to investigate, what optimising production planning means, and what are currently known methodologies that aim to improve production planning processes. This paper seeks to find methods that help especially tactical / aggregate planning, while at least partly excluding role of workforce and inventories. Goal is to op- timise input to output ratio and use of resources in production planning. Productivity = The value of outputs (services and products) produced divided by the values of input resources (wages, cost of equipment, etc.) (Krajewski et al, 2021) The core definition of productivity is mentioned in the quote above, but productivity can be measured in many ways depending on the situation and setting. As an example, units per certain time frame or value of certain number of inputs are ways to calculate produc- tivity. 20 Based on the book Operations Management by Kumar & Suresh, productivity can be viewed as an ability to utilize resources in production. Productivity can be improved in three ways that are: 1. Improving control of inputs. 2. Improving process efficiency. 3. Improving used technology. (Kumar & Suresh, 2009) When seeking opportunities for productivity improvement, productivity analysis should be conducted first. Four different types of productivity analysis can be utilized. Trend analysis compares organizational productivity over a certain period. Horizontal analysis compares case organization with relevant peer companies. Vertical analysis uses com- parison with other industries and organizations of different scales. The last productivity analysis type is budgetary analysis, which uses previously mentioned analysis types in setting certain benchmarks or goals for productivity. After setting goals, budgetary anal- ysis seeks suitable ways and strategies that help to achieve these goals (Kumar & Suresh, 2009). In this case study, we are seeking efficiency in production planning, meaning the objective is to maximize profit for finished output under certain restrictions, resources, and constraints. 2.7 Multi-product multi-period optimisation problem The case optimisation problem presented in this paper involves a traditional multi-prod- uct, multi-period aggregate production plan, where we seek to maximize profit under certain constraints and capacities. Multi-product multi-period (MPMP) production is a process where multiple products are produced over a certain period. As in aggregate production planning theory suggests, the objective is to balance capacity to match de- mand, with a different mix of products (Vollman;Berry;Whybark;& Jacobs, 2005). Optimisation will be based on demand. Demand is based on Master Production Sched- uling. Master Production Schedule (MPS) determines the production plan for different products over a time frame. Below is the aggregate plan and MPS example, published in Operations Management by Kumar et al. (2009). 21 Figure 4 Aggregate plan and Master Production Schedule (Kumar et al. 2009) In MPMP production, inventory and lot sizing will affect to productivity and optimisation. Lot size or production capacity will determine the size of batches the company can provide. Optimising lot size and inventory helps to reduce inventory and holding costs, while providing enough supply to fulfil market demand. Multi-period optimisation seeks to find correct lot sizes and inventory levels while considering optimal safety stocks and fluctuating market environment (Nahmias, 2005). This paper acknowledges the im- portance of lot sizing and inventory management; however, these aspects are beyond the scope of this study as they are more relevant to strategic-level production planning. Variability and Uncertainty management is an area in MPMP production, which focuses on fluctuations in market demand and variation in production processes. Variability in production or demand forecast is common and can cause challenges for companies due to cost increases or missed supply opportunities. These risks can be mitigated with tech- niques such as safety stock calculations, improving flexibility and adjustment of produc- tion factors (Hopp & Spearman, 2008). As previously mentioned, Scheduling and Control play a role in multi-product multi-pe- riod problems as well. While optimising production, product mix with different demands, requirements and production times must be considered. Depending on the setting and situation, different algorithms and methods can be used to optimise the best possible fit 22 for scheduling & controlling optimisation problems. Hillier & Lieberman suggest Linear Programming as a tool for formulating these optimisation problems. Different spread- sheet models can be used to model these problems, Excel Solver for example (Hillier & Lieberman, Introduction to Operations Research (9th edition), 2010). 2.8 Literature review of methodologies for optimising A study by Nam & Logendran (1992) conducted a literature review including 140 journal articles and 14 books to form a summary of best methods used in aggregate production planning. Most mentioned methodologies included Linear Programming (LP), Goal Pro- gramming (GP), Linear Decision Rule (LDR) and Simulation models (Nam & Logendran, 1992). 2.8.1 Linear Programming Linear programming is a widely used mathematical approach for solving production al- location problems in environments with limited resources and defined constraints (Metei & Jain, 2019). This methodology is particularly well-suited for organizations that produce or refine specific products from a defined set of input resources. The ability to optimize the transformation of inputs into outputs provides a competitive advantage in dynamic and challenging markets. The case organization serves as an example of a com- pany that refines raw materials into a targeted mix of products, while operating under constraints such as limited availability of critical resources like coke and high resource costs. These challenges make profitable production across the entire production plan more complex and underscore the need for optimization. Restrictions and constraints are set in forms of equations and inequalities, while all of them being in linear relationship with each other. Linear programming problem can ei- ther minimize or maximize objective function while simultaneously fulfilling set re- strictions and constraints. When mathematically seeking to solve maximization or mini- mization problem under certain restrictions, it is called optimisation problem (Metei & Jain, 2019). Linear programming is effective tool when optimising allocation problems with multiple products and periods due to its characteristics of mathematically seeking minimization or maximization solutions while satisfying often complex constraints and 23 restrictions (Hillier & Lieberman, Introduction to Operations Research (9th edition), 2010). Linear programming uses simplex method and can solve large problems efficiently due to linearity of variables (Nahmias, 2005). Linear programming in simplest for mused linear variables. However, sometimes integer or binary variables are required to simulate more complicated aspects. When linear programming model involves multiple different variables, model is called mixed-integer linear programming, MILP. More of linear pro- gramming in chapter 4. 2.8.2 Dynamic Programming Dynamic programming is method used to solve complex, multi-stage decision problems where the issue at hand is divided into different sub-problems. Each sub-problem is solved either by top-down or bottom-up, depending on how the solving process will be conducted. Top-down technique starts the solving process with the main problem and moves to sub-problems if they are encountered. Bottom-up technique is the opposite – sub-problems are solved starting from the smallest and moving into bigger and bigger sub-problems until the main issue is solved (Sniedovich, 2010). Dynamic programming can be efficient tool for small but complex programming problems with ability to restrict redundant work and recursive solutions. Splitting main issue to multiple sub-problems, may lead to curse of dimensionality, where solving main issue becomes overly compli- cated to solve efficiently due large number of sub-problems. 2.8.3 Goal programming Goal programming, GP is a multi-objective programming technique based on linear pro- gramming, involving multiple objectives. Where linear programming focuses on solving one objective function, goal programming seeks to satisfy multiple objectives. Concept of GP is to find solution where multiple, often conflicting objectives, are satisfied based on pre-set goals, as well as possible. Goal programming seeks to find feasible solutions based on goals, rather than seeking absolute maximum or minimum for objective func- tions. Different GP techniques include e.g. pareto efficiency detection & realisation, nor- malisation and redundancy checking (Mehrdad;Jones;& Romero, 1998). Goal program- ming algorithms are based on two different methods, weights method and pre-emptive 24 method. The weights method is using single objective function which is the weighted sum of the goals of sub-problems that algorithm seeks to solve. The pre-emptive method optimises one goal at a time, in order of their priority to the main issue (Taha, 2017, p. 349-355). GP is one of the most popular techniques in multi-criteria decision-making category, but not always the most suitable as on its own. GP is best suitable for produc- tion planning when optimisation includes many conflicting objectives that require bal- ance, e.g. when seeking to balance production line volumes, prioritizing production re- quirements or minimising deviations. Goal programming involves prioritizing with weights which can increase subjectivity. GP can be used to seek best all-around solution to scenario where achieving every goal is not achievable. 2.8.4 Uncertainty and fuzziness in programming optimisation models DONE In real-world decision-making, goals and parameters are often not clear-cut or determin- istic, which brings the concept of "fuzziness" into relevance. Fuzziness in optimization refers to handling uncertainties that arise from imprecise data or ambiguous objectives, making it particularly important for goal programming (GP). Traditional goal program- ming, which operates based on well-defined goals, can struggle with uncertainties, lead- ing to the development of Fuzzy Goal Programming (FGP). FGP is a variant of GP that incorporates fuzzy sets, membership functions, and weights, allowing for a broader range of acceptable solutions. As highlighted in an overview by Aouni et al. (2009), FGP requires compromises from the decision-maker, as it cannot simultaneously optimize all conflicting objectives. Instead, it provides the most satisfying solution based on the de- cision-maker’s preferences, though it may not always achieve pareto efficiency (Aouni, Martel, & Hassaine, 2009). Possibilistic Linear Programming (PLP) is another approach to fuzzy optimization, specifically designed to manage uncertainties by using fuzzy values instead of precise data. Unlike deterministic linear programming, which assumes certain values for inputs, PLP represents uncertain parameters, like demand forecasts or pro- duction capacities, as fuzzy numbers, or ranges rather than single, fixed values. This ap- proach is beneficial in complex environments where key data is imprecise or fluctuates due to unpredictable factors. PLP is rooted in fuzzy set theory, as developed by (Zadeh, 1978), and possibilistic theory, which allows uncertain values to be represented through 25 possibility distributions. In applications such as production planning, PLP has been shown to be effective for handling fuzzy parameters like forecast demand, capacity, and cost, which are rarely known with certainty (Wang & Liang, 2005). In this framework, PLP models often aim to minimize costs while balancing other goals, like minimizing inven- tory and labour fluctuations. The model seeks a compromise solution that minimizes the most likely total costs, maximizes the chance of achieving lower costs, and reduces the risk of higher costs (Inuiguchi & Ramik, 2000) (Wang & Liang, 2005). The ability to incorporate fuzziness allows PLP and FGP models to be more flexible and adaptable, enabling decision-makers to achieve practical, robust solutions under uncer- tain conditions. In contrast to deterministic models, which may offer mathematically op- timal solutions based on exact inputs, fuzzy optimization approaches like PLP provide a structured way to address imprecision in real-world scenarios. These models require de- cision-makers to interpret and adjust fuzzy constraints and objectives, balancing be- tween flexibility and accuracy. Ultimately, PLP and FGP offer robust frameworks for op- timizing in environments where uncertainty and variability are inevitable, enabling more realistic and adaptable decision-making. 2.8.5 Heuristic programming Heuristic programming is employed when other algorithms are not applicable to solve complex problems or would require excessive number of resources. Heuristic program- ming uses simple, practical direct search techniques to find approximate solutions for problems. Solutions are not optimal but should be reasonable for more efficient ways of simulating. Heuristic techniques encompass methods such as greedy algorithms, local search, and metaheuristics. Greedy algorithms are simple, rule-based approaches that make the locally optimal choice at each step in hopes of finding a global optimum. How- ever, they do not always guarantee the best solution, especially in complex problems. Local search algorithms begin with a random feasible solution and iteratively improve it by making small changes within the neighbourhood of the current solution. The process continues until no further improvements can be made. Local search is effective for find- ing good solutions quickly but has the limitation of potentially getting stuck in local 26 optima, as it only focuses on incremental improvements within a small region of the solution space. Metaheuristics provide a higher-level framework for escaping local optima and exploring a broader solution space. They begin from one or several locally optimal points and allow for controlled exploration of the solution space, sometimes accepting slightly worse so- lutions temporarily to explore new regions. This helps avoid the trap of local optima. For example, Tabu Search is a widely used metaheuristic that tracks solutions already ex- plored and labels them as "tabu" to prevent revisiting them. This avoids cycling back to previously discarded solutions and ensures that the search moves forward (Taha, 2017, p. 397-403). According to Hamdy Taha's Operations Research: An Introduction, these methods are critical for solving complex, large-scale optimization problems where exact methods like Linear Programming or Mixed-Integer Programming become computationally infeasible. Metaheuristics, such as Simulated Annealing and Genetic Algorithms, extend the basic concepts of local search by introducing randomness and diversification strategies to avoid local traps and search the global solution space more effectively. These techniques are particularly valuable in production planning problems, where multiple products, re- sources, and constraints need to be managed simultaneously across large time horizons (Taha, 2017, p. 404-413). 2.8.6 Economic Production Quantity, EPQ and Economic Order Quantity, EOQ To further add methodologies to aggregate planning and production planning theme, even though inventory control is not in main focus in this thesis, Economic Production Quantity, EPQ and Economic Order Quantity, EOQ are used to optimise production levels and holding stock. Economic Order Quantity, EOQ is used to optimise costs related to holding stock. EOQ modelling involves seeking balance between holding larger inventories with less fre- quent replenishments or vice versa. Total cost is calculated as addition of holding cost and ordering cost. Following formulas are taken from book Operations Management (6th Ed) by Nigel Slack (2010). 27 Holding costs = holding cost per unit * average inventory 𝐻𝑜𝑙𝑑𝑖𝑛𝑔 𝑐𝑜𝑠𝑡𝑠 = 𝐶ℎ ∗ 𝑄 2 Ordering costs = Ordering costs * Demand during period 𝑂𝑟𝑑𝑒𝑟𝑖𝑛𝑔 𝑐𝑜𝑠𝑡𝑠 = 𝐶𝑜 ∗ 𝐷 𝑄 𝑇𝑜𝑡𝑎𝑙 𝑐𝑜𝑠𝑡 𝐶𝑖 = 𝐶ℎ𝑄 2 + 𝐶𝑜𝐷 𝑄 Total cost formula can be used in table form to seek optimal order size for scenario. Al- ternatively, one can use EOQ formula to seek needed solution. EOQ formula: 𝐸𝑂𝑄 = √ 2𝐶𝑜𝐷 𝐶ℎ Where: 𝐶𝑜= order cost per unit, 𝐷 = demand rate during period, 𝐶ℎ = holding cost per unit Time between orders would now be determined as 𝐸𝑂𝑄 𝐷 and order frequency as 𝐷 𝐸𝑂𝑄 (Slack et al. 2010 p. 349-354). EOQ is closely related to production techniques which determines which values are most suitable for certain scenarios. Just in time, JIT as an example is philosophy that seeks to minimise inventories and avoiding excess amounts of work-in-process inventories (Nahmias, 2005). When implementing EOQ, it should be always thoroughly planned to suit strategical and tactical production needs and suitable techniques. To suit better needs of production planning in terms of optimising production lot sizes, Economical Production Quantity, EPQ is needed. EPQ or depending on the source often referred as a lot size model, is used to determine optimal method for production n num- ber of products. EPQ model as follows: 𝐸𝑃𝑄 = √ 2𝐶𝑠𝐷 𝐶ℎ ∗ 𝑃 𝑃 − 𝐷 Where: 28 𝐶𝑜= order cost per unit, 𝐷 = demand rate during period, 𝐶ℎ = holding cost per unit, 𝐶𝑠 = setup cost per production run, 𝑃 = production rate during period, , 𝑃 − 𝐷 = rate of in- ventory build-up (Nahmias, 2005). EOQ and EPQ are essential techniques for optimizing inventory and production levels. While they are valuable for modelling lot sizes and scal- ing production, they are often most effective when used in combination with other com- plementary methodologies. 29 3 Linear programming as optimisation tool 3.1 Introduction and basics of linear programming Linear programming is mathematical method that is used when goal is to maximize or minimise a linear function with n variables subject to m constraints. Linear programming is versatile method that can be used to solve broad number of real problems that include e.g. scheduling of personnel, blending problems, inventory control and production plan- ning, distribution and logistics problems, and assignment problems (Nahmias, 2005). Linear programming models are presented as linear programming problems (LPP). Gen- eral LPP can be expressed as shown below (Metei & Jain, 2019). 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑜𝑟 𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑐1𝑥1 + 𝑐2𝑥2 + ⋯ + 𝑐𝑛𝑥𝑛 (Linear Objective function) (1) Subject to the constraints 𝑎11𝑥1 + 𝑎12𝑥2 + ⋯ + 𝑎1𝑛𝑥𝑛(≤, =, ≥)𝑏1 (2) 𝑎21𝑥1 + 𝑎22𝑥2 + ⋯ + 𝑎2𝑛𝑥𝑛(≤, =, ≥)𝑏2 (3) . . . 𝑎𝑖1𝑥1 + 𝑎𝑖2𝑥2 + ⋯ + 𝑎𝑖𝑛𝑥𝑛(≤, =, ≥)𝑏𝑖 (4) . . . 𝑎𝑚1𝑥1 + 𝑎𝑚2𝑥2 + ⋯ + 𝑎𝑚𝑛𝑥𝑛(≤, =, ≥)𝑏𝑚 (5) 𝑥1, 𝑥2, … , 𝑥𝑛 ≥ 0 (Non-negative restriction) (6) In the formula, row (1) presents the objective function, and variables 𝑎𝑖𝑗 , 𝑏𝑖, 𝑐𝑗 where 𝑖 = 1, 2, … , 𝑚, 𝑗 = 1,2, … , 𝑛 are linear constraints. 𝑐1, 𝑐2, … , 𝑐𝑛 present the cost coefficients or unit profits of 𝑥1, 𝑥2, … 𝑥𝑛 -variables. Constraints, linear equalities or inequalities (rows 2-5) restrict the optimisation with realities that can be as an example, 30 available resources. Row (6) presents non-negative restriction, which checks that all values are positive. (Metei & Jain, 2019). To simplify, each inequality or equality formula is 𝑖𝑡ℎ functional constraint where 𝑏𝑖 is the maximum amount of available resource, 𝑎𝑖𝑗is coefficient of 𝑥𝑗 and presents the amount of used resource by each unit of activity j. As an example, Z can present maximum profit, which is led from amount of production units 𝑥𝑛 times profit per unit, 𝑐𝑛. If we have three products with profit per unit (𝑐𝑖) being 1 for product 𝑥1, 2 for product 𝑥2 and 2.5 for product 𝑥3, linear objective function would be as follows.: 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑥1 + 2𝑥2 + 2.5𝑥3 (7) Now, to produce products 𝑥𝑖, resources such as coke and concentrate are required. Ex- ample of constraints for coke and concentrate would be as follows. If coke consumption for finished unit of product 𝑥1 is 0.3, for product 𝑥2 is 0.25 and for product 𝑥3 is 0.40, while maximum amount of coke available is 500, constraint can be formalized as below (8): 0.3𝑥1 + 0.25𝑥2 + 0.4𝑥3 ≤ 500 (8) Constraint for concentrate would follow same formulation. If we assume that con- sumption for concentrate per finished unit of product 𝑥1 is 0.34, for product 𝑥2 is 0.5 and for product 𝑥3 is 0.6, formula would be as follows: (9): 0.34𝑥1 + 0.5𝑥2 + 0.6𝑥3 ≤ 1000 (9) Complete LP model of the previous examples would be as follows (10): 31 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑥1 + 2𝑥2 + 2.5𝑥3 (10) Subject to 0.3𝑥1 + 0.25𝑥2 + 0.4𝑥3 ≤ 500 0.34𝑥1 + 0.5𝑥2 + 0.6𝑥3 ≤ 1000 𝑥1, 𝑥2, 𝑥3 ≥ 0 Examples above are simplified for the sake of introducing basics of linear programming. Real-world cases require often more complex models that can include large sets of con- straints and variables. However, these principles still hold. When implementing linear programming methods into real-world scenarios, certain as- sumptions must be made. According to Metei & Jain (2019), following assumptions are when implementing linear programming approach. 1. Certainty – all parameters must be known before simulation can be done. This includes objective function, constraints and coefficients and resources. 2. Linearity – all variables of the LP model must have exponent of one. Meaning that relationship between all variables must be linear. To clarify linearity aspect, Metei & Jain presents three properties for linearity. a. Proportionality of objective function and decision variable values. Value of objective function is directly related to objective functions and vice versa. b. Relationship of values is additive. Value of objective function variable is additive to constraint variables. If objective function variable is 2.5 𝑥3 and 𝑥1 = 2, contribution is 5. c. Divisibility. In theory, variables can have decimal or fractional continuous values, but this is not often practical in real cases. When implementing to real-world case, variables should be rounded to integer values, or 32 whichever is most relevant for scenario. Nevertheless, it should be acknowledged that rounding may have impact to optimality. (Metei & Jain, 2019). The example (11) presented a basic version of product mix resource allocation problem, where we want to maximise, the objective function representing sales profit, by choos- ing what products and how much should be produced while restricted by the resources available. Available resources are presented on the right-hand side of the equation sym- bol, or 𝑏𝑚. Left-hand side, 𝑎𝑚𝑛𝑥𝑛, of the equation symbol presents the amount of usage of that resource (Hiller & Liebermann, 2015, p.28-29). 3.2 Mixed-integer Linear Programming Mixed-integer linear programming, MILP, is variant of linear programming apart from including at least one integer variable. Integer variables are implemented to traditional LP-model with additional constraints that accept only integer values (Hillier & Lieber- mann, 2015, p. 474-476). Integer variables are often required when simulating problems that involve workforce, production, or binary variables that can only be expressed as integers. To acknowledge, MILP -models include integer and continuous variables. However, pure integer programming can be used where only integer variables are allowed. When only binary integer variables are allowed, binary integer programming, BIP, is used where var- iables can only get values 1 or 0. Binary integer programming can be used e.g. when programming mutually exclusive investment decisions where investment must meet re- quirements to be carried out (Hillier & Liebermann, 2015, p. 474-476). Below is example of Mixed integer variable model. Model will be used to check that pro- duction line produces only one product per day in this scenario. 𝑗 presents days, and 𝑖 presents if product is produced. We expect that production of one product takes one day, and therefore only one product can be produced per day. We use the previous LP-model (11) with modifications that optimise production for three-day period. 33 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = ∑(𝑥1𝑗 + 2𝑥2𝑗 + 2.5𝑥3𝑗) 3 𝑗=1 (12) Subject to 𝑥1𝑗 + 𝑥2𝑗 + 𝑥3𝑗 = 1𝑓𝑜𝑟 𝑗 = 1,2,3 0.3𝑥1 + 0.25𝑥2 + 0.4𝑥3 ≤ 500 𝑓𝑜𝑟 𝑗 = 1,2,3 0.34𝑥1 + 0.5𝑥2 + 0.6𝑥3 ≤ 1000 𝑓𝑜𝑟 𝑗 = 1,2,3 and 𝑥𝑖𝑗 ∈ {0,1} 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = 1,2,3 𝑎𝑛𝑑 𝑗 = 1,2,3 When working with mixed-integer models, convexity becomes a critical consideration, as it significantly influences the ability to efficiently optimize solutions. Basic linear pro- gramming -models are often convex models, meaning that all constraints in model are linear and most distinctly, all points within the feasibility region can be connected to each other with straight lines. Non-convex models have non-linear constraints or objec- tives, such as binary constraints that lead to disjoint feasible region. Figure 5 illustrates examples of convex and non-convex functions. The line segment A−B lies within the fea- sible region of the convex function, showing that any line segment between two points in this region remains within the feasible space. In contrast, the line segment C−D crosses outside the feasible region of the non-convex function, demonstrating non-convexity, where not all line segments between points on the curve remain within the region. The MILP model used in this thesis, as presented in Chapter 5, is linear in its relaxed form but includes binary constraints. In its relaxed state—without the binary constraints de- pendent on variable values—the model can be classified as convex. However, the inclu- sion of binary variables, which restrict production to one product per production line, renders the model non-convex. This is because specific parameter values can trigger the 34 binary constraints, deviating from the full linearity of the model. Figure 5 Feasible region of convex vs non-convex function 3.3 Sensitivity analysis After optimised results have been given from the simulation, it should be noted that the results are always based on estimates that rely on assumptions presented in previous chapter. Sensitivity analysis is used to calculate how result would vary if certain param- eter values were changed. As a result of sensitivity analysis, sensitivity parameters can be determined. Sensitivity parameters are parameter values that cannot be changed without changing the optimal solution. For coefficients that are not directly sensitive, it can be also beneficial to seek ranges, where objective function starts to change. Hillier & Liebermann (2015) describes the range where left-hand side coefficient can change value without affecting the objective function, allowable range of coefficient. When de- termining same range for functional constraints, it is called allowable range for the right- hand side. When constraint variables of the right-hand side are sensitive meaning that change in values lead to change in optimal solution or often price, term shadow price becomes relevant. Shadow price is used to describe the value of additional resource 35 used in the optimisation. It can be also described as what would be the new price if the number of resources would be increased by one unit (Hillier & Liebermann, 2015, p.226). Nahmias (2005) presents definition of shadow price “as the improvement in the objec- tive function realized by adding one additional unit of a resource” (Nahmias, 2005, p.172). Shadow price can be used to determine e.g., how beneficial some expansions or addi- tional resources could be in terms of profit generation in theory. A certain shadow price is only valid in the allowable range for right-hand side, meaning that when constraint variable changes enough to affect to objective function, a shadow price will also change. Important factor regarding sensitivity analysis is, that when optimising with integer pro- gramming -based models that include binary variables, conducting sensitivity analysis must be made manually since the effect of binary variables to the optimal solution is not linear, and therefore cannot be calculated seamlessly. 3.4 Linear programming in production planning How Linear Programming has been implemented in relevant production planning appli- cations. Nahmias (2005) states in book Production and Operations Analytics that general linear programming methods are valid and sufficient for most real-world problems production planning problems. However, special tailored versions can be faster for certain large- scale scenarios that may include non-linear characteristics such as economies of scale in production (Nahmias, 2005, p.130-131). Belil et al. (2018), in their research paper titled "MILP-based Approach to Mid-term Pro- duction Planning of Batch Manufacturing Environment Producing Bulk Products," exam- ined how mixed-integer linear programming (MILP) methods can optimize bulk produc- tion planning. The study addresses a production planning problem involving multiple continuous manufacturing units, focusing on a weighted bi-objective: maximizing de- mand satisfaction while minimizing inventory levels. The key components of the analysis are: (1) a set of products, each with unique variants and demand patterns; (2) a manu- facturing system comprised of multiple facilities, each with specific capacity constraints; (3) a material handling process featuring a multi-line pipeline for transporting finished 36 goods to distribution points; and (4) a distribution facility capable of fulfilling end-cus- tomer deliveries (Belil;Kemmoé-Tchomté;& Tchernev, 2018). Each manufacturing line has the ability to produce various products, but certain lines are tailored to specific product requirements. Safety stock is maintained in inventory based on the characteristics of the product and fluctuating demand. Additionally, the demand for each product is time-specific, varying over the planning periods, and each manufac- turing line operates under its own capacity limits (Belil;Kemmoé-Tchomté;& Tchernev, 2018). Problem is modelled as a combinatorial optimisation problem where different scenarios are optimised in contrast to objective function. Since the process varies between prod- uct families, model was presented in the form of directed graph G = (N, A) where N pre- sents set of nodes, and A is set of arcs. Nodes present different subsets of modelling e.g. manufacturing lines, inventories, distribution processes. Arcs present different subsets that are moving between nodes, e.g. subset transporting from manufacturing line to transport conveyor. Indexes of the model involves i and j indexes for nodes and arcs, index for period, products, and storage place. Parameters included e.g. product families, binary parameters that check if production line can produce certain product, maximum daily capacities of arc, demand for product P at time T, minimum quantity by production line and multiple capacity and binary variables that check if product is produced and transferred through all of the nodes during certain period. Model used real-world historical data of demand and real values of capacities. Planning horizon was two weeks divided into fourteen planning periods. Fourteen product vari- ants were included, produced by six production lines (Belil;Kemmoé-Tchomté;& Tcher- nev, 2018). To simplify the MILP-model used in the study by Belil et al., model sought to maximise demand satisfaction rate of product P during period T. Constraints were mainly capacity constraints that checked that flow of products does not exceed capacities of process steps. Optimisation was done using IBM's Cplex. 37 Figure 6 Results of MILP optimisation in study by Belil et al. 2018 Results of the optimisation were following; average demand satisfaction rate was 92.1% while manufacturing line utilisation was 89.5% (Figure 5). Figure 7 Results of MILP optimisation in study by Belil et al. 2018 Further on results (Figure 6) suggest that to match demand of period 2 and 3, first period requires excess amounts of inventories. Figure 8 Results of MILP optimisation in study by Belil et al. 2018 38 Figure 7 shows the change in inventory levels across periods. Belil at al. states that pro- posed model is promising in analysing trade-offs between production and inventory level (Belil;Kemmoé-Tchomté;& Tchernev, 2018). Conclusions of the study states that MILP is valid tool in tactical production planning and able to solve real size optimisation problems related to multi facility production, inven- tory, and distribution system in reasonable time. Additionally, model provides room for development in terms of additional periods and products. For future work, researchers suggest improving decision making tool for tactical planning which takes demand uncer- tainty into account (Belil;Kemmoé-Tchomté;& Tchernev, 2018). Letelier et al. (2020) studied how a mixed-integer programming (MIP) approach can im- prove production scheduling for strategic open-pit mine planning. The research problem involved scheduling decisions on which blocks to extract, when to extract them, and whether they should be processed, all aiming to maximize the net present value of the materials. This problem was unique due to the exceptionally large datasets involved, ranging from 20,000 to 5,000,000 blocks over 20 to 50 time periods. Traditional mixed- integer linear programming (MILP) models are not efficient for datasets of this magni- tude. To address this large-scale scheduling problem, the researchers developed several meth- ods, including preprocessing (eliminating variables that do not appear in the optimal so- lution), cutting planes (adding constraints to limit the feasible region), and modified heu- ristic methods (Letelier et al., 2020). Cutting plane techniques enhanced the efficiency of both relaxed and heuristic solutions in approaching the optimal solution. The study demonstrated ways to optimize larger datasets using various techniques and heuristic models. It also proved that with thorough modelling, heuristic methods can achieve so- lutions relatively close to the optimal with better efficiency. Another approach to heuristic MILP models was presented by Tonelli et al. (2013) in their research paper "Production Planning of Mixed-Model Assembly Lines: A Heuristic Mixed Integer Programming-Based Approach." The paper highlights the importance of flexibil- ity and the capability to implement tactical and operational production planning tech- niques into master scheduling methods. The researchers proposed a MILP-based 39 approach to introduce more flexibility into master scheduling by considering due date setting, capacity sequencing, and production sequencing, allowing different production lines to produce various product variants. The case study focused on an assembly factory producing a high volume and variety of agricultural machinery. The goal was to integrate a MILP model into an Advanced Plan- ning System (APS) to enhance production planning flexibility. According to the research- ers, the APS is enterprise resource management software enhanced with additional val- uable interfaces. The MILP-based model is part of a proposed three-stage optimizer framework for the APS (Figure 8). The problem involved a large dataset, including 20,000 units produced annually with 100 variants and 4,000 parts required in production. Linear programming was utilized in three ways: 1. Initial Linear Relaxation: Due to the large amount of data, the first optimiza- tion was performed as a relaxed optimization, allowing continuous variables. While continuous variables are not feasible in the real-world scenario, this approach makes optimization more efficient and provides boundaries to aid further planning. 2. Iterative Rolling-Horizon Strategy: Following the relaxed optimization, the lin- ear programming model was refined, and optimization was conducted in time-wise sub-intervals. In this phase, the relaxed reference plan served as a guideline while integer variables were introduced into the LP model, and con- straints were set accordingly. This process was repeated until all constraints were incorporated, and the continuous variables from the relaxation phase were replaced with integer variables. 3. Heuristic Approach: Subproblems related to the case were managed using mixed-integer programming, while larger optimization tasks were managed 40 through LP relaxation, enhancing overall optimization efficiency (Tonelli et al., 2013). Figure 9 Suggested APS solution by Tonelli et al. (2013) The research paper provided a method to apply variations of linear programming to large-scale problems. The key takeaway is the demonstration of the possibilities that lin- ear optimization offers; approximate solutions for large-scale problems using relaxed and heuristic models, and more detailed solutions for small-scale problems with thor- oughly planned LP models. Both approaches are relevant for different purposes and can be combined within a larger solution to gain synergistic benefits. Tonelli et al. (2013) provide an insightful example of using Mixed-Integer Linear Program- ming (MILP) in a multi-product, multi-period production problem, referred to as "multi- item, multi-level" in their study. The case organization operates a three-stage assembly system, progressing from a three-line initial production phase to a two-line assembly phase, and finally, a three-line assembly phase. The optimization timeframe is based on 41 work weeks (typically five days), accounting for holidays and stoppages. The optimisation constraints are divided into hard and soft categories. Hard constraints are mandatory and include production line capacities, subset production limits for specific groups, rela- tive production bounds between different product groups, levelled production con- straints to ensure stability during production rate changes. Soft constrains are more flex- ible, and include target production rate, smoothing production rates, and preferred line assignments. The optimisation itself is multi-objective aiming to minimize several goals: tardiness, early production (to reduce inventory costs), unmet demand, deviations from target production rates, and stability in both production rates and line assignments. The solution uses MILP with a rolling-horizon approach, allowing for periodic updates and adjustments (Tonelli;Paolucci;Anghinolfi;& Taticchi, 2013). The study highlights that multi-objective optimization requires weighting and balancing different objectives, which are determined by the production manager or decision maker. This introduces potential risk if the decision-maker lacks expertise in setting the optimal weights. Tonelli et al. (2013) suggest that the production manager's goal is to balance the sometimes- conflicting objectives of maximizing plant efficiency and meeting customer demand and satisfaction. In their 2005 study, Wang and Liang explored how possibilistic linear programming (PLP) can enhance multi-product aggregate production planning when demand, related oper- ating costs, and capacities are uncertain. PLP, as discussed in the chapter 2.8, is a linear programming technique where variables and parameters in the optimization are treated as fuzzy and uncertain, leading to optimization based on certain assumptions. Wang and Liang formulated the optimization problem as follows: a case company manufactures n types of products over a planning horizon T, with forecast demand, operating costs, and labour and machine capacities subject to uncertainty. The researchers developed a PLP model aimed at optimizing the aggregate production plan to meet forecasted demand by setting appropriate production rates, inventory and labour levels, and managing sub- contracting, backordering, and other controllable variables (Wang & Liang, 2005). This study is interesting in the light of this thesis since it involves many of the character- istics of the case study of this thesis. However, this Wang & Liang use the uncertainty 42 and fuzziness as key element of the study, and model is PLP instead of MILP. Especially problem formulation is useful when formulating MILP model for this thesis' case study. Below is objective function and key constraints to the PLP model, with key variables pre- sented. 𝑀𝑖𝑛 𝑍 = ∑ ∑ (𝑎𝑛𝑡𝑄𝑛𝑡 + 𝑏𝑛𝑡𝑂𝑛𝑡 + 𝑐𝑛𝑡𝑆𝑛𝑡 +𝑑𝑛𝑡𝐼𝑛𝑡 + 𝑒𝑛𝑡𝐵𝑛𝑡) + ∑(𝑘𝑡𝐻𝑡 + 𝑚𝑡𝐹𝑡) 𝑇 𝑡=1 𝑇 𝑡=1 𝑁 𝑛=1 (13) Where: Z = total cost, N = types of products, T = planning horizon, 𝑎𝑛𝑡= regular time production cost per unit of nth product in period t, 𝑄𝑛𝑡= regular time production, 𝑏𝑛𝑡= overtime production cost per unit, 𝑂𝑛𝑡= overtime production, 𝑐𝑛𝑡 = subcontracting cost per unit, 𝑆𝑛𝑡 = subcontracting volume, 𝑑𝑛𝑡 = inventory carrying cost per unit, 𝐼𝑛𝑡= inventory level, 𝑒𝑛𝑡 = backorder cost per unit, 𝐵𝑛𝑡 = backorder level, 𝑘𝑡 = cost to hire one worker in 43 period t, 𝐻𝑡 = workers hire in period t, 𝑚𝑡 = cost to layoff one worker, 𝐹𝑡 = workers laid off (Wang & Liang, 2005). Constraints of model are divided into three parts, carrying inventory, labour levels, and machine capacity and warehouse space. Constraint on carrying inventory as below, row (14). Checks that previous total inventory does not exceed forecasted demand. 𝐼𝑛𝑡−1 − 𝐵𝑛𝑡−1 + 𝑄𝑛𝑡 + 𝑂𝑛𝑡 + 𝑆𝑛𝑡 − 𝐼𝑛𝑡 + 𝐵𝑛𝑡 = 𝐷𝑛𝑡 𝑓𝑜𝑟 𝑛, 𝑡 (14) Where: 𝐼𝑛𝑡 = inventory level in period t of product n, 𝐵𝑛𝑡 = backorder level, 𝑄𝑛𝑡 = regular time production, 𝑂𝑛𝑡 = overtime production, 𝑆𝑛𝑡 = subcontracting volume, 𝐷𝑛𝑡 = forecast de- mand (Wang & Liang, 2005). Labor level constraints below. ∑ 𝑖𝑛𝑡−1(𝑄𝑛𝑡−1 + 𝑂𝑛𝑡−1) + 𝐻𝑡 − 𝐹𝑡 𝑁 𝑛=1 − ∑ 𝑖𝑛𝑡(𝑄𝑛𝑡 + 𝑂𝑛𝑡 𝑁 𝑛=1 𝑓𝑜𝑟 𝑡 (15) ∑ 𝑖𝑛𝑡(𝑄𝑛𝑡 + 𝑂𝑛𝑡) ≤ 𝑊𝑡 𝑚𝑎𝑥 𝑁 𝑛=1 𝑓𝑜𝑟 𝑡 (16) Where: 𝑖𝑛𝑡 = hours of labour per unit of nth product in period t, 𝑊𝑡 𝑚𝑎𝑥 = maximum labour level available in period t. Row (15) checks that labour levels of t equals labour level of t - 1 44 and possible layoffs or hires. (16) checks that labour level does not exceed maximum possible labour level for period t (Wang & Liang, 2005). Constraints regarding production machine capacity and warehouse space: ∑ 𝑟𝑛𝑡(𝑄𝑛𝑡 + 𝑂𝑛𝑡) ≤ 𝑀𝑡 𝑚𝑎𝑥 𝑁 𝑛=1 𝑓𝑜𝑟 𝑡 (17) ∑ 𝑣𝑛𝑡𝐼𝑛𝑡 ≤ 𝑉𝑡 𝑚𝑎𝑥 𝑁 𝑛=1 𝑓𝑜𝑟 𝑡 (18) Where: 𝑟𝑛𝑡= hours of machine usage per unit of nth product in in period t, 𝑀𝑡 𝑚𝑎𝑥 = machine hour maximum capacity available for period t, 𝑣𝑛𝑡 = warehouse space, 𝑉𝑡 𝑚𝑎𝑥 = maxi- mum warehouse space available. Row (17) constraint checks that machine usage does not exceed maximum capacity, and row (18) constraint checks that warehouse capacity is not exceeded. Besides these constraints, non-negativity constraint is also included for every decision variable (Wang & Liang, 2005). After presenting the PLP model, researchers introduced a triangular possibility distribu- tion to manage the inherent uncertainty in cost coefficients, demand, and capacity. Each imprecise parameter, such as demand 𝐷𝑛𝑡 and cost components 𝑎𝑛𝑡𝑏𝑛𝑡 etc., were de- fined by a triangular distribution with three key values: pessimistic, most possible, and optimistic. This distribution allows for a structured representation of uncertainty, ena- bling the model to consider varying degrees of likelihood for each parameter. After the triangular distribution is presented, researchers transformed it into multi-objective lin- ear programming model with three objectives, 1. Minimise the most possible value of total cost, 2. maximise the possibility of obtaining lower total cost, 3. minimise the risk 45 of obtaining higher total costs. Each sub-objective was converted into auxiliary crisp ob- jective function using the weights of the triangular distribution while allowing the model to integrate decision-maker preferences regarding risk and cost expectations. With fuzzy decision-making techniques, three objective functions were transformed into single-goal linear programming model. For each objective, positive and negative ideal solutions were specified. With use of membership functions that presented satisfaction level of each solution, decision-maker was able to adjust parameters until desired solution is achieved (Wang & Liang, 2005). Wang and Liang presented a case study done in industrial tool manufacturer where un- certainty is common issue. PLP based model was implemented with four-month planning horizon. Results stated that PLP proved to be flexible tool that satisfied decision-makers goals in aggregate planning. Overall, researchers stated that proposed approach can be superior tool in industry where excessive amounts of uncertainty is involved in crucial parameters for aggregate planning (Wang & Liang, 2005). Dohale et al. (2022) explored the use of linear programming as an optimization tool to enhance aggregate production planning in an automobile components firm. The re- searchers adopted multi-objective linear programming (MOLP) as the LP technique due to the presence of multiple objectives in the optimization problem, which were identi- fied using a group decision-making approach. The objectives were assessed, compared, and weighted, with the most significant ones being minimizing lead time, minimizing total cost, and maximizing resource utilization. These were selected as the primary ob- jective functions for the aggregate production plan. MOLP was then applied to imple- ment the aggregate production plan, ensuring that the objective functions operated within acceptable performance ranges. The study noted some limitations, including as- sumptions made during the MOLP development and a potential for bias in objective se- lection due to the group decision-making process (Dohale, Ambilkar, Gunasekaran, & Bi- lolikar, 2022). Many of the presented research papers have implemented multi-objective techniques in linear programming-based optimization. This approach is logical for aggregate plan- ning, as its scope is often broad and dynamic. Optimizing for a single objective may not 46 yield the best results or even be realistic, given the interconnected nature of decisions in production planning. Figure 10 presents the conceptual framework of aggregate pro- duction planning as presented by Dohale et al. (2022). In this framework, decision op- tions include strategies for modifying demand and supply, covering functions from sales and inventory management to subcontracting. Given this diverse range of options, opti- mization problems that seek benefits across multiple functional areas require multi-ob- jective optimization to effectively address the varied needs of each function. Additionally, as the optimisation problem expands, uncertainty increases. This explains the use of fuzzy variables and parameters with multi-objective optimisation. Broader optimisation problem increases the uncertainty of the outcomes and therefore to mitigate risk, mul- tiple options with different fuzzy parameters can help in the planning and decision mak- ing. Figure 10 Aggregate planning concept by Ambilkar et al. (2022) Within this context, optimization should also include smaller-scale efforts within specific aggregate planning functions. These focused optimizations may not consider the entire scope but instead target single objectives within individual functions, as the case 47 simulation in this research demonstrates. Implementing all options across a multi-func- tional scope and considering every aspect simultaneously demands substantial re- sources and careful planning to ensure balanced consideration of all factors. Large-scale optimization models can compromise efficiency and validity, potentially making the re- sults less actionable. Thus, single-objective, smaller-scale optimization within functions is often a practical approach, as it enables easier control over validity and utility, aligning well with the needs of users and responsible decision-makers. However, even in single- goal optimizations, it remains essential to account for the broader organizational context and potential stakeholders, at least indirectly, since no function operates in complete isolation. 3.5 Validity of linear programming and delimitations Optimal solutions for optimisation problems are not integers, which requires rounding the variables. Depending on the implementation, this may result infeasible solution due to rounding difficulties. Cases where rounding may lead to difficulties can be situations where variables present workforce and cannot be treated with any other form than in- tegers, or large and complex sets where rounding makes the modelling much more com- plex. However, in most cases where relationship with constraints is linear, this method will find feasible solution (Nahmias, 2005). When modelling the optimisation problem, form of variables should be thoroughly considered, and possible effect of rounding should be calculated. Linear programming parameters include certainty assumptions, as presented in chapter 4.1. Values given for parameters are assumed to be certain, even though in real-world implementations there are often deviation between predicted values and actuals. This is common especially when optimisation is based on forecast of future values. Assump- tion based risk can be mitigated by conducting sensitivity analysis for optimisation re- sults. This way, sensitive parameters that have bigger impact to solutions can be found and acknowledged (Hillier & Lieberman, 2015, p. 43). 48 4 Research Methods In this chapter, research methods, approach and strategy are presented. Chapter will go through processes regarding how data should be gathered and then how it should be analysed. 4.1 Research methods In this study mixed method is used in collection and analysis of data. Qualitative methods include collecting information about current and previous production data e.g. resource requirements, material costs, overhead and fixed costs. Qualitative methods include in- terviews with personnel from organization that are either directly involved in production planning or otherwise relevant for this purpose. Interviews are semi-structured. Ques- tionnaires or surveys are not relevant in this context as the number of similar, relevant participants will not be large, and sampling would be too small. Whereas data collection is based on qualitative and quantitative methods, the analysis itself is mostly based on simulation as a key method. Collected data is used in simulation, and analysis will be done based on findings from the simulation. Analysis will be based on comparative sce- nario analysis between historical performance data of production, compared to simula- tion tool’s suggested production plan. Core of the analysis is profitability in terms of profit generated from produced tonnes. Additionally, sensitivity analysis is conducted to simulation tool parameters to determine which production inputs and factors should be focused on the production planning. 49 4.2 Research approach and strategy The research approach in this study will be deductive. The objective is to build a simula- tion tool that is used to develop production planning using the mixed-integer linear pro- gramming, MILP. The tool is based on the MILP concept and theoretical framework pre- sented in this text but also adopts collected feedback from the organization as well as possible. Selected research strategy will be a case study following action research methods. Action research was chosen due to its flexible and dynamic nature which allows continuous im- provement as the study progresses. Figure 11 presents the research process of Action research. Figure 11 Action research -method 50 Figure 12 Research methods in more detail 4.3 Data collection and analysis Data is collected though semi-structured interviews with key stakeholders. Data is col- lected to simulation tool’s database. Collected data mainly includes historical production information including material prices, production volumes, and resource requirements. Data will be verified with key personnel, to ensure the validity of the data. 51 4.4 Reliability and Validity Due to technical and scope restrictions, collected data will include adjustments and av- eraging values, in order to support feasibility in the simulating phase. Regular meetings with stakeholders are held, in order to ensure reliability and validity of findings and rec- ommendations as well as functionality of the simulation tool. Reliability and validity will be discussed further in the results and conclusions. 4.5 Sensitive data The empirical data used in this thesis is based on the company's historical production data. To protect the company’s competitive advantage, certain details have been ad- justed or excluded, including specific figures related to cost efficiency and pricing. His- torical data was utilized in the optimization process, with the results presented as per- centage differences between the original unoptimized data and the newly optimized production suggestions. 52 5 Empirical Analysis 5.1 Introduction and Background Empirical analysis can be divided into two sections: 1. gathering sufficient history data- base and 2. developing Excel Solver -based simulation tool which is used to test potential of mixed-integer linear programming in tactical production planning. Chapter 5.2. will focus on data collection while 5.3 describes the characteristics of simulation model. 5.2 Collection of historical data To evaluate the performance of the simulation tool against the case organization's exist- ing production planning processes, multiple datasets were required for comparison. Data was gathered through workshops and semi-structured interviews with personnel from tactical and strategic production planning, production engineering, and financial controlling. The collected data covered production from 2021 to 2023, with monthly granularity. Compiling the datasets involved three main stages, each focusing on collaboration with different departments within the case company. First, the entire production planning process was thoroughly reviewed with personnel from strategic and tactical production planning. The scope of production, including process steps, products, and other relevant details, was defined, although collaboration with supervisors from the production plan- ning team continued throughout the thesis process. Financial information, including fixed costs, raw material prices, and other cost-related variables, was gathered in close collaboration with the financial controlling team. Addi- tionally, sales data was collected with their support. However, to optimize production and compare profitability across different products and scenarios, detailed product-spe- cific material requirements were necessary. This data was compiled with the help of pro- duction engineers, who provided the required input specifications for each product. As collected data increased, it was updated to simulation tool and actively tested through the simulation. After collection, storing and testing, validity of data was tested 53 with original stakeholders that helped to gather datasets. More detailed description of datasets will be presented in chapter 5.3.4. 5.3 Simulation tool Simultaneously as historical data was collected, simulation tool was developed. Tool went through multiple development phases and was modified through the thesis pro- cess as new requirements and needs arose with workshops and interviews. Original plan was to use basic linear programming -based solution for optimisation tool, but due to requirements that involve binary variables, mixed-integer linear programming was cho- sen as the base algorithm for optimisation model. 5.3.1 Background Simulation tool is built with Microsoft Excel, using Solver tool with add-on open-source software OpenSolver. OpenSolver is required due to large amounts of data processed in the simulation. Linear programming is done with Excel, since the visualization of results and other data is most convenient compared to other solutions. Excel Solver is also easily available and does not require any licenses compared to other solver softwares. Excel Solver is also presented as suitable software for linear programming in production plan- ning presented in book Production and Operations Analysis by Nahmias (2005) and Op- erations Research – An Introduction by Taha (2017). 5.3.2 Parameters and constraints To formulate as realistic simulation as possible with chosen tools and method, correct parameters and constraints must be in place. In simulation, we are using adjusted pro- duction plans to determine which parameters are used to produce which product. In simulation, we have six different products, that each have require different inputs. Input parameters include electricity consumption and cost, coke type and consumption, con- centrate, quartz, bentonite and lumpy ore consumption and cost. Price of each input parameter varies in time, and this brings the room for optimisation – when to produce and what to produce to maximise profit per tonne in production planning. Optimisation tool suggests complete optimised production plan, including product mix and volumes. 54 Parameter prices are variable costs that are linear to produced amounts. Addition to variable cost, fixed costs are also included in the simulation. Fixed overhead costs include salaries, maintenance, and other costs. Simplified optimisation model would only suggest maximising production of the product which has best profitability. However, in simulation we assume that there is certain amount of demand that must be fulfilled. Demand is calculated as a four-month total, which creates a minimum requirement of total production for the model. Monthly pro- duction level is constrained by fixed costs – profit from monthly production must exceed fixed cost of the corresponding month. Model includes three production lines that each have their own capacity. Each produc- tion line can produce one product at a time. Here binary variables are required: if line produces product p1 at period t1, binary variable b11 gets value 1, otherwise 0. Below is the summary of variables used in the model. Variable Description Unit, if available & de- tails 𝑝 = 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 T, tonnes of finished product. 𝑡 = 𝑡𝑖𝑚𝑒 t presents one month in this model. Time period in this model is four months total. 𝑙 = 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑙𝑖𝑛𝑒 Production line where products are produced. Three production lines total, each can product one product at a time. 55 𝐶𝑝𝑡 = 𝑐𝑜𝑠𝑡 𝑜𝑓 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑝𝑒𝑟 𝑓𝑖𝑛𝑖𝑠ℎ𝑒𝑑 𝑡𝑜𝑛𝑛𝑒 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 €/t, combined cost of raw materials required to produce one tonne of finished product. Val- ues are based on histor- ical data. 𝑃𝑝𝑡 = 𝑠𝑒𝑙𝑙𝑖𝑛𝑔 𝑝𝑟𝑖𝑐𝑒 𝑜𝑓 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑡𝑜𝑛𝑛𝑒 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 €/t, selling price of product during the time t. Values based on his- torical data. 𝑃𝑟𝑜𝑓𝑝𝑡 = 𝑝𝑟𝑜𝑓𝑖𝑡 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 €, profit per product, subtraction of selling price and production cost. 𝑃𝑟𝑜𝑑𝑝𝑡 = 𝑎𝑚𝑜𝑢𝑛𝑡 𝑜𝑓 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 T, tonnes. Decision vari- ables. 𝑃𝑃𝑇𝑝𝑡 = 𝑝𝑟𝑜𝑓𝑖𝑡 𝑝𝑒𝑟 𝑡𝑜𝑛𝑛𝑒 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 €/t, calculated as 𝑃𝑟𝑜𝑓𝑝𝑡 𝑃𝑟𝑜𝑑𝑝𝑡 𝐵𝑝𝑡 = 𝑏𝑖𝑛𝑎𝑟𝑦 ℎ𝑒𝑙𝑝𝑒𝑟 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒, 𝑢𝑠𝑒𝑑 𝑟𝑒𝑠𝑡𝑟𝑖𝑐𝑡 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑡𝑜 𝑜𝑛𝑙𝑦 𝑜𝑛𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑎𝑡 𝑎 𝑡𝑖𝑚𝑒 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑙𝑖𝑛𝑒 Value 1 if Prodpt < 0 Value 0 if Prodpt > 0 𝐷𝑒𝑚𝑎𝑛𝑑𝑝𝑡 = 𝑑𝑒𝑚𝑎𝑛𝑑 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 T, tonnes. Estimated de- mand for product. Used to calculate production level. 56 𝐶𝑎𝑝𝑙𝑡 = 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑙𝑖𝑛𝑒 𝑝𝑒𝑟 𝑡𝑖𝑚𝑒 T, tonnes. Maximum production constraint per production line. Fixed parameter by de- fault, but utilisation rate can be adjusted if necessary. 𝑀𝑖𝑛𝑃𝑟𝑜𝑑 = 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 𝑚𝑖𝑛𝑖𝑚𝑢𝑚 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑙𝑒𝑣𝑒𝑙 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑝𝑒𝑟 𝑐𝑦𝑐𝑙𝑒 (𝑓𝑜𝑢𝑟 𝑚𝑜𝑛𝑡ℎ𝑠) T, tonnes. Minimum production constraint per product per cycle of four months. 𝐹𝐶𝑡 = 𝑓𝑖𝑥𝑒𝑑 𝑐𝑜𝑠𝑡𝑠 𝑝𝑒𝑟 𝑚𝑜𝑛𝑡ℎ €, monthly fixed costs serve as a minimum profit constraint for model. 5.3.3 MILP -model Objective function as follows: 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = ∑ ∑(𝑃𝑃𝑇𝑝,𝑡 ∗ 𝑃𝑟𝑜𝑑𝑝,𝑡) 𝑇 𝑡=1 𝑃 𝑝=1 Or simply: 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = ∑ ∑(𝑃𝑟𝑜𝑓𝑝,𝑡) 𝑇 𝑡=1 𝑃 𝑝=1 (13) Where: - 𝑍 = total profit - 𝑃𝑃𝑇𝑝,𝑡 = profit per tonne for finished product p in month t 57 - 𝑃𝑟𝑜𝑑𝑝,𝑡 = Production amount of product p in month t Objective function calculates total production volume for every product which is multi- plied by the profit per tonne for corresponding product. Calculation is done for every product using four-month (t1-t4) totals. Subject to constraints 1. Production line assignment constraint. Since one production line can produce only one product at a time, a constraint is needed which assigns one product per one production line per month. ∑ 𝐵𝑝,𝑡,𝑙 ≤ 1 𝑃 𝑝=1 Where: - 𝐵𝑝,𝑡,𝑙 = binary variable which gets value of 1 if production line l produces product p during month t 2. Production line capacity constraint. Each of three production lines has a maximum capacity for production volume. Following constraint restricts production not to exceed this limit. 𝑃𝑟𝑜𝑑𝑝,𝑡,𝑙 ≤ 𝐶𝑎𝑝𝑙𝑡 ∗ 𝐵𝑝𝑡 𝑓𝑜𝑟 𝑝, 𝑡 Where: - 𝐶𝑎𝑝𝑙𝑡 = maximum capacity for corresponding product during month in question - 𝐵𝑝𝑡 = binary variable, given value 1, if there is production for product p in month t, or 0 if there is no production. 3. Minimum production constraint. Constraint which checks that production meets the minimum demand for production requirements for every product. 𝑃𝑟𝑜𝑑𝑝𝑡 ≥ 𝑀𝑖𝑛𝑃𝑟𝑜𝑑 𝑓𝑜𝑟 𝑝, 𝑡 Where: - 𝑃𝑟𝑜𝑑𝑝𝑡 = total amount of production in tonnes for product during month 58 - 𝑀𝑖𝑛𝑃𝑟𝑜𝑑 = total minimum requirement for production for product 4. Monthly fixed cost coverage constraint for profit generation. Constraint ensures that profit generated from production covers the fixed cost total of corresponding month. ∑ 𝑃𝑟𝑜𝑓𝑝,𝑡 ≥ 𝐹𝐶𝑡 𝑓𝑜𝑟 𝑡 𝑃 𝑝=1 Where: - Sum of 𝑃𝑟𝑜𝑓𝑝,𝑡 presents total profit generated from all products in one month. - 𝐹𝐶𝑡 presents total amount of fixed costs during that month. To summarise, below is the general version of the MILP -model. Generalised version 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = ∑ ∑(𝑃𝑃𝑇𝑝,𝑡 ∗ 𝑃𝑟𝑜𝑑𝑝,𝑡) 𝑇 𝑡=1 𝑃 𝑝=1 𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 ∑ 𝐵𝑝,𝑡,𝑙 ≤ 1 𝑃 𝑝=1 𝑃𝑟𝑜𝑑𝑝,𝑡,𝑙 ≤ 𝐶𝑎𝑝𝑙𝑡 ∗ 𝐵𝑝𝑡 𝑓𝑜𝑟 𝑝, 𝑡 𝑃𝑟𝑜𝑑𝑝𝑡 ≥ 𝑀𝑖𝑛𝑃𝑟𝑜𝑑 𝑓𝑜𝑟 𝑝, 𝑡 ∑ 𝑃𝑟𝑜𝑓𝑝,𝑡 ≥ 𝐹𝐶𝑡 𝑓𝑜𝑟 𝑡 𝑃 𝑝=1 𝐴𝑛𝑑 𝐵𝑝𝑡 𝑖𝑠 𝑏𝑖𝑛𝑎𝑟𝑦 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑓𝑜𝑟 𝑝, 𝑡, 𝑙 59 5.3.4 Excel -tool Simulation model was built on basic Excel with OpenSolver -add-on. Optimisation con- cept is based on three different sheets which are data -sheet, input -sheet, and calcula- tion -sheet. Figures are masked due to their confidentiality. Figure 13 Excel -tool: Data -sheet Figure 8 presents a portion of the data sheet where all the required input cost infor- mation is listed (data modified for the illustration). The information on this data sheet was gathered from historical records. In everyday use, the data sheet could be based on both actual historical data and forecasts. It includes all the information used in the sim- ulation, such as raw material prices, fixed costs, sales data (including product related volumes and prices for both internal and external sales). The input sheet (Figure 9) pulls data from the data sheet. Users can input a desired date for optimization, such as 8/2023, and the relevant data is automatically fetched from the data sheet into the input sheet. This allows users to make quick comparisons between different periods without manually adjusting datasets. The data is divided into three four-month periods per year: 1-4, 5-8, and 9-12. These intervals were chosen because a 60 month is the shortest available timeframe for real data, and a four-month period pro- vides enough scope for optimization while remaining manageable within Excel Solver. Figure 14 Excel -tool: Input -sheet Figure 15 Excel -tool, Input -sheet: Production card Figure 10 shows the production card for product p = 1. A similar table has been created for each product. Raw material prices are imported from the data sheet, as shown in Figure 9, and these prices are linked to the product-specific tables. Since the consump- tion of raw materials varies between products, an itemized cost structure table is neces- sary. 61 Each row alternates between two key details: the raw material consumption per tonne of finished product and the corresponding cost. The consumption row indicates how much raw material (in tonnes) is required to produce one tonne of the finished product. The row below calculates the cost by multiplying the consumption by the raw material price or the price of electricity. After the cost for each input is calculated, the final row, Total cost per finished tonne, presents the sum of all production costs for one tonne of finished product, denoted as variable 𝐶𝑝𝑡. The Calculation sheet is where the optimization process takes place. Due to the limita- tions of Excel Solver, all data used in the optimization must be located on the same sheet. To prevent alterations to the original data, a separate sheet is used as a safeguard. The Calculation sheet consolidates all variables: product-specific cost per tonne, selling price, monthly profit per tonne per product, fixed costs, required production levels, and production capacities for each of the three production lines. From the user’s perspective, the Calculation sheet primarily serves to activate the optimization process and display results, which are then copied into the production plan. 5.4 Optimisation This chapter evaluates the performance of the MILP-based simulation by comparing its results to actual historical data. The comparison is conducted in four-month cycles, as the optimization model operates on four-month periods to achieve optimized results. Data from 2021 to 2023 is used for this comparison. Following this comparison, a tailored sensitivity analysis is performed to support the MILP model, conducted manually. In this analysis, production levels and variables remain constant over each four-month period, while raw material prices and other relevant pa- rameters are individually adjusted. For instance, to assess the impact of electricity prices on total profitability, electricity prices are adjusted incrementally by +5%, +10%, and +15%, as well as -5%, -10%, and -15%. This approach enables a detailed analysis of each