Device and method for solving solution set programming program for scheduling jobs to machines
Patent Information
- Application Number
- JP2022196845
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-12-10
- Filing Date
- 2022-12-09
- Publication Date
- 2025-10-23
AI Technical Summary
Existing solvers struggle to find optimal solutions or improve upon existing solutions in solution set programming programs, particularly in scheduling jobs to machines, due to limitations in handling non-monotonic logic and combinatorial search.
A method involving a rule set and constant symbols, combined with a large neighborhood search, is employed to redetermine solutions by treating some constant symbols as variables, using hybrid ASP solvers like clingo-dl, to enhance combinatorial search and optimization, particularly in machine scheduling problems.
This approach improves the efficiency and quality of scheduling solutions by iteratively refining schedules within time limits, ensuring better cost optimization and adherence to constraints, even in complex scenarios with non-monotonic logic.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] Background Art The present disclosure relates to an apparatus and a method for solving a disjunctive programming program for scheduling jobs on a machine.
[0002] A solver can be used to find a solution based on a disjunctive programming program. However, there may be cases where the solver cannot find a solution or where there is a better solution than the one found by the solver.
Summary of the Invention
Means for Solving the Problems
[0003] Disclosure of the Invention A method for solving a disjunctive programming program is to provide a plurality of constant symbols and a set of rules for the constant symbols including these constant symbols, wherein the disjunctive programming program is defined according to this set of rules, and to determine a solution for the disjunctive programming program including at least one constant symbol among the plurality of constant symbols, to determine a constraint according to the cost of this solution, to select at least one constant symbol in this solution, and to re-determine a solution as a result of the disjunctive programming program and the constraint defined according to the set of rules, wherein when solving the disjunctive programming program to re-determine the solution, this at least one constant symbol is treated as a variable in the set of rules. According to this method, the solution is improved by large neighborhood search. To perform large neighborhood search, a part of the solution is destroyed and restored by an additional restriction, that is, a disjunctive programming program having an additional constraint that brings about an improvement in the solution.
[0004] In an example of this method, the set of rules includes Boolean variables, the constraint includes a difference related to integer variables, the set of rules and the constraint define non-monotonic logic, and re-determining the solution includes combinatorial search and optimization for non-monotonic logic.
[0005] This method may be for scheduling jobs to machines, and this method may include taking a plurality of constant symbols representing either jobs or machines, and a set of rules for assigning jobs to machines, wherein jobs and machines are represented by those constant symbols, determining as a solution a schedule in which each constant symbol representing a job is assigned to one constant symbol representing a machine, determining constraints according to the cost of processing the jobs according to this schedule, selecting at least one constant symbol in this schedule, and redetermining the schedule as a result of a solution set programming program and constraints defined according to the set of rules, wherein when solving the solution set programming program, this at least one constant symbol is treated as a variable in the set of rules.
[0006] This method may involve determining the cost based on the time it takes to execute the job according to this schedule.
[0007] This method may involve determining constraints to show that the cost of processing the jobs according to the re-determined schedule is lower than the cost of processing the jobs according to the original schedule.
[0008] This method may involve selecting a quantity or proportion of constant symbols in the solution, where this quantity or proportion defines the size of the neighborhood. Searching in a larger neighborhood may take longer to reconstruct the solution than searching in a smaller neighborhood. Searching in a larger neighborhood may also increase the likelihood of improving the solution compared to searching in a smaller neighborhood.
[0009] This method may involve determining a quantity or proportion depending on the size of the rule set or the time limit for finding a solution by solution set programming.
[0010] This method may include selecting all constant symbols in the solution or treating all constant symbols as variables in the rule set, especially when re-determining the solution fails. This addresses functional dependencies that cannot be resolved by other methods.
[0011] This method may include iteratively re-determining the solution and outputting the most recently determined solution when the time limit expires. The time limit may be adjusted according to the type or size of the problem.
[0012] Preferably, re-determining a solution includes, if the time limit expires, stopping the search for the result of the solution set program, selecting at least one different constant symbol to be treated as a variable, and resuming the re-determining of the solution by treating at least one different constant symbol as a variable in the rule set.
[0013] A device for solving a solution set programming program comprises at least one processor and at least one memory containing instructions for causing the device to perform this method when executed by this at least one processor. The device finds the solution using solution set programming and large nearest neighbor search.
[0014] A computer program, when executed by a computer, contains computer-readable instructions that cause the computer to carry out this method.
[0015] Further embodiments can be derived from the following description and drawings. [Brief explanation of the drawing]
[0016] [Figure 1] This diagram schematically shows the apparatus for solving a solution set programming program. [Figure 2] This diagram shows a flowchart of the steps involved in solving a solution set programming program. [Modes for carrying out the invention]
[0017] Figure 1 shows a schematic diagram of the device 100 for solving the solution set programming program.
[0018] The device 100 comprises at least one processor 102 and at least one memory 104, the memory 104 containing instructions that, when executed by at least one processor, cause the device 100 to perform the method described below with reference to Figure 2.
[0019] Solution-set programming (ASP) is an approach for combinatorial search and optimization. A problem is identified using a modeling language, and then an ASP solver is used to search for a solution. The ASP used in this example is a hybrid ASP that supports not only Boolean variables but also integer variables in the form of diff constraints in its own modeling language.
[0020] ASP provides a declarative modeling language that enables the concise representation of search and optimization problems, for which solutions can be computed using a dedicated hybrid ASP solver.
[0021] The solver for hybrid ASP is clingo-dl (Janhunen, T., Kaminski, R., Ostrowski, M., Schellhorn, S., Wanko, P., Schaub, T. "clingo goes Linear Constraints over Reals and Integers" (Theory and Practice of Logic Programming 17(5-6), 872-888(2017))).
[0022] The optimization capabilities of the hybrid ASP solver clingo-dl are improved by the methods described herein. The specific problems solved in the examples disclosed herein are the minimization of a single integer variable in the problem design provided in the declarative modeling language.
[0023] In one example, the hybrid ASP solver is used to solve a machine scheduling problem, where the cost for job execution on a machine, i.e., the makespan, should be minimized. In this example, the integer variable represents the cost.
[0024] Hybrid ASP solvers, such as clingo-dl, include optimization algorithms that support the minimization of a single integer variable. The methods for solving the answer set programming programs described herein improve the optimization algorithms in various ways, which will be detailed below.
[0025] An exemplary ASP encoding for machine scheduling in a declarative modeling language is
Number
[0026] The ASP encoding may include a specification of a machine scheduling problem instance with ASP facts.
[0027] The ASP encoding is a compact relational formalism, essentially a propositional formalism, which includes variables, such as J, J1, J2, J3, M, and constants, such as D, P, S, T, cmax. Determining a solution using a hybrid ASP solver involves replacing variables with constant symbols in a preprocessing step and searching for executable solutions in the resulting rule set where variables have been replaced by constant symbols.
[0028] These rules are
Number
[0029] This means that if the truth value of the rule is true, then some subset S of {p1, ..., pk}, where i ≤ |S| ≤ j, must also be true.
[0030] Differential logic involves differential constraints, which in this example address timing constraints. A differential constraint is an expression of the form uv ≤ d, where u and v are integer variables and d is an integer constant. In contrast to unrestricted integer constraints, systems of differential constraints can be solved in polynomial time. The latter are represented by clingo-dl using theoretical atoms. For example, a statement in which job j starts after its own release time, e.g., 10, can be represented as &diff{0-start(j)}<=-10, where 0 and start(j) are integer variables, where 0 is a special integer variable with a fixed value of 0, and therefore start(j) must be at least 10.
[0031] In this example, the rule
number
[0032] In this example, the rule
number
[0033] In this example, the rule containing the &diff statement contains the difference of integer values, where T, D, S, and P represent the end time, D the duration, S the start time, P the pause, and J1, J2, and J3 represent jobs, and M represents machines.
[0034] Further rules specify further ways of assigning jobs to machines, and here, first(J,M) indicates that job J is the first job in machine M. last(J,M) indicates that job J is the last job in machine M. not first(J2,M) indicates that job J2 is not the first job in machine M. before(J1,J2,M) indicates that job J1 is assigned to machine M before job J2. asg(_,M) indicates that any job will be assigned to machine M. asg(J2,M) indicates that job J2 is assigned to machine M. next(J3,J1,M) indicates that job J3 is the next job after job J1 in machine M. The duration(J1,M,P) indicates the duration of job J1 in machine M, including pauses P. setup(J3,J1,M,S) indicates the setup of machine M by jobs J3 and J1 at start time S. release(J1,M,T) indicates the completion of job J1 on machine M at completion time T.
[0035] c(J) represents the cost of job(J), cmax represents the maximum cost of the already determined solution, and job(J) represents the job.
[0036] The method for solving the solution set programming program includes step 202.
[0037] Step 202 includes providing a set of constant symbols and a set of rules for these constant symbols.
[0038] Step 202 may include providing ASP coding and determining the rule set by processing the ASP coding in preprocessing, where the rules set is determined by replacing variables with constant symbols.
[0039] The rule set includes Boolean variables, and the constraints include differences related to integer variables. The rule set and constraints define non-monotonic logic.
[0040] To schedule jobs to machines, a set of constant symbols is provided that represent either jobs or machines. A set of rules for assigning jobs to machines is also provided, where jobs and machines are represented by their constant symbols.
[0041] Then, step 204 is executed.
[0042] Step 204 involves determining a solution for a solution set programming program that includes at least one constant symbol from a set of constant symbols and is defined according to the rule set.
[0043] A schedule is determined as a solution to schedule jobs to the machines. In this schedule, each constant symbol representing a job is assigned to a single constant symbol representing a machine.
[0044] Firstly, in order to obtain a feasible solution, a construction heuristic can be used to directly generate the feasible solution.
[0045] In the case of the scheduling problem, which is used as an example, this heuristic can be defined as follows: The process starts with an empty schedule. Unassigned jobs j and machines m are selected until all jobs are assigned to some machines, and j is assigned to machine m as soon as possible if such a selection minimizes the increase in the makespan of this partial schedule. This algorithm runs in polynomial time and produces a fairly good quality workable schedule.
[0046] Alternatively, the determination of the solution may involve combinatorial search and optimization for non-monotonic logic; that is, the solution may be found by a hybrid ASP solver using ASP coding and ASP facts.
[0047] Then, step 206 is executed.
[0048] Step 206 involves determining constraints based on the cost of the solution. The cost is determined, for example, by a cost function whose values are related to the solution.
[0049] The constraints on the scheduling problem may be determined by the cost of processing the job according to the schedule, i.e., by the make-span. The constraints may be determined to ensure that the cost of processing the job according to the re-determined schedule is lower than the cost of processing the job according to the original schedule.
[0050] Then, step 208 is executed.
[0051] In step 208, this solution is set as the provisional solution.
[0052] Then, step 210 is executed.
[0053] In step 210, it is determined whether or not the global time limit has expired. If the global time limit has expired, step 212 is executed. If the global time limit has not expired, step 214 is executed.
[0054] The solution is determined iteratively by re-determining the solution. If the global time limit has expired, step 212 is performed.
[0055] Step 212 involves outputting the latest re-determined solution. In this example, the provisional solution is output.
[0056] Step 214 involves selecting at least one constant symbol in the solution.
[0057] To schedule a job to a machine, at least one constant symbol is selected in the schedule representing the job or machine.
[0058] This method may include selecting a quantity or proportion of constant symbols in the solution or schedule.
[0059] This amount or proportion is determined, for example, depending on the size of the rule set or the time limit for finding the solution by solution set programming.
[0060] This method may, in particular, include selecting all constant symbols in the solution if the re-determination of the solution fails.
[0061] This involves setting up a large nearest neighbor search (LNS), and this is part of that method.
[0062] Depending on the quantity or proportion of constant symbols in the selected solution or schedule, LNS becomes possible, meaning that the hybrid ASP solver can search for improved solutions in the neighborhood of previously found solutions. The quantity or proportion is a relaxation operator, such as the following:
[0063] The solution is given as a solution set. In this example, the solution set contains atoms that define the solution using specific predicates and constant symbols. In the example of scheduling jobs to a machine, the atoms assign jobs to the machine.
[0064] Given a fixed set of constant symbols C and a relaxation ratio r, the relaxation operation selects r percent of the constant symbols in C as set C0 and marks all atoms in the solution that contain the constant symbols from C0 for relaxation (i.e., those treated as variables when solving the solution set program). In the example of scheduling jobs to a machine, set C is all jobs. Relaxing all atoms that contain a particular job is useful for dealing with functional dependencies between atoms. Otherwise, functional dependencies between atoms can cancel out the effect of the relaxation operator.
[0065] In this example, the relaxation rate is adjusted according to the type, size, and global time limit of the problem.
[0066] Step 216 involves determining a solution to a solution set programming program that includes at least one constant symbol from a plurality of constant symbols and is defined according to the rule set and constraints.
[0067] To schedule jobs to the machine, a schedule is determined as a solution in which each constant symbol representing a job is assigned to a single constant symbol representing the machine. This schedule is determined as a result of the solution set programming program and constraints defined according to the rule set.
[0068] When solving this solution set programming program, at least one constant symbol is treated as a variable in the rule set. This method may include, in particular, treating all constant symbols in the rule set as variables if re-determining the solution fails.
[0069] That is, step 216 includes redetermining the solution or schedule as a result of the solution set programming program and constraints defined according to the rule set.
[0070] Re-determining the solution involves combinatorial search and optimization for non-monotonic logic.
[0071] Re-determining the solution may include halting the search for the solution set program's results when a predetermined time limit expires. Subsequently, the re-determining of the solution was unsuccessful.
[0072] In this example, the search operation is implemented by incremental calls to a hybrid ASP solver, such as clingo-dl. In this example, the relaxation of the solution is performed by fixing the truth values of all atoms not marked for relaxation to true. In clingo-dl, the corresponding API functions for defining the assumptions may be used.
[0073] A constraint is added before each call to the hybrid ASP solver. In this example, the constraint indicates that each new solution has a smaller value for the integer variable to be minimized than the best solution found so far. In this example, the constraint indicates that the cost of the new solution is less than the cost of the previous best solution.
[0074] For any call to the hybrid ASP solver, the search may be interrupted after a predetermined time limit. The time limit is adjusted depending on the type and size of the problem and the global time limit.
[0075] Then, step 218 is executed.
[0076] In step 218, it is determined whether the re-determination of the solution was successful or unsuccessful. If no solution is found, step 210 is performed. If a solution is found, step 220 is performed.
[0077] If the search is interrupted or no solution is found, the method may proceed to step 210, and if it is still within the global time limit, in step 214, at least one different constant symbol is selected to be treated as a variable, and the re-determination of the solution with this at least one different constant symbol treated as a variable in the rule set is resumed.
[0078] In step 220, the re-determined solution is set as the provisional solution.
[0079] Then, step 222 is executed.
[0080] Step 222 involves determining constraints based on the cost of the solution.
[0081] To schedule a job on a machine, constraints are determined by the cost of processing the job according to the schedule. The cost may be determined by the time it takes to execute the job according to the schedule.
[0082] The constraint may be determined to represent that the cost of processing the job according to the re-determined schedule is lower than the cost of processing the job according to this schedule.
[0083] The constraints may be added, or they may replace previous constraints.
Claims
1. 1. A method for solving an answer set programming program, comprising: providing (202) a plurality of constant symbols and a rule set for constant symbols including the constant symbols, wherein the answer set programming program is defined in response to the rule set; determining (204, 216) a solution to the answer set programming program that includes at least one constant symbol of the plurality of constant symbols; determining (206, 222) constraints according to the cost of the solution; selecting (214) at least one constant symbol in the solution; redetermining (216) the solution as a result of the constraints and an answer set programming program defined in accordance with the rule set, treating the at least one constant symbol as a variable in the rule set when solving the answer set programming program to redetermine the solution; A method characterized by:
2. the rule set includes a Boolean variable and the constraint includes a difference associated with an integer variable; the rule set and the constraints define non-monotonic logic; 2. The method of claim 1, wherein redetermining (216) the solution comprises combinatorial search and optimization for the non-monotonic logic.
3. The method is for scheduling jobs on a machine; The method comprises: receiving (202) a plurality of constant symbols representing either jobs or machines and a set of rules for assigning the jobs to the machines, the jobs and the machines being represented by the constant symbols; determining as a solution a schedule in which each constant symbol representing a job is assigned to one constant symbol representing a machine (204, 216); determining (206, 222) the constraints as a function of the cost of processing the jobs according to the schedule; selecting (214) at least one constant symbol in the schedule; re-determining (216) the schedule as a result of the answer set programming program and the constraints defined in accordance with the rule set, treating the at least one constant symbol as a variable in the rule set when solving the answer set programming program; The method of claim 1 ,
4. 4. The method of claim 3, further comprising determining (206, 222) the cost as a function of the time to execute the job according to the schedule.
5. 4. The method of claim 3, further comprising determining (206, 222) the constraint to represent a cost for processing the job according to the redetermined schedule that is less than the cost for processing the job according to the schedule.
6. 2. The method of claim 1, further comprising selecting (214) an amount or proportion of the constant symbols in the solution.
7. 7. The method of claim 6, further comprising determining (214) the amount or percentage depending on the size of the rule set or depending on a time limit for finding the solution by the answer set programming.
8. 2. The method of claim 1, further comprising selecting (214) all of the constant symbols in the solution or treating (216) all of the constant symbols as variables in the rule set, particularly if the solution redetermining (218) fails.
9. 2. The method of claim 1, further comprising: iteratively redetermining (216) the solution; and outputting (212) the latest redetermined solution when a time limit expires (210).
10. 2. The method of claim 1, wherein redetermining (216) the solution includes: if a time limit expires, ceasing the search for the result of the answer set program; selecting (214) at least one different constant symbol to treat as a variable; and treating the at least one different constant symbol as a variable in the rule set and resuming the redetermining of the solution.
11. An apparatus (100) for scheduling jobs on machines, comprising: at least one processor (102); at least one memory (104) containing instructions that, when executed by the at least one processor (102), cause the device (100) to perform the method of any one of claims 1 to 10; An apparatus (100) comprising:
12. A computer program comprising computer readable instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1 to 10.