System and method for real-time dynamic convex optimization supporting scenario planning

The real-time dynamic convex optimization system efficiently generates optimal production plans in complex manufacturing environments by leveraging Gurobi and cvxpy, addressing inefficiencies in existing systems with rapid computation and scenario planning capabilities.

WO2026015629A1PCT designated stage Publication Date: 2026-01-15MARS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/US2025/036962
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-10
Filing Date
2025-07-09
Publication Date
2026-01-15

AI Technical Summary

Technical Problem

Existing production planning systems struggle with inefficiencies in optimizing production plans in real-time, particularly in complex manufacturing environments, leading to suboptimal solutions and prolonged computation times.

Method used

A real-time dynamic convex optimization system that leverages a customized architecture and solvers like Gurobi to generate hard and soft constraints from user inputs, enabling rapid scenario planning and production plan generation based on transactional data and constraint parameters, using a Python library like cvxpy for convex optimization.

Benefits of technology

Enables rapid generation of optimal production plans within minutes, addressing complex manufacturing scenarios with improved efficiency and reduced computation time, allowing for dynamic adjustments based on real-time data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025036962_15012026_PF_FP_ABST
    Figure US2025036962_15012026_PF_FP_ABST
Patent Text Reader

Abstract

A method may include receiving, by a server, a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool. The method may include determining, by the server, a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool. The method may include transmitting, by the server and via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.
Need to check novelty before this filing date? Find Prior Art

Description

Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 SYSTEM AND METHOD FOR REAL-TIME DYNAMIC CONVEX OPTIMIZATION SUPPORTING SCENARIO PLANNING CROSS-REFERENCE TO RELATED APPLICATION(S)

[0001] This patent application claims the benefit of priority to U.S. Application No.63 / 669,399, filed on July 10, 2024, the entirety of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to a real-time optimization routine for production planning. BACKGROUND

[0003] Production planning may refer to the planning of production of an item by an entity. Production planning may include the coordinating of resources and processes of the entity to meet a production plan in a manner that optimizes productivity, optimizes efficiency, reduces costs, reduces waste, or the like. Production planning may include the ordering of materials, the allocation of manufacturing equipment, the scheduling of manufacturing, or the like. SUMMARY

[0004] In some aspects, the techniques described herein relate to a method including: receiving, by a server, a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool; determining, by the server, a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool; and transmitting, by the server and via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.

[0005] In some aspects, the techniques described herein relate to a method, wherein the input includes a production yield table that identifies a quantity of the product to be produced in a timeframe at a production site.

[0006] In some aspects, the techniques described herein relate to a method, wherein the input includes a demand table that identifies an expected demand quantity of the product to be produced at a production site.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1

[0007] In some aspects, the techniques described herein relate to a method, wherein the input includes an on-hand table that identifies on-hand stock of the product at a production site.

[0008] In some aspects, the techniques described herein relate to a method, wherein the input includes a production schedule table that identifies scheduled receipts of the product at a production site.

[0009] In some aspects, the techniques described herein relate to a method, wherein the input includes a firm plan table that identifies a fixed schedule production of the product at a production site.

[0010] In some aspects, the techniques described herein relate to a method, wherein the input includes a parameter table that identifies constraint parameters and penalties.

[0011] In some aspects, the techniques described herein relate to a method, wherein the input includes a prevent excess switch that identifies whether a production quantity of the product should be limited or if an unlimited production quantity is acceptable.

[0012] In some aspects, the techniques described herein relate to a server including: a memory configured to store instructions; and one or more processors configured to execute the instructions to perform operations including: receiving a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool; determining a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool; and transmitting, via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.

[0013] In some aspects, the techniques described herein relate to a server, wherein the input includes a production yield table that identifies a quantity of the product to be produced in a timeframe at a production site.

[0014] In some aspects, the techniques described herein relate to a server, wherein the input includes a demand table that identifies an expected demand quantity of the product to be produced at a production site.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1

[0015] In some aspects, the techniques described herein relate to a server, wherein the input includes an on-hand table that identifies on-hand stock of the product at a production site.

[0016] In some aspects, the techniques described herein relate to a server, wherein the input includes a production schedule table that identifies scheduled receipts of the product at a production site.

[0017] In some aspects, the techniques described herein relate to a server, wherein the input includes a firm plan table that identifies a fixed schedule production of the product at a production site.

[0018] In some aspects, the techniques described herein relate to a non- transitory computer-readable medium storing instructions that, when executed by one or more processors of a server, cause the one or more processors to perform operations including: receiving a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool; determining a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool; and transmitting, via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.

[0019] It may be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] FIG.1 is a diagram of an example system for real-time dynamic convex optimization supporting scenario planning, according to one or more embodiments.

[0021] FIG.2 is a diagram of example components of one or more devices of FIG.1, according to one or more embodiments.

[0022] FIG.3 is a flowchart of an example process for real-time dynamic convex optimization supporting scenario planning, according to one or more embodiments.

[0023] FIG.4 is a diagram illustrating a solution architecture, according to one or more embodiments.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1

[0024] FIG.5 is an example data flow diagram, according to one or more embodiments. DETAILED DESCRIPTION

