Categories for Planning and Scheduling

Categories for Planning and Scheduling

Categories for Planning and Scheduling Reactor Hold/Hold/ Hold/ Hold/ Hold/ Hold/ Blender Equipment Centrifuge Tote Hold Hold Hold Hold Hold Hold h 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 h 10 20 30 40 50 60 70 80 Spencer Breiner, Peter Denno, and Eswaran Subrahmanian 1. Introduction easier to digest. The presentation is not self-contained— Applied category theory is an ongoing effort to use the ab- we won’t review standard definitions of functors and nat- stract machinery of category theory (CT) to organize math- ural transformations—but we have tried to minimize our ematical knowledge across a wide range of science and reliance on prior knowledge. We recommend [Spi14] for engineering [BPS20]. Mostly this requires a change of fo- a more careful development. cus; the same tools designed to handle cohomology and Our primary goal is to demonstrate the capabilities of quantum groups fit surprisingly well with more down-to- category theory as a formal modeling language. It provides earth subjects like process planning and error diagnosis an extremely precise and expressive set of constructions [BJS19, BMRPS20]. both internally (within the model) and externally (in the This paper gives an introduction and case study in the meta-theory). The general principles are relevant for both use of CT for data modeling and transformation. The formal modeling languages like OWL, SysML or Modelica subject of the case study is a standard problem in oper- as well as generic modeling contexts like programming, ations research called open-shop scheduling. We make no database design and user interface. As we will show, CT claim to the originality of our methods, which ultimately supports a unique bottom-up methodology, with many derive from the well-developed field of categorical logic small models linked together in a web of functorial rela- [AR94]. Nonetheless, we hope that grounding this ma- tions. The rest of the paper is organized to highlight differ- chinery in a more pedestrian context will make the ideas ent features of the approach. Section 2 introduces functorial semantics, the principle Spencer Breiner is a mathematician in the Information Technology Laboratory that nearly any model (in an informal sense) can be repre- at the US National Institute of Standards and Technology. His email address sented as a structure-preserving mapping is [email protected]. Peter O. Denno is a computer scientist in the Engineering Laboratory at the US 퐦퐨퐝퐞퐥 ∶ 퐒퐲퐧퐭퐚퐱 ⟶ 퐒퐞퐦퐚퐧퐭퐢퐜퐬. National Institute of Standards and Technology. His email address is peter [email protected]. Syntax specifies the parts of the model and their relation- Eswaran Subrahmanian is a research professor in the Engineering Research Ac- ships; the semantics determines how these relationships celerator and the Department of Engineering and Public Policy at Carnegie interact. This approach is quite general, ranging from clas- Mellon University. His email address is [email protected]. sical logic to quantum computation, and plays an impor- Communicated by Notices Associate Editor Emilie Purvine. tant role in the theory of programming languages. We con- For permission to reprint this article, please contact: sider a more pedestrian example, constructing a simple [email protected]. category 풫 to represent open-shop scheduling, a standard DOI: https://doi.org/10.1090/noti2186 problem in operations research. 1666 NOTICES OF THE AMERICAN MATHEMATICAL SOCIETY VOLUME 67, NUMBER 11 Jobs 푗1 푗2 푗3 푗4 1 2 3 4 5 6 7 8 9 10 횜횊횠 2 hr 2 hr 2 hr 2 hr 횜횊횠 푗1 푗3 푗2 푗4 획횛횒횕횕 2 hr 3 hr 0 3 hr 획횛횒횕횕 푗2 푗4 푗1 횕횊횝횑횎 2 hr 3 hr 3 hr 0 횕횊횝횑횎 푗3 푗2 푗1 Machines 횖횒횕횕 2 hr 2 hr 2 hr 3 hr 횖횒횕횕 푗4 푗1 푗3 푗2 Figure 1. An open-shop scheduling problem and solution involving four jobs and four machines. The most novel feature of categorical modeling is its In an open-shop problem, tasks can be ordered however extensive use of functorial (composition-preserving) rela- we like, subject to two no-overlap constraints. Thus a valid tionships between data models. We illustrate this in Sec- schedule is defined by an assignment of start and stop times tion 3 by defining an open-shop solution category 풮 along 푠푗푚 ≤ 푡푗푚, with 휏푗푚 = 푡푗푚 − 푠푗푚 and with a functor 퐹 ∶ 풫 → 풮. Together with functorial seman- ′ tics, 퐹 induces canonical change-of-base transformations (a) ∀푗 ≠ 푗 ∀푚 (푡푗푚 ≤ 푠푗′푚) ∨ (푡푗′푚 ≤ 푠푗푚), (1) (Δ퐹 , Σ퐹 ) that can be used to move data from one context ′ ∀푗 ∀푚 ≠ 푚 푡 ≤ 푠 ′ ∨ 푡 ′ ≤ 푠 . to another. (b) ( 푗푚 푗푚 ) ( 푗푚 푗푚) Starting from an extremely limited vocabulary (objects, The first condition says that a machine cannot work ontwo arrows, composition), CT achieves remarkable expressivity jobs at once; the second that each job is processed on one through an extensive collection of design patterns used to machine at a time. When presented as a scheduling chart model commonly recurring phenomena. In Section 4 we (Figure 1) the no-overlap conditions are easy to verify by introduce just one of these—a design pattern for indexed looking at rows and block labels, respectively. families called the slice construction—and show how it can be used to generalize the traditional open-shop problem 2.1. Schemas & instances. These definitions can be sum- in two different ways. marized as a pair of structured categories, called schemas, 퐹 ∶ 풫 → 풮 In Section 5 we extract a scheduling problem on-the-fly together with a (structure-preserving) functor . 풫 from independent but overlapping data sets, demonstrat- In this section we discuss the problem schema , which is ing a very general approach to data integration. We rely easy to specify, but requires some unpacking: on CT’s self-referential meta-theory: schemas and functors 휏 / 풫 ≔ ⟨ 홹 × 홼 횁 ⟩. (2) form a category, so categorical constructions can be used to specify modeling operations. Section 3 will cover the solution schema 풮 and the rela- Section 6 introduces a discussion of optimization and tionship 퐹. objective functions, which are ignored up until that point. Like any category, 풫 contains objects and arrows. Some These raise some subtle points regarding the definability of these are shown explicitly in the declaration, while oth- of aggregates like 푛-ary sums and maxima. Here we give ers can be inferred from context. Here there are four ob- a small novel contribution, formally defining an aggrega- jects (횁, 홹, 홼, 홹 × 홼) and seven arrows (휏, two product pro- tion strategy based on labeled bundles. jections, four identities). Finally, Section 7 puts these pieces together to construct We can think of the objects and arrows in 풫 as variables a heuristic solution for 풫. We’ll see that an algorithmic so- ranging over sets and functions. An instance of a schema lution to the problem (almost!) defines a second functor is an assignment of concrete sets and functions to these 퐴∶풮 →풫, mapping counter to the problem formulation 퐹. variables; the set of instances on 풫 is denoted 풫ˆ. For ex- 2. Open Shop Problems ample, the specific open-shop problem shown in Figure 1 corresponds to an instance 푃 ∈ 풫ˆ with In a typical scheduling problem the goal is to arrange the processing of 홹 jobs across 홼 machines, given that job 푗 must 푃(홹) ={푗1, 푗2, 푗3, 푗4}, be processed on machine 푚 for time (duration) 휏 ≥ 0. 푗푚 푃(홼) ={횜횊횠, 획횛횒횕횕, 횕횊횝횑횎, 횖횒횕횕}. This is usually represented as a 홹×홼 matrix of non-negative numbers, as in Figure 1. When 휏 = 0, this indicates “no 푗푚 We refer to {푗1, 푗2, 푗3, 푗4} as the interpretation of 홹 in 푃. processing,” and we refer to a pair 푗푚 with 휏푗푚 > 0 as a Similarly, 푃(휏) is interpreted by the 4×4 matrix shown in task. There are many variants, corresponding to different Figure 1. In categorical terms, all this data can be encoded underlying models of the factory floor. In this section we as a functor 푃 ∶ 풫 → 퐒퐞퐭, our first example of functorial introduce the simplest, open-shop scheduling, and use it to semantics. Moreover, as we will see in the rest of the section, motivate the main ideas of the categorical data model. 푃 is structure-preserving in two different ways. DECEMBER 2020 NOTICES OF THE AMERICAN MATHEMATICAL SOCIETY 1667 2.2. Types. Some schema elements, which we call types, covered here can be formalized in terms of limit/colimit do not act like variables. In the open-shop problem, dura- sketches [AR94].1 tion is always a positive number, so 횁 should behave like Generally speaking, we will assume that any construc- a constant: 푃(횁) ≡ ℝ+. To formalize this we introduce a tions used in a schema are preserved, as they specify the single subcategory 퐓퐲퐩퐞 shared by all schemas, and with intended interpretation. In an instance, a schema’s con- the same interpretation in all instances. This represents structions can be explicitly computed and checked in 퐒퐞퐭. a “standard library” of common mathematical structures. For a functor into another schema, preservation of struc- In practice, 퐓퐲퐩퐞 may refer to a fragment of the underly- ture encodes a family of proofs demonstrating that the ax- ing programming language (e.g., Java in [SSVW17]), and ioms in the domain (e.g., monicity) are satisfied by their we refer to its arrows as computations. interpretations in the target. The latter will be important Here we were careful to distinguish the type 횁 from its in Sections 4 and 7.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us