Modeling and Solving Scheduling in Overloaded Situations with Weighted Partial MaxSAT

In real-time systems, where tasks have timing requirements, once the workload exceeds the system’s capacity, missed due dates may cause system overload. In this situation, finding an optimal scheduling that minimizes the cumulative values of late tasks is critical in both theory and practice. Recently, formalizing scheduling problems as a class of generalized problems, such as Satisfiability Modulo Theory (SMT) and Maximum Satisfiability (MaxSAT), has been receiving immense concern. Enlightened by the high efficiency of these satisfiability-based methods, this paper formulates the single-machine scheduling problem of minimizing the total weight of late tasks as a Weighted Partial Maximum (WPM) Satisfiability problem. In the formulation, scheduling features are encoded as rigidly enforced hard clauses and the scheduling objective is treated as a set of weighted soft ones. Then an off-the-shelf WPM solver is exploited to maximize the total weight of the satisfied soft clauses, provided that all the hard clauses are satisfied. Experimental results demonstrate that, compared with the existing satisfiability-based methods, the proposed method significantly improves the efficiency of identifying the optimal schedule. Moreover, we make minor changes to apply the WPM formulation to parallel-machine scheduling, showing that the proposed method is sufficiently flexible and well scalable.

known beforehand 1 (note that an offline algorithm does not contradict with a real-time system. An offline scheduling algorithm allows a scheduler to make decision based on the total knowledge of the problem, while a real-time system assigns each task with a specific due date). Although online scheduling is more flexible, in many situations, it is necessary to obtain optimal schedules by offline algorithms, especially in time-critical systems or for the evaluation of heuristics [8]. In this paper, we take an interest in designing an offline scheduling method on a single machine to minimize the total weight of tasks that miss their due dates.
To date, there has been an immense amount of work devoted to characterizing scheduling problems and analyzing the complexity of problems with specific characteristics. When preemption is prohibited, Michael Moore [9] presented an optimal algorithm in polynomial time to minimize the number of late tasks on a single machine, under the assumption that all tasks are released simultaneously without dependency relations. In the standard three-field notation [10], this problem is 1‖ U j . Adding weights on the criteria and setting precedence constraints may complicate the problem. Richard [11] showed that 1‖ w j U j is binary NP-hard but can be solved by dynamic programming in O(n p j ) time [12], where n is the number of tasks and p j is the processing time of task τ j . Garey and Johnson [13] showed that the problem of unit-time tasks subject to precedence constraints, that is, 1|prec, p j � 1| U j , is NP-hard. Furthermore, Lenstra and Rinnooy Kan [14] proved that, even for chain-like precedence constraints, where each task has at most one immediate predecessor and at most one immediate successor, the problem 1|chains, p j � 1| U j is also NP-hard. Another prevailing common knowledge is that usually preemptive problems are not harder than their nonpreemptive counterparts. For example, the problem with release dates 1|r j | U j is NP-hard [10], while the preemptive version 1|r j , pmtn| U j can be solved in O(n 3 k 2 ) [15], where k is the number of distinct release dates. Further complexity results for single-machine scheduling problems are listed by [16] and the scheduling problems with the late work criteria are surveyed by [17].
Algorithms for solving scheduling are generally classified as online scheduling and offline scheduling, depending on whether the full information about tasks is known a priori or not. Online algorithms aim to return high-quality results within reasonable CPU time [18][19][20][21], whereas offline algorithms are devoted to optimally solving scheduling problems, given that all data are known beforehand. For largescale problems that are computationally intractable, finding optimal solutions requires a significantly long computation time and heuristics are proposed to seek for suboptimal solutions within a short computation time [22][23][24]. Nevertheless, it is still of great significance to design optimization algorithms as a testbed for suboptimal solutions and reap huge benefit when the scheduled application is executed many times [8]. Previous attempts at finding optimal solutions to single-machine scheduling problems are mainly based on dynamic programming and branch-and-bound algorithms, with promising results. For a comprehensive survey, see the work by [25]. In the last decade, formalizing scheduling problems as a class of generalized problems, such as Mathematical Programming (MP) [26][27][28][29][30][31], Satisfiability Modulo eory (SMT) [8,[32][33][34], Boolean Satisfiability (SAT) [35][36][37], and Partial Maximum (PM) Satisfiability [38], has received considerable attention. Motivated by the significant progress in solving these generalized problems, the formalized scheduling problem can be efficiently addressed with the corresponding solving algorithms.
As a pioneering work in satisfiability formalization, Crawford and Baker [35] first encoded scheduling problems into a SAT problem, paving the way for subsequent work [36] that solved six types of open job-shop scheduling problems. Venugopalan and Oliver [27], Liu et al. [37], and Malik et al. [8] presented optimization frameworks to address task graph scheduling with communication costs based on MIP, SAT, and SMT, respectively. Qi et al. [34] utilized task duplication strategy-based SMT formulation to mitigate the negative impact of the interprocessor communication delay in the task graph scheduling problem. Qamhan et al. [31] presented a new MILP model to schedule a set of tasks on a single-machine subject to nonzero release date, sequence-dependent setup time, and periodic maintenance. e objective of all the above formulations is to minimize the maximum completion time makespan.
To achieve the goal of minimizing the number of late jobs, Ourari et al. [26] designed a mathematical integer programming formulation for single-machine scheduling without preemption, and Hung et al. [29] developed a nonstandard MIP formulation to address the arbitrary preemptive version on parallel machines. e restricted preemptive counterpart on a single machine was solved by Cheng et al. [32], which encoded the problem as a set of firstorder formulas that are tackled by an SMT solver called Z3. By running the Z3 solver repeatedly to identify the maximum number of on-time tasks, the optimal schedule could be finally determined. e SMT-based scheduling is sufficiently flexible because it handles various task properties and objectives with very few changes in adaption procedure. For example, when tasks have different importance values and the objective turns to minimizing the total weight of late tasks, only the target constraints need to be modified [33]. Later on, Wang et al. [39] enhanced Cheng's SMT formulation by removing redundant constraints and eliminating successive calls of the Z3 solver. Experiments illustrated that the updated formulation improved the efficiency by more than two orders of magnitude. Recently, Liao et al. [38] encoded the unweighted version of the same scheduling problem into Boolean propositional logic and showed that PM solvers are a competitive alternative to SMT solvers. However, we notice that when encoding scheduling features, PM formulation generates redundant variables and clauses. Such redundancy may create extra calculations and decrease the overall performance. Furthermore, PM formulation presented in [38] is incapable of handling weighted problems where the scheduling goal is to minimize the total weight of late tasks.
In this paper, we present a Weighted Partial MaxSAT (WPM) formulation to optimally solve scheduling in overloaded situations, with the aim of minimizing the total weight value of late tasks. e minimization objective is equivalent to maximizing the total weight of the tasks meeting their due dates. Confronted with a weighted scheduling problem, we first identify scheduling features that uniquely characterize the problem, facilitating the WPM formulation in the encoding phase. en, enlightened by the WPM characteristics that satisfy all hard clauses and maximize the total weight of the satisfied soft clauses, we recast the weighted scheduling problem as a WPM problem. Finally, in the problem-solving phase, we exploit the off-theshelf WPM solver to satisfy all the scheduling features and maximize the total weight of tasks meeting their due dates, thus deriving the optimal schedule from the output of the WPM solver. Specifically, we make the following contributions: (i) We extend the PM formulation in [38], which was originally designed for scheduling tasks without weights, to adapt to the weighted cases.
(ii) Having noticed that redundant Boolean variables and clauses exist in the previous formulation [38], we develop a more compact encoding to characterize the scheduling problem. Particularly, to denote a task's completion time, the number of Boolean variables generated by [38] is proportional to the number of possible preemptions of the task. In contrast, the novel compact encoding generates only one Boolean variable to represent the task's completion time, no matter how many times the task may be preempted. eoretical analysis shows the correctness of the compact encoding and experiments demonstrate the substantial advantages over the previous PM encoding [38] and SMT formulation [39], which was enhanced from [33].
(iii) In the WPM encoding, task features are encoded by several separate rules. is means if some of the task features happen to change, only partial rules need to be modified. To demonstrate the flexibility of our formulation, we extend the current WPM encoding to adapt to parallel-machine scheduling with little modification. We believe that the proposed WPM encoding can help users readily and effectively design scheduling for practical systems with low design cost.
Confronted with a weighted scheduling problem, we first identify scheduling features that uniquely characterize the problem, facilitating the WPM formulation in the encoding phase. en, enlightened by the WPM characteristics that satisfy all hard clauses and maximize the total weight of the satisfied soft clauses, we recast the weighted scheduling problem as a WPM problem. In the WPM formulation, tasks' features are encoded as a set of hard clauses, and the goal of completing tasks before their due dates is transformed into a set of weighted soft clauses. Finally, in the problem-solving phase, we exploit the off-the-shelf WPM solver to satisfy all the scheduling features and maximize the total weight of tasks meeting their due dates, thus deriving the optimal schedule from the output of the WPM solver.
To evaluate the performance of the proposed WPM formulation, we compare it with the state-of-the-art SMT formulation [39]. Our evaluation shows that WPM formulation has a dominant advantage over the SMT-based method in finding out the optimal schedule. We also compare WPM with the latest PM formulation [38] on a special case, where all the tasks have equal weights. We reveal redundancies in PM and discuss how they can be avoided in WPM. Experiments show that our WPM encoding is more compact and more time-efficient than PM for solving the same set of problem instances. Furthermore, we show that the presented approach is sufficiently flexible to adapt to parallel-machine scheduling problems with minor changes. e remainder of this paper is organized as follows. e scheduling model is described in Section 2, followed by the WPM-based optimization framework in Sections 3. We make theoretical comparisons between WPM and PM formulation [38] in Section 4 and provide experimental results to show the superiority of WPM in Section 5. Section 6 exhibits how to extend the WPM formulation of singlemachine scheduling to parallel-machine scheduling. Finally, we conclude this paper in Section 7.

Scheduling Model
We adhere to the definition of scheduling problems in previous works [33,39]. For convenience, the notations used in the model are summarized in Table 1.
e problem involves n tasks Γ � τ 1 , . . . , τ n to be processed. All the tasks request a uniprocessor for execution when they arrive in the system. Each task τ ℓ ∈ Γ is represented by a 4-tuple τ ℓ � (r ℓ , c ℓ , d ℓ , w ℓ ), where r ℓ , c ℓ , d ℓ , and w ℓ are all nonnegative integers 2 (assuming all parameters to be integers does not make the problem less general since real numbers can be scaled to integers with a few orders of magnitude) representing the release date, the execution time, the due date, and the weight of τ ℓ , respectively. Naturally, r ℓ + c ℓ ≤ d ℓ . Weight w ℓ reflects the importance of task τ ℓ . e larger w ℓ is, the more important τ ℓ is. Given due date d ℓ , if task τ ℓ is completed at or before d ℓ , τ ℓ is on time and weight w ℓ is obtained by the system. Otherwise, τ ℓ is late and worthless to the system.
To allow preemption, which indicates that a running task may be interrupted and resumed later, each task τ ℓ ∈ Γ is split into q ℓ nonpreemptive subtasks (fragments) and is defined as a chain of indivisible fragments 〈f ℓ 1 , . . . , f ℓ q ℓ 〉. Symbol c ℓ i stands for the required execution time of f ℓ i . Clearly, can only start to run after f ℓ i−1 is completed. In practical systems, tasks usually have dependency relations. For example, if task τ ℓ requires the computed result of τ k , τ ℓ cannot start until τ k is finished. Such a dependency relation between tasks is written as τ k ≺ τ ℓ , where τ k is the immediate predecessor of τ ℓ , and τ ℓ is the immediate successor of τ k . Obviously, if τ k ≺τ ℓ , the constraint r k + c k ≤ d ℓ − c ℓ should be satisfied; otherwise, τ ℓ can never be completed no matter when its predecessor finishes. e set of task pairs that have dependency relations over Γ is denoted by R dp � (τ k , τ ℓ ): τ k , τ ℓ ∈ Γ, τ k ≺ τ ℓ .
A system is defined as overloaded if no scheduling algorithm can meet the due dates of all the tasks that have been submitted to it. is paper focuses on designing an exact method to tackle overloaded single-machine scheduling problems. e scheduling objective is to maximize the total weight of the on-time tasks. In particular, if all tasks have equal weights, then a schedule that maximizes the total weight will be one that maximizes the number of on-time tasks.

WPM-Based Optimization Framework
In this section, we provide the WPM formulation for solving the task scheduling problem on a single machine. e overview of the WPM formulation is illustrated in Figure 1.
Feature preprocessing identifies the scheduling problem with two types of constraints, that is, constraints on scheduling features and those on objective. Given a set of tasks Γ � τ 1 , . . . , τ n , scheduling features uniquely characterize the problem over Γ and the objective is to seek for a schedule that completes all tasks on time subject to constraints on the scheduling features. In overloaded situations, making all the tasks complete by their due dates is impossible, and the scheduling problem is then treated as an optimization problem, which aims to maximize the total weight of tasks that are completed by their due dates. After feature preprocessing, WPM encoding can be implemented separately on the scheduling features and objective. Specifically, scheduling features, which are intrinsic and determined when tasks are released, are encoded into a set of hard clauses that should be satisfied without exception. On the other hand, the objective in overloaded situations is encoded as a set of weighted soft clauses that are allowed to be unsatisfied. By conjunction of hard clauses with weighted soft clauses, the problem turns to a WPM problem that can be addressed by any off-the-shelf WPM solver. In the problem-solving phase, a WPM solver tries to satisfy all the hard clauses and maximize the total weight of satisfied soft clauses.
e output of the WPM solver includes the assignment of all Boolean variables, from which the optimal schedule can be derived. Section 3.1 shows how to identify fragments' critical time points to characterize the scheduling problem, paving the way for the WPM encoding described in Sections 3.2. Section 3.3 exhibits an example to show how the scheduling problem is addressed with the presented WPM encoding. Details on the problem-solving phase are also exhibited in Section 3.3.
3.1. Feature Preprocessing. Given a task set Γ � τ 1 , . . . , τ n , where each task τ ℓ ∈ Γ is characterized by (r ℓ , c ℓ , d ℓ , w ℓ ), ∀τ ℓ ∈ Γ, τ ℓ cannot start before its release date r ℓ . us, the possible Earliest Start Time (EST) of τ ℓ , denoted by EST ℓ , is equal to its release date r ℓ , and the Earliest Completion Time After EST ℓ for each τ ℓ in Γ has been determined, EST and ECT of each fragment in τ ℓ can be calculated as follows: In addition to EST and ECT, ∀τ ℓ ∈ Γ, each fragment f ℓ i ∈ τ ℓ is characterized by the two following types of time: If f ℓ i fails to start before LST ℓ i , τ ℓ cannot end by its due date d ℓ , and thus this task becomes worthless to the system.
Note that, in the above four critical time points, ECT is unrelated to our WPM encoding. Nevertheless, it is indispensable in the previous work [38], which will be discussed in Section 4..

WPM Formulation.
is section introduces how to encode the scheduling problem as a WPM problem. A WPM instance consists of a number of clauses that need to be managed by the WPM solver. To formulate all the necessary constraints that characterize the scheduling model, we introduce the three following Boolean variables: Set of task pairs that have dependency relations 4

Mathematical Problems in Engineering
Based on the generated Boolean variables, the WPM encoding can be implemented. In what follows, several rules are presented to encode the features of fragments into a set of hard clauses. e main encoding is derived and enhanced from previous work [35,36,38]. Logical implication a ⟶ b is equivalent to a∨b in classical logic. (1) , and then f k i and f ℓ j may require the processor at the same time. In this condition, (iv) (C4) ∀(τ k , τ ℓ ) ∈ R dp , if τ k fails to be completed by its due date, then τ ℓ cannot even start at LST ℓ 1 : (vi) (C5)∀τ ℓ ∈ Γ and ∀f ℓ i ∈ τ ℓ , if f ℓ i starts at or after time t, then it starts at or after time t − 1: (vii) (C6) ∀τ ℓ ∈ Γ, if τ ℓ ends before its due date d ℓ , then last fragment f ℓ q ℓ must start at or before time LST ℓ q ℓ . In other words, f ℓ q ℓ cannot start at or after time is formula reveals the following facts: , then f ℓ j starts at or after EST ℓ j . Otherwise, f ℓ j must start at or after time f k i finishes, that is, t + c k i . Up to this point, we have encoded the scheduling features as Boolean formulas that can be converted to a set of clauses. Since the scheduling features are intrinsic properties inherent in the tasks and their fragments, such clauses are specified as hard, indicating that all of them must absolutely be satisfied. For convenience, we refer to the set of hard clauses introduced in (C1) ∼ (C7) as C.
A task is said to be on time if and only if it is completed before its due date. us, the scheduling objective can be directly encoded by the following rule: (O) Maximizing the sum of the weights of on-time tasks: Mathematical Problems in Engineering 5 Equation (10) indicates that if clause eb ℓ is satisfied (i.e., evaluating to true), then weight w ℓ is gained; otherwise, the gain is zero. To simplify the discussion, we introduce O to denote the set of clauses in equation (10). In an overloaded system, not all tasks can be completed before their due dates. To handle such situations, we declare the clauses in O to be soft, indicating that completing all the tasks by their due dates is a soft constraint. Conjunct with C, the problem is then C, O { }. is leads to a WPM problem, which tries to find an assignment of variables to satisfy all the hard clauses in C and to maximize the sum of the weights of the satisfied soft clauses in O, that is, to maximize n ℓ�1 w ℓ · eb ℓ .
e MaxSAT formulation applied to the scheduling problem is shown in Figure 3. Constraint (C1) states that each task starts at or after its EST. Constraints (C2) and (C3) work together to specify the execution sequence of the fragments. (C2) forces all the fragments in a single task to be executed sequentially, and (C3) guarantees no overlap of the execution times of any two fragments in different tasks. In the three tasks, only τ 1 has more than one fragment, and hence constraint (C2) only applies to τ 1 , ensuring that f 1 1 precedes f 1 2 . Constraint (C3) applies to pairs of fragments f k i and f ℓ j (k ≠ l) satisfying EST k i < LCT ℓ j and EST ℓ j < LCT k i . If both conditions are met, then f k i and f ℓ j may simultaneously occupy the processor, and thus we need to decide in what order to execute them. Constraint (C3) tackles this ordering dilemma, which states that either one can precede the other. Consider f 1 1 and f 3 1 . As seen in Table 2, EST 1 1 < LCT 3 1 and EST 3 1 < LCT 1 1 ; hence, we must explicitly specify that f 1 1 precedes f 3 1 or f 3 1 precedes f 1 1 ; otherwise, the execution time of these two fragments may overlap. Constraint (C4) applies to a situation where tasks have dependency relations. In the example, τ 2 is the predecessor of both τ 1 and τ 3 ; thus we should give up processing τ 1 and τ 3 if τ 2 misses its due date. In addition, given d 2 � EST 1 1 and d 2 � EST 3 1 , there is no need to explicitly specify the execution sequence of the predecessor and successors since τ 2 must have finished before τ 1 and τ 3 start. Constraints (C5) ∼ (C7) are partially extracted from a collection of coherence conditions [35] on the introduced variables for all the fragments of all the tasks. Finally, constraint (O) gives the problem's objective, that is, completing the last fragment of each task by its due date.
All the clauses are conjunct with ∧ to form a WPM problem in CNF, where clauses (C1) ∼ (C7) are declared hard and those in (O) are soft. en the CNF formula is input to a WPM solver. e solver's output includes the maximum sum of the weights of the satisfied soft clauses as well as the corresponding assignment of all the Boolean variables.
In the exemplified problem, the assigned truth values of all the Boolean variables are listed in Figure 4, from which the exact start time of each fragment can be derived. Consider f 2 1 . sa 2 1,0 � 1 and sa 2 1,1 � 0 indicate that f 2 1 starts at or after time 0, but it does not start at or after time 1. en we can readily determine that f 2 1 starts at time 0. A similar reference can be made on f 3 1 , which starts at time 1. Both τ 2 and τ 3 can be completed by their due dates. is is ensured by eb 2 � 1 and eb 3 � 1. Now, consider f 1 1 . Figure 4 shows that sa 1 1,1 � 1 and sa 1 1,2 � 1. Since LST 1 1 � 1, that sa 1 1,2 � 1 means that f 1 1 cannot start at or before LST 1 1 . Similarly, as indicated by the fact that sa 1 2,3 � 1, f 1 2 cannot start at or before LST 1 2 either. us, we infer that τ 1 cannot finish on time. is is confirmed by eb 1 � 0. As a result, the maximized total weight of the completed on-time tasks is 2 + 3 � 5, achieved by completing τ 2 and τ 3 by their due dates.

Theoretical Discussion
Recall that, in the scheduling model described in Section 2, each task τ ℓ is represented as a 4-tuple τ ℓ � (r ℓ , c ℓ , d ℓ , w ℓ ). Consider a special case where the weights of all the tasks are equal to a constant w, that is, ∀τ ℓ ∈ Γ, w ℓ � w. According to Section 3.2, to encode this problem, a set of weighted soft clauses O � (eb ℓ , w) are introduced, where 1 ≤ ℓ ≤ n. Conjunct with hard clauses C, problem C, O { } becomes a special WPM problem with equal weights, which tries to find an assignment of variables to satisfy all hard clauses in C and to maximize w · n ℓ�1 eb ℓ . Obviously, the essence of maximizing w · n ℓ�1 eb ℓ is equivalent to maximizing n ℓ�1 eb ℓ . is is a PM problem encoded by [38], where each task τ ℓ is modeled as a 3-tuple τ ℓ � (r ℓ , c ℓ , d ℓ ), and the scheduling goal is to maximize the total number of on-time tasks. In this section, we make theoretical comparisons between PMbased [38] and our WPM-based optimization frameworks when all the tasks have equal weights.

Similarities of PM and WPM Formulations.
Essentially, the purpose of solving the scheduling problem is to determine the start time of each fragment to construct an optimal scheduling solution. To describe such crucial information, ∀τ ℓ ∈ Γ and ∀f ℓ i ∈ τ ℓ , a set of Boolean variables sa ℓ i,t (EST ℓ i ≤ t ≤ LST ℓ i + 1) are introduced to indicate whether f ℓ i starts at or after time t. As long as the truth values of sa variables are all assigned, we can readily determine the exact start time of each fragment. To be specific, if we find a certain Mathematical Problems in Engineering 0 for t > t ′ , then we can determine that the start time of f ℓ i is , we can conclude that τ ℓ is late. Note that it is impossible to designate sa ℓ i,t as true while making sa ℓ i,t−1 false, since if f ℓ i starts at or after time t, f ℓ i must start at or after t − 1. is constraint is interpreted by rule (C5) in our encoding. In addition, ∀τ ℓ ∈ Γ and ∀f ℓ i ∈ τ ℓ , the start time of f ℓ i should be at or after EST ℓ i . Compared with PM, WPM encodes this constraint in a more concise way by (C1). We postpone the discussion later in Section 4.2.
Aside from the inherent properties of a fragment's start time specified in (C1) and (C5), whether a fragment can start at a certain time is constrained by two other factors. e first is the execution order of the fragments, which should be explicitly pointed out in the following two situations: if two fragments belong to the same task, then they should be executed sequentially; if two fragments from different tasks may simultaneously occupy the processor, then either one can precede the other. e execution order of two fragments, f k i and f ℓ j , is characterized by Boolean variable pr k,ℓ i,j , and the constraints specified in the above two cases are interpreted by rules (C2) and (C3), respectively. If the execution order of the two fragments is determined, the relation of their start times should be specified. To be specific, if f k i precedes f ℓ j , then f ℓ j must start after f k i finishes. is constraint is guaranteed by rule (C7). Up to this point, all the Boolean variables and clauses introduced by PM and WPM are identical. at is, rules (C2), (C3), (C5), and (C7) are all consistent with those introduced in PM.    Mathematical Problems in Engineering 7

WPM Improvement.
As mentioned in Section 4.1, ∀τ ℓ ∈ Γ and ∀f ℓ i ∈ τ ℓ , the start time of f ℓ i cannot be earlier than EST ℓ i . PM interprets this constraint by introducing one hard clause sa ℓ i,EST ℓ i for 1 ≤ i ≤ q ℓ ; thus, a total of q ℓ clauses are generated for τ ℓ . In comparison, as described by (C1) in Section 3.2, WPM generates only one clause sa ℓ 1,EST ℓ 1 for each task τ ℓ ∈ Γ no matter how many fragments τ ℓ contains. By combining (C1) with constraints (C2) and (C7), we can easily obtain sa ℓ i,EST ℓ i � 1 for 1 ≤ i ≤ q ℓ , which is the same as that declared by PM. erefore, the updated rule (C1) reduces the number of generated clauses while maintaining the correctness of the encoding.
For tasks with dependency relations, their execution sequence may be explicitly or implicitly specified. In particular, ∀(τ k , τ ℓ ) ∈ R dp , PM indistinguishably generates pr k,ℓ q k ,1 for the dependency relation τ k ≺ τ ℓ . In fact, if the due date of τ k is no later than the EST of τ ℓ , that is, d k ≤ EST ℓ 1 , τ ℓ naturally starts after τ k is completed; thus the constraint that is explicitly imposed on the execution sequence is unnecessary and can be omitted safely. WPM formulation refined the encoding in (C4) by introducing pr k,ℓ q k ,1 to interpret the constraint that τ k precedes τ ℓ only when d k > EST ℓ 1 ; thus, redundant variables and clauses are eliminated.
Another factor that affects a fragment's start time is the completion time of a task. In general, if a task is expected to be completed by a particular time, then each fragment of the task should not start later than its LST. e relation of completion time and LST is encoded by PM and WPM in different ways. In PM, for each fragment introduced to indicate whether f ℓ i finishes at or before time t. en a set of hard clauses are generated to restrict the values of the eb variables.
(i) (H1) If f ℓ i ends by t, then it ends by time t + 1: (ii) (H2) if τ ℓ is completed by its due date, then, (iii) (H3) if f ℓ i starts at or after time t, then it cannot end before time t + c ℓ i − 1: In fact, not all the variables and clauses in (H1) ∼ (H3) are requisite. Given a task, instead of generating variables to characterize each fragment's completion time, it suffices to create only one variable to declare the task's due date and introduce one clause to clarify how the task's due date both restricts and is restricted by its start time. In particular, ∀τ ℓ ∈ Γ, WPM introduces Boolean variable eb ℓ to describe whether τ ℓ can finish by its due date. en a constraint is set to correlate the due date and the start time of τ ℓ as follows: if τ ℓ ends by d ℓ , then f ℓ q ℓ must start at or before LST ℓ q ℓ . In other words, if f ℓ q ℓ fails to start at or before LST ℓ q ℓ , then it cannot end by d ℓ .
is constraint is encoded by just one clause described in rule (C6), as declared in Section 3.2: In WPM, that eb ℓ � 1 leads to sa ℓ q ℓ ,LST ℓ q ℓ +1 � 0 by (C6). In addition, based on (C2) and (C7), it is clear that sa ℓ Combined with (H2), it is obvious that eb ℓ q ℓ ,d ℓ � 0. In WPM, we discuss the two following cases: (1) If critical f ℓ i , which makes sa ℓ i,LST ℓ i +1 � 1, is the last fragment in τ ℓ , that is, i � q ℓ , it is obvious that eb ℓ � 0 by (C6).

Example 1.
is example shows the differences between the PM and WPM formulations when dealing with the completion time. Assume that τ 1 � (0, 2, 3, 1) is a task in Γ, which contains two fragments 〈f 1 1 , f 1 2 〉. Each fragment has execution time 1. Table 3 shows the Boolean variables and the hard clauses introduced by PM and WPM to characterize the fragments' completion times.
First, we can determine that ECT 1 1 � 1, LCT 1 1 � 2, ECT 1 2 � 2, and LCT 1 2 � 3. To encode τ 1 , PM introduces a series of Boolean variables, eb 1 1,0 , eb 1 1,1 , eb 1 1,2 and eb 1 2,1 , eb 1 2,2 , eb 1 2,3 for f 1 1 and f 1 2 , respectively, representing whether each fragment is completed by time point t, where e relation of eb 1 i,t and eb 1 i,t+1 is specified by rule (H1). To make τ 1 finish by its due date, f 1 1 should be completed no later than time 2. is is guaranteed by rule (H2). Finally, the relation between a fragment's start and completion times is indicated by rule (H3). erefore, to constrain the completion time of each fragment, six Boolean variables and eleven hard clauses are generated by PM. By contrast, WPM introduces only one variable eb 1 to indicate whether τ 1 is completed by its due date. en a hard clause is generated to constrain τ 1 's due date and its last fragment's start time. In this way, both the Boolean variables and clauses generated by the WPM formulation are reduced. e experimental comparison of these two encodings is demonstrated in Subsection 5.3.

Experiments
In this section, we scrutinize the performance comparisons of the presented WPM formulation and two satisfiability-based formulations on a set of randomly generated problems. e experimental design is described in Section 5.1, followed by the evaluation of WPM, SMT [39], and PM formulations [38] in Section 5.2 and Section 5.3. All tests were conducted on a 3.4 GHz Intel E3-1230 processor with 8 GB RAM. e selected solver to evaluate WPM and PM is QMaxSAT [40], which is a SAT-based solver using the CNF encodings of cardinality constraints. e solver for SMT is Z3 [41], which is a high-performance theorem prover chosen by the previous SMT formulations [33,39].

Experimental Design.
e procedure for generating test instances is similar to [33,38,39], with a variety of parameter values. Tasks' release times are randomly generated following a discrete uniform distribution with an arriving rate λ, which represents the number of tasks that arrive during 100 time units. Clearly, a larger λ indicates that more tasks arrive in the system during a specific period of time, thus causing heavier overload. For each task τ ℓ , the execution time c ℓ and the number of fragments in τ ℓ (denoted by q ℓ ) are also randomly generated according to a discrete uniform distribution. e value of deadline d ℓ is calculated by the formula d ℓ � r ℓ + sf ℓ · c ℓ , where sf ℓ is a slack factor that reflects the tightness of the due date. Weight w ℓ of task τ ℓ is randomly chosen from 1 to n in Section 5.2 and is taken as constant 1 in Section 5.3. e number of rule pairs with dependency relations is set 10% to the total number of tasks.
We study the factors that may affect the performance of the satisfiability-based formulations. ese factors include the number of tasks n, the task density (determined by λ), the execution time c ℓ , the number of fragments q ℓ , and the slack factor sf ℓ . In the rest of this section, we run different types of experiments to test the possible changes on these parameters. Table 4 provides a summary of the experimental design, where DU(i, j) means the discrete uniform distribution over integer interval [i, j]. For each individual scenario, 100 problem instances are generated. For each instance and solver, we set a time limit of 300 seconds. If the solver fails to output the optimal result of an instance within the time limit, we terminate the procedure and move to the next problem instance.

Comparison on Weighted Case.
is subsection evaluates the behavior of WPM and SMT formulations [39] for maximizing the total weight value of on-time tasks. e main metrics for comparison include (1) the proportion of instances solved within the given time limit and (2) the average computation time spent on solved instances. e performances of these two formulations in different types of scenarios are shown in Figure 5. Each data point is the average computation time of the solved problem instances. A number with an arrow in the figures denotes the proportion of instances solved within the time limit and is omitted if the solver addresses all the 100 instances. When the proportion of the solved instances drops to zero, the corresponding curve is omitted.
As shown in Figure 5, both formulations perform worse with the increasing values of all parameters. Nevertheless, in all the varied scenarios, WPM substantially outperforms SMT in terms of both the average computation time and the proportion of successfully solved instances.

Comparison on Unweighted Case. A Partial MaxSAT
(PM) formulation for optimal scheduling on a single machine was recently presented [38]. e scheduling objective tackled by PM differs from our WPM formulation in that PM aims to maximize the total number of on-time tasks, while WPM tries to maximize the total weight of the on-time tasks. When all the tasks have equal weights, these two objectives become identical, and thus formulations on these two objectives are directly comparable. In this subsection, we compare the SMT, PM, and WPM formulations on the objective of maximizing the number of on-time tasks.    e overall results with varied n, λ, c ℓ , q ℓ , and sf ℓ are shown in Figure 6. MaxSAT encodings (both PM and WPM) solved substantially more instances than SMT within the time limit in all cases. As to the performance comparison between PM and WPM, the completion percentage of WPM is always no less than that of PM no matter how the experimental parameters change. To be specific, with the number of tasks n increasing from 50 to 300, both PM and WPM solved all the instances within the time limit (Figure 6(a)). In comparison, as any of the parameters λ, c ℓ , q ℓ , and sf ℓ increases, WPM formulation gradually surpasses PM with more completed schedules (Figures 6(b)-6(e)).
To compare the performances of PM and WPM more clearly, we provide more criteria for evaluation. e first criterion is the average runtime of PM and WPM formulations on their respective completed schedules. Note that when PM and WPM solve different numbers of instances within the time limit, the average runtime on solved instances may not clearly reflect the efficiency of these two formulations. For example, when q ℓ ∼ DU (1,12), WPM solved more instances than PM (as shown in Figure 6(d)) and meanwhile consumed longer time on solved instances (as shown in Figure 7(a)). In this case, the average runtime is on longer the proper metric to indicate the performance. On the other hand, we notice that, in all the tested scenarios, the instances that were solved by PM could also be addressed by WPM.
erefore, we provide a secondary criterion on runtime, that is, the average runtime of WPM, in solving the same set of instances as PM solved. Furthermore, since the computation time of MaxSAT-based methods is closely related to the numbers of variables and clauses, we collect such information for reference. e comparison results are illustrated in Figures 8-11 . Criteria for evaluating PM and WPM are summarized as follows: (i) e average runtime of MaxSAT formulations on their respective completed schedules. e corresponding information of PM and WPM is depicted  (iv) e average number of clauses generated by Max-SAT formulations.
Overall, the WPM formulation is more efficient than PM in both runtime criteria.
e only exception appears in Figure 7(a), where the average runtime of WPM and PM on solved instances when q ℓ ∼ DU(1, 12) is around 140 and 80 seconds, respectively. Although the average computation time taken by WPM is longer than that by PM, Figure 6(d) shows that WPM managed to solve 14 instances, while PM solved only 8 within the time limit. In this case, we resort to the secondary criterion on runtime. As shown in Figure 7(a), WPM consumed merely 60 seconds to solve all the instances completed by PM. us, it is correct to say that WPM can make a considerable improvement to the solving time. In addition, WPM achieved more compact encodings by significantly reducing the number of Boolean variables and slightly decreasing the number of clauses. In general, the computation time increases as the numbers of variables and clauses grow. is in turn explains why WPM achieves higher efficiency in our experiment.

Adaption for Parallel-Machine Scheduling Problem
While the WPM formulation is designed for single-machine scheduling, the encoding can be extended to parallel identical machines with minor changes. is section shows how to apply the WPM formulation to parallel identical machine scheduling problems. e parallel-machine scheduling involves processing n tasks Γ � τ 1 , . . . , τ n on m identical machines M � M 1 , M 2 , . . . , M m . Each machine can handle only one task at a time, and each task cannot be processed in parallel. Other settings of the problem are consistent with the singlemachine scheduling problem described in Section 2. Given a set of tasks Γ and that of machines M, the optimization problem is not only to find a schedule that gives the start execution time of each fragment f ℓ i ∈ τ ℓ in Γ but also a mapping for f ℓ i to a machine in M. To indicate on which machine a fragment is executed, ∀τ ℓ ∈ Γ, ∀f ℓ i ∈ τ ℓ , and ∀M u ∈ M, we extend the singlemachine scheduling formulation by introducing one more Boolean variable b ℓ i,u . b ℓ i,u � 1 if f ℓ i is executed by M u and b ℓ i,u � 0 otherwise. Correspondingly, rule (C3) in Section 3.2 is replaced with the two following additional constraints: (i) (R1) ∀τ ℓ ∈ Γ and ∀f ℓ i ∈ τ ℓ , f ℓ i is allocated and executed on a single machine: (ii) (R2) ∀τ k , τ ℓ ∈ Γ, ∀f k i ∈ τ k , and ∀f ℓ j ∈ τ ℓ , if k ≠ l, τ k ≺τ ℓ , τ ℓ ≺τ k , EST k i < LCT ℓ j and EST ℓ j < LCT k i , and then f k i and f ℓ j may require the processor at the same time. In this condition, f k i precedes f ℓ j or f ℓ j pre- We refer to the set of hard clauses introduced in (R1) and (R2) as R and rules in (C1) ∼ (C7) excluding (C3) as C ′ . Conjunct with the set of weighted soft clauses O defined in Section 3.2, the problem is C ′ , R, O , which tries to find an assignment of variables to satisfy all the hard clauses in C ′ ∪ R and to maximize the sum of the weights of the satisfied soft clauses in O.
ereby, the parallel identical machine scheduling problem of maximizing the total weight of on-time tasks can be optimally solved with any off-theshelf weighted Partial MaxSAT solver.

Conclusions and Perspective
We concentrated on a Weight Partial MaxSAT (WPM) formulation for optimal scheduling in overloaded situations. e aim is to maximize the (weighted) number of on-time tasks. Motivated by the WPM feature that distinguishes between hard clauses and weighted soft clauses, we encoded the properties of tasks as hard clauses and the goal of completing tasks on time as a set of weighted soft clauses.
en an off-the-shelf WPM solver was employed to satisfy all the hard clauses and maximize the total weight of the satisfied soft clauses. From the output of the WPM solver, the optimal schedule can be obtained. e WPM formulation's performance was compared with that of the recent SMT and Partial MaxSAT (PM) formulations. First, we compared the performance of WPM and SMT, demonstrating that WPM is significantly superior to SMT. en, we considered a special case where WPM and PM formulations are directly comparable. Results indicate that the WPM formulation achieves more compact encoding and higher efficiency than PM. Finally, we applied the WPM formulation to parallel identical machines with very little modification, highlighting the flexibility and scalability of the encoding.
e restricted preemptive scheduling model considered in this paper is built upon earlier works [33,38,39], where each task is split into several nonpreemptive fragments, and preemptions can only take place at the fragments' boundaries. is preemptive model with fixed points is too rigid to apply in many practical systems. Our future work is to design exact methods to adapt to variations of preemptive models. One example is to execute tasks continuously without interruption for at least a certain portion of time [42][43][44]. Instead of splitting tasks into fragments in advance, this restricted preemptive model only guarantees the minimum "granularity" of preemption without predefined subtasks and thus is more suitable for real-world applications.

Data Availability
All the datasets are available from the corresponding author upon request. Disclosure is paper is an extended version of the authors' paper published in Pacific Rim International Conference on Artificial Intelligence, Yanuca Island, Fiji, 08, 2019 (Springer).

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.