[0025] Some embodiments of the present disclosure provide systems and methods that dynamically generate hard constraints, soft constraints, and the objective function from a user input based on a user request. The user’s entry point may be supply planning software. The systems and methods may be provided in a customized real-time architecture, and may solve any encountered optimization problem in substantially real-time (e.g., less than one minute), utilizing a solver. Thus, the present disclosure provides systems and methods that enable scenario planning capabilities. Further, some embodiments of the present disclosure provide automation of production planning in a real-time context to allow for scenario planning in a complex manufacturing environment. Further still, some embodiments of the present disclosure provide development of a customized optimization routine embedded in a real-time architecture that allows supply planners to create various versions of production plans based on scenarios of input data in substantially real- time.

[0026] Further, some embodiments provide for the automation of production planning in a real-time context to allow for scenario planning in a complex manufacturing environment.

[0027] Further still, some embodiments provide for the development of a customized optimization routine embedded in a real-time architecture that allows supply planners to create various versions of production plans based on scenarios of input data within minutes.

[0028] Some embodiments of the present disclosure are directed to a planning tool. The planning tool addresses a specific linear optimization problem that aims at creating an optimal production plan based on requirements shared by a confectionary entity. In order to do that, the embodiments take into account transactional data as well as constraint parameters and penalties maintained by supply planners. All of this information is used to stand up the supply planning optimization problem. The embodiments may leverage a Python library “cvxpy” which is easy to use and offers easy integration with a variety of solvers for convex optimization problems. Our implementation leverages a solver (e.g., Gurobi) to arriveAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 at an optimal solution quickly. Even with low complexity optimization problems, conventional solvers took considerably longer to solve the optimization problem while not even finding optimal solutions to it.

[0029] FIG.1 is a diagram of an example system 100 for real-time dynamic convex optimization supporting scenario planning. As shown in FIG.1, the system 100 may include a user device 110, middleware 120, a data application programming interface (API) 130, a server 140, and a key vault 150. The devices of the system 100 may communicate via one or more networks, such as a cellular network (e.g., a fifth generation (5G) network, a long-term evolution (LTE) network, a fourth generation (4G) network, a third generation (3G) network, a code division multiple access (CDMA) network, etc.), a public land mobile network (PLMN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., the Public Switched Telephone Network (PSTN)), a private network, an ad hoc network, an intranet, the Internet, a fiber optic-based network, or the like, and / or a combination of these or other types of networks.

[0030] The number and arrangement of the devices of system 100 shown in FIG.1 are provided as an example. In practice, the system 100 may include additional devices, fewer devices, different devices, or differently arranged devices than those shown in FIG.1. Additionally, or alternatively, a set of devices (e.g., one or more devices) of the system 100 may perform one or more functions described as being performed by another set of devices of the system 100.

[0031] FIG.2 is a diagram of example components of one or more devices of FIG.1. The device 200 may correspond to the user device 110, the platform middleware 120, and / or the virtual assistant data API 130. As shown in FIG.2, the device 200 may include a bus 210, a processor 220, a memory 230, a storage component 240, an input component 250, an output component 260, and a communication interface 270.

[0032] The bus 210 may include a component that permits communication among the components of the device 200. The processor 220 may be implemented in hardware, firmware, or a combination of hardware and software. The processor 220 may be a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digitalAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 signal processor (DSP), a field-programmable gate array (FPGA), an application- specific integrated circuit (ASIC), or another type of processing component.

[0033] The processor 220 may include one or more processors capable of being programmed to perform a function. The memory 230 may include a random access memory (RAM), a read only memory (ROM), and / or another type of dynamic or static storage device (e.g., a flash memory, a magnetic memory, and / or an optical memory) that stores information and / or instructions for use by the processor 220.

[0034] The storage component 240 may store information and / or software related to the operation and use of the device 200. For example, the storage component 240 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optic disk, and / or a solid state disk), a compact disc (CD), a digital versatile disc (DVD), a floppy disk, a cartridge, a magnetic tape, and / or another type of non- transitory computer-readable medium, along with a corresponding drive.

[0035] The input component 250 may include a component that permits the device 200 to receive information, such as via user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, and / or a microphone for receiving the reference sound input). Additionally, or alternatively, the input component 250 may include a sensor for sensing information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, and / or an actuator). The output component 260 may include a component that provides output information from the device 200 (e.g., a display, a speaker for outputting sound at the output sound level, and / or one or more light-emitting diodes (LEDs)).

[0036] The communication interface 270 may include a transceiver-like component (e.g., a transceiver and / or a separate receiver and transmitter) that enables the device 200 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. The communication interface 270 may permit the device 200 to receive information from another device and / or provide information to another device. For example, the communication interface 270 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi interface, a cellular network interface, or the like.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1

[0037] The device 200 may perform one or more processes described herein. The device 200 may perform these processes based on the processor 220 executing software instructions stored by a non-transitory computer-readable medium, such as the memory 230 and / or the storage component 240. A computer-readable medium may be defined herein as a non-transitory memory device. A memory device may include memory space within a single physical storage device or memory space spread across multiple physical storage devices.

