Using A Scripting Language For Dynamic Programming
Louis P. Plebani · 2020
Abstract NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract Using a Scripting Language for Dynamic Programming Abstract In this paper we present a simple programming framework that can be used in teaching Dynamic Programming at an introductory level. The target audience for the framework is the student in an introduction to dynamic programming setting who possesses rudimentary programming skills. The framework takes advantage of the late binding features of the Python scripting language to allow students to model their problem with somewhat arbitrary data types and and to subsequently solve without worrying about more complex computer programming issues. Introduction Dynamic programming (DP) is a versatile technique for modeling and solving sequential optimization problems. While the approach is well known to the operations research community, its impact has been limited when compared to other mathematical programming techniques such as linear programming. Ironically, in part, this has been due to its flexibility. Because DP can be adapted to a myriad of problems and those models can be implemented in a variety of ways, many modelers, particulary inexperienced ones, are overwhelmed by the large number of choices. This is often referred to as the “art” of dynamic programming. Our goal was to provide a framework and base computer code for students to achieve an ease of modeling and solution for dynamic programming similar to what has been achieved for linear programming. In so far as the teaching dynamic programming, this will allow educators in operations research to focus their teaching on issues relevant to dynamic programming as opposed to computer programming issues; and allow students in operations research to focus their learning on the power of dynamic programming, as opposed to the nuances of computer implementations. Since the formulation of Dynamic programming (DP) by Bellman,1 it has been successfully applied to a variety of problems, including capacity planning, equipment replacement, production planning, production control, assembly line balancing and capital budgeting. Despite seemingly successful, dynamic programming has not been adapted nearly as readily, and thus successfully, as its mathematical programming counterparts such as linear and integer programming. Some of the reasons for this are the lack of standardization in representing dynamic programs and the lack of available software to aid implementation. The problem is exacerbated when an instructor attempts to introduce dynamic programming into an introductory level course because many students in these courses have not achieved the programming skill level required to program the problem specific solvers in a reasonable time efficient manner. Inevitable student frustration leads to limited experience and a decrease in learning. The standardized framework contained herein is an attempt to address these shortcomings.