[0038] The software instructions may be read into the memory 230 and / or the storage component 240 from another computer-readable medium or from another device via the communication interface 270. When executed, the software instructions stored in the memory 230 and / or the storage component 240 may cause the processor 220 to perform one or more processes described herein. Additionally, or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, implementations described herein are not limited to any specific combination of hardware circuitry and software.

[0039] The number and arrangement of the components shown in FIG.2 are provided as an example. In practice, the device 200 may include additional components, fewer components, different components, or differently arranged components than those shown in FIG.2. Additionally, or alternatively, a set of components (e.g., one or more components) of the device 200 may perform one or more functions described as being performed by another set of components of the device 200.

[0040] FIG.3 is a flowchart of an example process 300 for real-time dynamic convex optimization supporting scenario planning. In some aspects, the process 300 may be performed by the system 100. Further, the process 300 may be operated with device 200 as described above in the description of FIG.2.

[0041] As shown in FIG.3, at step 310, the process 300 may include receiving, by a server, a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool. For example, user may request, via the user device 110, optimization from inside an agile supply chain management tool (e.g., Kinaxis®) front end. The agile supply chain management tool may generate an HTTP request via an internal script andAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 target the middleware 120 endpoint. The middleware 120 may parse the inbound request and create an appropriate API call to request data from the data API 130 of the agile supply chain management tool. The data API 130 may parse the inbound workbook and worksheet requests and return the requested data to the middleware 120.

[0042] At step 320, the process 300 may include determining, by the server, a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool. For example, the middleware 120 may transform the inbound data into a form usable by a modeling language for convex optimization problems (e.g., CVXPY), build the optimization problem, and request a solve (e.g., a solution to the optimization problem) from the server 140 (e.g., Gurobi®). The server 140 (e.g., a Gurobi® compute instance) may solve the optimization problem, and return results to the middleware 120.

[0043] At step 330, the process 300 may include transmitting, by the server 140 and via the middleware 120, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result. For example, the middleware 120 may receive the optimal result, transform the optimal result into a report that can be inserted into a workbook of the agile supply chain management tool, and post the requested result. The user may view the optimization results in the agile supply chain management tool front-end, which may be split across multiple worksheets.

[0044] The input to the system 100 may be a production yield table. The production yield table may include or may be a table that identifies the quantity of an item that can be produced in an hour per mode (timeframe) and site. The input specified in this table can be time-phased, meaning the yield per item / mode / resource can change over time. In the backend, the system may account for this by creating several tables of shape Mxl where M refers to the number of modes and l to the number of items. Each table may be associated with the earliest date for which it is valid. The validity dates may be used to ensure that the correct yield rates are used in all the back-end calculations.

[0045] The input may include a demand table. The demand table may include or may be a table that identifies a weekly expected demand quantity per item at aAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 site. The system 100 may assume that the dates given by the demand table refer to the required solve horizon.

[0046] The input may include an on-hand table. The on-hand table may include or may be a table that identifies weekly on-hand stock per item at a site. Any available stock will be taken into account as part of the system solve. The system may arrive at a “net demand” to solve for by reducing the demand with any on-hand stock and scheduled receipts.

[0047] The input may include a production schedule table. The production schedule table may include or may be a table that identifies weekly scheduled receipts per item at a site. Any scheduled receipts will be taken into account as part of the system solve. The system 100 may arrive at a “net demand” to solve for by reducing the demand with any on-hand stock and scheduled receipts.

[0048] The input may include a firm plan table. The input table may include or may be a table that identifies weekly fixed scheduled production of items at a site. The system 100 may read the information provided by this table and accommodate firm plan production by adapting the minimum inflow constraint table in the backend. In other words, the system 100 may force production of at least the firm plan quantity specified in the firm plan table for a given item in a given week.

[0049] The input may include a parameter table. The parameter table may contain information about all constraints and penalties (sometimes referred to as "soft constraints") as maintained by supply planners. The system 100 may support the following constraints and penalties: constraint parameters (e.g., maximum capacity, minimum capacity, maximum inflow, minimum inflow, minimum run length, or the like), penalties (e.g., maximum on-hand horizon and penalty, independent demand penalty, resource cost penalty, or the like), infinite carry-forward (switched to “on” or “off” per item over the full solve horizon).

[0050] The input may include a prevent excess switch. The prevent excess switch may be a Boolean switch that may be “True” when the weekly production quantities should be limited to at most the cumulated demand over the solve horizon. “False” may indicate that unlimited pre-build is acceptable.

[0051] The optimization problem may be defined as “minimize cumulated unmet net demand and excess stock” when infinite carry-forward is "on” and / or “Minimize unmet net demand and excess stock” when Infinite Carry-Forward is “off”Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 while: (1) heavily penalizing unmet demand per item, either using a pre-specified penalty of a hypothetical value (e.g., 20,000 $) or via user-defined independent demand penalties or (2) gradually penalizing over-production / excess stock depending on the net demand situation per item.

[0052] This works via a naive storage cost penalty that is coupled to each week's net demand: 1, ^^^^ ^^^^^^ ^^^^^^^^^^^^ > 050, ^^^^ ^^^^^^ ^^^^^^^^^^^^ = 0Equation 1100, ^^^^ ^^^^^^ ^^^^^^^^^^^^ < 0

[0053] The system 100 may control stock pre-built via a user-specified “max- on-hand” penalty if stock may be carried forward more than a user-specified “max- on-hand horizon.” Further, the system 100 may control for resource costs, in case multiple secondary production resources are available (e.g. two lines are being operated by one shift). Additionally, the system 100 may control for resource costs, in case multiple primary production resources are available (e.g. two lines produce the same items and one should be favored over the other).

[0054] The system may use the following constraints: weekly utilization per production resource ≥ minimum weekly capacity of production resource; weekly utilization per production resource ≤ maximum weekly capacity of production resource; weekly production quantities per item ≥ weekly minimum inflow per item; weekly production quantities per item ≤ weekly maximum inflow per item; weekly production quantities per item ≤ cumulated demand per item over solve horizon; and weekly utilization per production resource for items of MRL families ≥ Minimum Run Length (MRL) IF weekly utilization for items of MRL families > 0. These constraints may be used where net demand = expected demand - scheduled receipts - on-hand stock.

[0055] The solve horizon may be governed by the time horizon provided in the input demand table. The optimization routine may automatically adapt all remaining input tables to the same time horizon as provided by the demand table. For example, if any of the remaining input tables contains earlier information compared to the demand table or extends further into the future, this information may be cropped. On the other hand, should the remaining input tables refer to a shorter time horizon than the demand table, the missing input may be automatically filled with informationAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 considered sensible. For instance, this may be filling missing independent demand penalties with 20,000 ($), filling missing max-on-hand horizons and penalties with zeros (days / $), filling missing resource costs with zeros ($), filling missing min / max capacities with zeros, filling missing min inflows with zeros (cases), filling missing max inflows with 99,999,999 (cases), filling missing MRLs with 0 (hours).

[0056] In order to encourage solutions to meet as much demand as possible, the system 100 may apply a default unmet demand penalty of a hypothetical value (e.g., 20,000 $) versus default storage cost for excess stock of 1, 50, or 100 dollars depending on a week's net demand situation. The default unmet demand penalty may be overwritten via the “independent demand penalties” as specified in the parameter table.

[0057] The system may use a mathematical definition as below.

[0058] Let ^^^^^^^^(ℝ+) be the expected Demand matrix of positive real numbers and shape Wxl.

[0059] Each ^^^^,^^refers to the demand in week w for item i with w ∈ {1, ... , W} and i ∈ {1, ... , I}, respectively.

[0060] Similarly, let ^^^^^^^^(ℝ+) be the expected Scheduled Receipts matrix with ^^^^,^^referring to scheduled receipts in week w for item i and let ^^^^^^^^(ℝ+) be the expected On-hand Inventory matrix with ^^^^,^^referring to on-hand stock in week w for item i.

[0061] The expected Net Demand matrix may then be calculated as follows:− ^^^^^^^^ ( ℝ+) Equation 2 with each ^^^^,^^referring to the net demand in week w for item i.

[0062] In the optimization problem, we aim at finding an optimal Mode Hours matrix ^^^^^^^^( ℝ+) with ℎ^^,^^being the mode hours in week w for modem, m ∈ {1, ... , M}.

[0063] To handle multiple (primary or secondary) production resources rsec∈ { 1, … , Rsec} or rprim∈ { 1, …. , Rprim}, matrices of Mode Hours may be needed for only those primary or secondary resources:(ℝ+) to apply resource cost to.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1

[0064] Moreover, the Production Quantities matrix is given by:Equation 3 where: ^^^^,^^: production quantity of an item i in week w, ^^^^^^^^( ℝ+): denotes the Yield matrix, ^^^^,^^: yield of item i by running one hour of mode m.

[0065] In order to find an optimal Mode Hours matrix H, the following optimization problem may be defined, in case infinite-Carry Forward is switched “on” for all items i: mins.t.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1=^^^^^^^^Equation 4

[0066] In the objective function ^^^^^^_^^^^^^^^^^is a matrix of shape WxI with eachentry ^^^^^^^^ = ∑ ^^^^^^^^^^^^^^^^= ^^ ^^ ^^^^^^^^^^∀ ^^= {1, ... ,referring to the cumulatedproduction per item i over weeks ^^cum. In other words, each row in ^^^^^^_^^^^^^^^^^refers to the sum of produced items from the first week to the current week.

[0067] Similarly, ^^^^^^_^^^^^^^^^^^^is a matrix of shape WxI with each entry^^^^^^^^ =referring to the cumulated net demand peritem i over weeks ^^cum. In other words, each row in ^^^^^^_^^^^^^^^^^^^refers to the sum of net demand per item from the first week to the current week.

[0068] Furthermore, ^^^^^^_^^^^_^^^^^^^^^^^^^^is a matrix of shape WxI with each entry ^^^^^^^^^^ℎ^^^^ =where ^^^^^^^^^^^^refers to the matrix of max-on hand horizons as provided by Supply Planners. Each entry ^^^^ℎ^^^^refers to the allowed maximum on-hand horizon per week w and item i. In other words, each entry in ^^^^^^_^^^^_^^^^^^^^^^^^^^refers to the summed net demand over the allowed on-hand horizon.

[0069] Finally, ^^^^^^^^^^^^^^ℎ^^and ^^^^^^^^^^^^^^^^^_^^^^^^^refer to matrices containing the max on-hand and independent demand penalties per week w and item i. Each entry inrefers to the resource cost / penalties per week w andproduction resource ^^ ∈on the primary and secondary resources,respectively.

[0070] ^^^^^^^^refers to a matrix of storage cost where each 1, ^^^^^^ > 0^^^^^^ = { 50, ^^^^^^ = 0Equation 5 100, ^^^^^^ < 0

[0071] These storage costs may be considered a “naive” penalty applied to each case of excess stock. Naturally, items with no demand or items whose demand is already covered, by scheduled receipts or on-hand inventory will be penalized more versus items without demand coverage.

[0072] Finally, the constraints are built based on one or more of:Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 ^^. ^^^^^^^^^^^^^^^^ ^^^^^^^^^^which refer to the maximum and minimum capacity of a production line in a week w. ^^^^^^ ^^^^^^^^^^^^^^ which refer to the maximum and minimum inflow matrices of shape WxI. Each entry max_^^^^^^ / min_^^^^^^refers to the max / min inflow for item i in week w, respectively. ^^. ^^^^^^^^^^ refers to the Minimum Run Length (MRL) defined for week w on MRLfamily f.

[0073] The MRL constraint is implemented using the Big M method in order to create the if / else condition. To achieve this, two additional helper variables may be introduced in the optimization problem. One of the helper variables may be a Boolean variable to activate / deactivate the MRL constraint. The other helper variable may be an integer that helps to correctly specify the MRL even for small values of

[0074] The objective function simplifies the equations as shown below in case where Infinite Carry-Forward is switched “off” for all items i: minsubject to the same constraints as given above. Here, ^^^^^^^^^^^^^^ ^^^^^^^^refer to the matrices of Excess and Unmet Demand per week w and item i, respectively. They are defined as follows: ^^^^ ^^0^^ > 0^^^^^^ℎ^^^^^^^^^^^^ ^^^^ ^^0^^ > 0^^^^^^ℎ^^^^^^^^^^^^Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1Equation 6

[0075] Depending on the amount of items for which Infinite Carry-Forward is switched “off,” the objective function may be a mix of the two functions presented above (e.g., some items are allowed to carry demand forward, others are not) or simplify to one or the other (all items are allowed / are not allowed to carry demand forward). The Big M method is used in order to add to the constraints that calculate E and U as per definitions above. On top, two more Boolean variables are introduced, to help identify whether or not ^^0^^ > ^^0^^ and vice versa.

[0076] The output of the system may include DSI_Report_ltem (e.g., Overview of weekly Demand, Firm Supply, Planned Production, Unmet Demand and Balance per item), RESMETRIC_ModeltemHour (e.g., Weekly output quantity by modes and items), RESMETRIC_ModeSolution (e.g., Weekly utilization in hours per mode), RESMETRIC_Utilization (e.g., Weekly utilization of production line at a location in hours), SKUMETRIC_Production (e.g., Weekly production quantity per item at a location).

[0077] For example, a production line may be setup for a one-to-many relationship between the production resource outputting semi-finished goods (SFGs) and several packaging resources that ultimately create the finished good (FG), consuming a certain amount of SFGs in the process. This may require a slightly different setup for the HAG_MMS model's "Plato Production Step" (Table 1) and "Plato Production Yield" (Table 2) tables. Table 1 Site Model Production Resource Resource Type Factor Method Name Type Description FR08 HAG_MMS MODE310 PROD@ 0 Semi- 1.000000000 HAG Finished Peanut Production ColorflexAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 MODE311 HAG BS 1 Primary 0.000169650 N10 Production Colorflex MODE311 PROD@ 0 Semi- 1.000000000 HAG Finished Peanut Production Colorflex MODE312 HAG BS 1 Primary 0.000196078 N50 Production Colorflex MODE312 PROD@ 0 Semi- 1.000000000 HAG Finished Peanut Production Colorflex MODE313 HAG BS 1 Primary 0.000140056 P10 Production PROD@ 0 Semi- 0.220000000 HAG Finished CHOCO Production PROD@ 0 Semi- 0.230000000 HAG Finished CRISPY Production PROD@ 0 Semi- 0.550000000 HAG Finished PEANUT Production Table 2 Site Model Production Output Item Effective In Output Method Date Rate FR08 HAG_MMS MODE311 HAG PNUT Past 1.00 PCHCOLOR PGJAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 MODE312 HAG PNUT Past 1.00 PCHCOLOR PGJ MODE313 HAG MIXUP Past 1.00 FAM

[0078] For most line setups, the "Factor" column in the Production Step table (Table 1) may be set to 1 for all modes. The Production Yield (Table 2) Table's Output Rate column may indicate an expectant production output on a given mode within an hour. This interpretation changes for HAG_MMS. For example, in the HAG_MMS setup, the "Output Rate" column in the Production Yield table may be fixed to 1 for all modes. The "Factor" column in table Production Step however, may now vary.

[0079] Consider MODE 311 in Table 1 and Table 2 above. There is a distinction into a primary production and semi-finished production on the resources belonging to this mode. The "Factor" of 1 on the SFG resource may indicate a required consumption of 1 kg of SFGs in order to produce 1 kg of FGs, as shown by Mode 311's entry in the "Output Rate" column of the Production Yield table. The "Factor" on the primary resource may be interpreted as the time required on the packaging machine to produce 1 kg of FG (again, as indicated in the "Output Rate" of the Production Yield table). Considering MODE 313, it is also possible that 1kg of FGs (see Production Yield table, “Table 2”) requires a mix of several SFGS, in this case approximately 220 grams of Chocolates, approximately 230 grams of Crispy, and approximately 550 grams of Peanuts.

[0080] While the capacity of the primary resource may be given in hours, the capacity of the semifinished production lines may be now given in kgs. The following outlines roughly how the required constraints may be implemented in order to cater to these requirements. In particular, the "Factor" on primary production resources may be converted into the number of FGs that may be produced in an hour, similar to the original interpretation of the "Output Rate" in the Production Yield table.

[0081] For example, in the case of MODE 311, approximately 1 kg of FGs may require approximately 0.000169650 hours on the primary resource, here, the packaging machine. Hence, one hour on MODE 311 may produce approximatelyAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 5,894.48 kgs of FGs (assuming the required SFGs are available). The optimization routine may be implemented on all other models, thereby optimizing the mode hours required to meet as much demand as possible while adhering to all other constraints. The difference to other models is that specific constraints may not be on the semi- finished production lines, ensuring that FG production does not exceed the availability of SFGs, etc. In other words, the maximum production may now either be limited by the amount of FGs that can be produced on the packaging machine or by the amount of SFGs produced on the semi-finished production resources. However, when calculating the utilization on the semi-finished production resource the "Rate Factors" may be required to be analyzed as well.

[0082] FIG.4 is a diagram illustrating a solution architecture, according to one or more embodiments. As illustrated in FIG.4, user 415 (or user device 415) may communicate with middleware 405. Middleware 405 may communicate with Data API 410. Middleware 405 may communicate with server 420. Middleware 405 may transmit data to user scripts 425 and message center 430. User scripts 425 may communicate with message center 430.

[0083] FIG.4 may demonstrate a deployment architecture of an Optimization Routine (e.g., PLATO) with a supply chain management platform (e.g., Rapid Response Framework from Kinaxis®). In this setup, user 415 may interact with the Rapid Response Framework both for requesting a solve as well as viewing the returned results. Middleware 405 (which may be similar to the middleware 120 as described above in the description of FIG.1) may be implemented via, for example, Microsoft Azure Functions, and may orchestrate one or more of the following: data queries from Rapid Response via Rest APls, authentication via key vault 150 for example, data preprocessing for the optimization routine with server 420, and creation of the optimization problem.

[0084] For example, user 415 may transmit an HTTP request to middleware 405 via a Rapid Response Framework (not shown). Middleware 405 may apply an HTTPWrapper function to the HTTP request. The function may parse the HTTP request for relevant information and / or reformat the request for processing at additional servers or APIs, In some instances, additional servers and APIs may be expecting communication in a particular format. For example, RESTful APIs may communicate in JSON. In other instances, servers may be expecting tabular dataAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 structure with labeled axes (e.g., rows and columns), such as a pandas dataframe coded in Python. Middleware 405 may convert the HTTP request into a JSON format for communicating with the additional servers and APIs. Requests may be stored for queuing and organizing.

[0085] Based on the parsed relevant information from the HTTP request, middleware 405 may request additional information from Data API 410. The additional information requested may be received in a workbook, worksheet, database, spreadsheet, table, or other format. The requests for additional information may include data necessary to formulate an optimization problem relevant to the HTTP request or data necessary to solve the optimization problem requested by the user 415. Middleware 405 may generate an optimization problem based on received information from Data API 410 and the parsed information from the HTTP request transmitted by user 415. The optimization problem may then be sent to a Virtual Machine running an instance of Gurobi's Compute Server, requesting a solve of the optimization problem. The Virtual Machine may be server 420. Server 420 may be similar to server 140 as described above in the description of FIG.1.

[0086] For security reasons, server 420 may be located behind a firewall. When communicating with a server located behind a firewall, security may require network-level permission and proper authentication. In such a scenario, middleware 405 may communicate with key vault 150 to retrieve the necessary credentials, as described above in the description of FIG.1. The credentials may be an API key, a certificate, one or more tokens, or other credential. Such steps allow accessing a server behind a firewall without hardcoding sensitive information. For example, middleware 405 may provide an authorization, such as a managed identity or a secure token, to key vault 150. Once authorized, middleware 405 may access a stored credential and uses it to authenticate with server 420 located behind the firewall. This approach may separate securing authentication credentials from the application code, enhance security, and support secure access to services in restricted network environments.

[0087] After transmitting the optimization problem to server 420, server 420 may determine a solve (e.g., a solution) to the optimization problem and transmit the results (e.g., the solve) to middleware 405. For example, server 420 may includeAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 one or more algorithms (e.g., script, code, functions, etc.) that may receive the optimization problem and perform optimization functions to determine an optimal solution. For example, a script within server 420 may contain an optimization function which builds out the optimization problem and solves it using a cvxpy Python package. This script may also include functions for creating and writing output files.

[0088] For example, server 420 may include a main function that reads required data and performs the weekly solve for all required weeks. In some instances, server 420 may create several output files: RESMETRIC_Utilization.csv, RESMETRIC_Production_matrix.csv, dsi_report.csv. In case of time-phased input individual solves OVER THE FULL time­ horizon may be created. For that reason, a max_date_demand may be introduced to select only the part of the solve for a given time-phased batch. This may guarantee the time-phased solves may not be restricted to seeing only the demand for the given solve but all the demand going forward.

[0089] Server 420 may output the solve to a CVS file aligned with existing formats. Additionally, or alternatively, server 420 may create specific reports associated with the HTTP request. For example, server 420 may create a Demand / Supply / Inventory report. The reports may be used to assess the quality of a given optimization solve by highlighting a number of overall unmet demands per week. Other reports that may be generated by server 420 based on a solve may include dates, output, or mode combinations. The mode combinations may reflect a different rate of production depending on given information by the one or more data APIs. Reports may also indicate production quantity, calculate excess stock, and determine unmet demand.

[0090] Server 420 may transmit the solve to middleware 405 for further transmitting to user 415. Middleware 405 may format the results to the optimization problem (e.g., the solve) for readability and clarity. For example, middleware 405 may format the data in a required format, such as JSON. In some instances, middleware 405 may format the data in workbooks, worksheets, spreadsheets, tables, and other data organization formats. For example, middleware 405 may format the solve into a Pandas dataframe. Middleware 405 may transmit the resultsAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 (the solve) to Kinaxis' Rapid Response Framework, for example message center 430, using REST APIs, for example user scripts 425.

[0091] This deployment architecture may be quite flexible when it comes to scaling as it leverages serverless compute (e.g., Azure Functions) for orchestration. On top, the Gurobi® Compute Server (e.g., server 140) may be scaled up if needed. The existing arrangement of hosting the Gurobi® service on a virtual machine (e.g., server 420) may be easily replaced with Gurobi’s Instant Cloud service, or another existing Gurobi® service with alternative hosting setup. Furthermore, the deployment architecture proposed for the Kinaxis® use case may allow for seamless integration with any other service that supports REST API calls.

[0092] FIG.5 is an example data flow diagram, according to one or more embodiments. As illustrated in FIG.5, a user may, at step 505, create an HTTP request. The HTTP request may include one or more inputs, such as transactional data, one or more constraint parameters, penalties maintained by Supply Planners, and other constraints. Further, the HTTP request may inquire for an optimal run time of items on a production line, in order to ensure the most efficient allocation of resources, reducing waste and maximizing throughput without compromising production quality. Further, the HTTP request may request an optimal run time for items on a production line to meet as much demand as possible while minimizing excess stock and allowing user to control stock pre-built and choice of production resources subject to specified hard constraints.

[0093] The HTTP request may be sent, at step 510, to a middleware for one or more compute services, e.g., Azure Functions. For example, middleware may be middleware 120 as described above in the description of FIG.1. In some instances, the middleware at step 510 may include Azure Functions and incorporate the middleware 405 as described above in the description of FIG.4. At step 515, the one or more Azure Functions, or similar software, may parse the HTTP request for relevant information related to the optimization query from the user. In some instances, parsing the HTTP query may include formatting the HTTP request into JSON in order to be processed by one or more servers or APIs. For example, a Data API, such as a Rapid Response Data API, may expect data in JSON at step 520. The Azure Functions, or middleware 405, may analyze the parsed request for relevant data, such as factory data, timing requirements, current supply, currentAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 demand, on-hand stock, or other relevant data related to the optimization request. Additional data may be received at the middleware from additional servers and APIs by sending the JSON formatted request to the additional servers and APIs. The additional data may include master data, event factory data, scheduling data, and other additional data relevant to the HTTP request.

[0094] The data parsed and / or received associated with the HTTP request may be then analyzed to create an optimization solve at step 525. Creating an optimization solve may first require creating an optimization request based on the parsed HTTP request and received associated data, then solving the request as demonstrated at step 530. For example, middleware, such as one or more Azure Functions, may analyze the master data and event factory data to generate an optimization request based on the parsed HTTP request. The optimization request may be transmitted to a server, such as a Gurobi® solver, which may then generate an optimization result based on one or more algorithms and / or functions. The optimization result may be programmatically transformed and routed through the one or more Azure Functions (middleware) for downstream processing and automated report generation at step 525.

[0095] For example, a report may be generated at step 535 for the user to view at step 545. The report may contain the solution (solve) formatted for a user display. To illustrate, at step 540, the optimization results from step 530 may be formatted into JSON by middleware for displaying at a Data API, such as a Rapid Response Data API. One or more middleware, such as server 420, may process the results from step 530 for formatting and user viewing at step 545.. Finally, the results may be displayed in the front-end of the Rapid Response Data API for viewing by the user.

[0096] The present disclosure may address the technical problems and shortcomings present in conventional approaches by providing an innovative demand and supply planning tool configured to create opportunities for designing an in-house planning capability. In this way, a processing plant may produce several items concurrently with varying output rates depending on the combination of items produced. Additionally, optimal use of production capacity while being mindful of storage cost and maximize customer satisfaction may be calculated and implemented. Additionally, the method may easily cater to plant-specific needs andAttorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 support scenario-planning type of initiatives, enabling manufactures to ensure the most efficient allocation of resources, reduce waste, and maximize throughput without compromising quality. In such processes, half of the volume in target segment and region may be planned using the above process.

[0097] The present disclosure may provide for optimized design principles, such as real-time integration. Additionally, the present disclosure may leverage APIs to seamlessly integrate with API-enabled planning tools. In such a way, a user may request a solve straight from a front end and results may be passed back in real- time. Further, the one or more embodiments may provide for a middleware component that organizes the communication between the front end and a server hosting the Gurobi® licenses.

[0098] The middleware requests may input data which may be employed to form an optimization problem, contact a server to solve the problem, and pass back the results to the front end. Further, the middleware has been created to be scalable with minimum effort. For example, the middleware may accommodate higher throughput as well scaling to new segments and markets. Additionally, the middleware may be hosted within a cloud platform, such as Microsoft‘s Azure Cloud Platform. As such, any market may leverage the middleware for optimized production planning, irrespective of the planning tool they use.

[0099] In one or more embodiments, the system may receive input data (e.g., automated data, hard constraints, soft constraints, switches, etc.), perform data preprocessing (e.g., formatting, time phasing, etc.), and define and solve optimization problems (e.g., obtain the optimal run times of items on production lines while meeting as much demand as possible, minimizing excess stock, allowing users to control stock pre-built, choice of production resources subject to hard constraints).

[0100] In one or more embodiments, the system may be a mathematical optimization tool designed to work with Capacity and Production Planning systems to generate a production of manufacturing families in weekly time buckets. The output of the system may be Kilograms per Week of each manufacturing family that are passed back to the planning system where it is used to define the weekly production capacity for each family. A user interface may be constructed in a supply chain management platform, for example, Kinaxis Rapid Response, where the model master data may be maintained and through which all input and output data flows.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1

[0101] While principles of the present disclosure are described herein with reference to illustrative embodiments for particular applications, it should be understood that the disclosure is not limited thereto. Those having ordinary skill in the art and access to the teachings provided herein will recognize additional modifications, applications, embodiments, and substitution of equivalents all fall within the scope of the embodiments described herein. Accordingly, the invention is not to be considered as limited by the foregoing description.

Claims

Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 CLAIMS We claim:

1. A method comprising: receiving, by a server, a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool; determining, by the server, a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool; and transmitting, by the server and via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.

2. The method of claim 1, wherein the input includes a production yield table that identifies a quantity of the product to be produced in a timeframe at a production site.

3. The method of claims 1 or 2, wherein the input includes a demand table that identifies an expected demand quantity of the product to be produced at a production site.

4. The method of any of the preceding claims, wherein the input includes an on-hand table that identifies on-hand stock of the product at a production site.

5. The method of any of the preceding claims1, wherein the input includes a production schedule table that identifies scheduled receipts of the product at a production site.

6. The method of any of the preceding claims, wherein the input includes a firm plan table that identifies a fixed schedule production of the product at a production site.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 7. The method of any of the preceding claims, wherein the input includes a parameter table that identifies constraint parameters and penalties.

8. The method of any of the preceding claims, wherein the input includes a prevent excess switch that identifies whether a production quantity of the product should be limited or if an unlimited production quantity is acceptable.

9. A server comprising: a memory configured to store instructions; and one or more processors configured to execute the instructions to perform operations comprising: receiving a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool; determining a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool; and transmitting, via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.

10. The server of claim 9, wherein the input includes a production yield table that identifies a quantity of the product to be produced in a timeframe at a production site.

11. The server of claims 9 or 10, wherein the input includes a demand table that identifies an expected demand quantity of the product to be produced at a production site.

12. The server as claimed in any of the preceding claims, wherein the input includes an on-hand table that identifies on-hand stock of the product at a production site.Attorney Docket No.: 00307-0127-00304 Mars Ref. No.: MARS / P / 386756 / WO / SEC / 1 13. The server as claimed in any of the preceding claims, wherein the input includes a production schedule table that identifies scheduled receipts of the product at a production site.

14. The server as claimed in any of the preceding claims, wherein the input includes a firm plan table that identifies a fixed schedule production of the product at a production site.

15. A non-transitory computer-readable medium storing instructions that, when executed by one or more processors of a server, cause the one or more processors to perform operations comprising: receiving a solve request via middleware based on an optimization request received via a user interface of an agile supply chain management tool; determining a solve result based on input data received via an application programming interface (API) of the agile supply chain management tool; and transmitting, via the middleware, the solve result to the user interface of the agile supply chain management tool to display a production plan of a product at a production site based on the optimization result.