1 / 29

Applications of Constraint Programming

Applications of Constraint Programming. The Data Error Detection Problem and the DDX Manpower Planning Problem. Outline of Presentation. Data Error Detection Problem Manpower Planning Problem for the DDX

nell-morse
Download Presentation

Applications of Constraint Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applications of Constraint Programming The Data Error Detection Problem and the DDX Manpower Planning Problem

  2. Outline of Presentation • Data Error Detection Problem • Manpower Planning Problem for the DDX • Some Results of Constraint Programming Applied to the Resource Constrained Project Scheduling Problem (RCPSP)

  3. Errors in Data Sets • Large data files frequently contain missing, incorrect, and inconsistent data. • Such errors can be detected by formulating a set of rules. • First task is to form a set of rules for the EMF and check the set for consistency and redundancy. • Second task is to use the set of rules to detect erroneous data and make the appropriate corrections which modify the data as little as possible and preserves the statistical distribution of correct data as much as possible. • Our research focuses on the first one.

  4. Propositional Logic Formulation • Due to Bruni and Sassano 2001 • An edit rule may be: “If marital status is married, age must be not less than 14” • The propositional logic formula for the above rule is: (married_status = married) /\ (age <= 14) • To get a formula which is satisfied by correct data, we need to negate the above formula. • This negated formula is satisfiable if and only if there exists an assignment that makes the formula true; otherwise the negated formula is unsatisfiable, which implies an inconsistency in the edit set.

  5. Complete Inconsistency • Complete inconsistency occurs when every possible set of entries to the fields activates an edit. • In order to restore consistency it is useful to know which are the offending edits, or the minimal unsatisfiable sub formula. • The core is to solve a SAT and a MAX_SAT problem.

  6. Redundancy • Some edits could be logically implied by others, thus being redundant. By removing these redundant edits, we can reduce the number of clauses in the system while maintaining the same power of inconsistency detection. • An edit, e, can be checked by removing its clausal representation from the CNF formula, adding its negation to the formula, and testing if the resulting formula is unsatisfiable. If it is unsatisfiable, then e is redundant. • The core is again to solve a SAT problem.

  7. SAT and MAX_SAT Problem • Satisfiability (SAT) Problem (Gary and Johnson 1979): Instance: A set U of variables and a collection C of clauses over U. Question: Is there a satisfying truth assignment for C? • MAX_SAT Problem: Instance: A set U of variables and a collection C of clauses over U. Question: What is the maximum number of clauses that can be satisfied? • Both SAT and MAX_SAT are NP-complete and not easily expressed or solved with classical mathematical programming tools and concepts. • Intense interest in exploring outside mathematical programming in areas such as Artificial Intelligence (AI) and Computer Science (CS) to find ideas to use to represent and solve satisfiability problems.

  8. Opportunities of Research • Edit Generation. Attack the problem of generating a set of consistent and redundancy-free edit rules. This problem can be solved by encoding the formulation as a propositional logic formula and solving a sequence of satisfiability problems. • Implementation. Design, implement, and test an application that executes the efficient set of edit rules for the types of personnel files handled by the Navy.

  9. Manpower Planning for DDX Ship • The reduction in crew size associated with the new DDX class of ships, means that many of the routine and non routine tasks that are now performed by our forces at sea will need to be accomplished with fewer resources. • Determining the correct crew size and a right mix of skills for the crew will require that we understand how to schedule the myriad of tasks that a ship’s crew must accomplish every day. • Our Plan -- Formulate it as a Resource Constrained Project Scheduling Problem (RCPSP) with special objective function and resource type considerations.

  10. A Traditional Resource Constraint Project Scheduling (RCPS) Problem • Temporal time constraints (time windows) : starting time of task k in job j

  11. Additional Assumptions • A set of renewable resources is required for carrying out the activities of the project. • Each activity must be carried out without interruption (non preemption). • Set-up time independent • Objective is to find an optimal schedule to minimize the make span (completion time of the last project scheduled).

  12. : amount of resource k available : upper bound of the project duration : starting time of task k in job j : starting time of dummy task : a schedule set of each task : minimum delay; if it equals duration of task j'k' , it determines the precedence requirement Notation : amount of resource k used at t for a schedule S E : the edge set of activity on node graph, which connects pairs of nodes having temporal relations

  13. A General Model Formulation

  14. An Illustration of RCPSP 1. The current illustration is not feasible for unary resources. 2. Our task is to find a feasible solution while optimizing an objective function.

  15. Where is the Gap? • The manpower planning problem faced by the Navy is different from the traditional RCPSP. It has combined characteristics of both RCPSP and a generalized assignment problem (GAP). • The assignment has to be made which is usually the case in GAP but rare in RCPSP. • The objective is to minimize the number of sailors on site (at work), which is different from minimizing make-span in traditional RCPSP. Also note that this is not simply minimizing the “number” of sailors, but the “attendance” of sailors since one sailor might be assigned several times for different tasks. • On the other hand, it is significantly different from GAP because the assignment needs to be made while satisfying the temporal constraints among tasks (time windows).

  16. Introduction to Constraint Programming (CP) • CP is the study of computational systems based on constraints. • Earliest ideas leading to CP may be found in AI area of CSP (Constraint Satisfaction Problem), dating back to 60’s and 70’s. • In CP, the word “programming” refers to its roots in the field of programming language. Other programming paradigms are procedural programming, OOP, functional programming, logic programming, etc. (Hentenryck, 1999) • In Mathematical Programming, the word “programming” roots in Dantzig 1963, which is associated with a specific mathematical problem. • “Constraint Programming represents one of the closest approaches computer science has yet made to the Holy Grail of programming: the user states the problem, the computer solves it.” (E. Freuder)

  17. An Illustration for Domain Reduction Constraint Propagation When a variable’s domain is modified, the effects of this modification are then communicated to any constraint thatinteracts with that variable. The domain reduction algorithms modifies the domains of all the variables in that constraint, given the modification of one of the variables in that constraint. 01234 56789 01234 1 3 Y=2X Y<=10 (X modulo 2) = 1 Y=2X 01234 56789 02468 2 6

  18. Experimental Study of Constraint Programming Approach to Solve RCPSP • A RCPSP with unary resource, i.e. for each type of resource there is only one unit available throughout the process of the project. • Implementing constraint programming with Optimization Programming Language (OPL). • Branching and Bound approach to solve the same problem with Excel Solver as comparison. • Our study indicates that the constraint programming approach outperforms the B& B approach significantly.

  19. Effects of Number of Types of Resources Note: 1. Time in seconds. 2. Performed on AMD Athlon 1GHz with 256 MB Memory. 3. Set the base case to include 9 jobs, 3 types of resources and 18 temporal constraints.

  20. Note: The base case has 9 tasks, 3 types of resources, 8 min-delay relations and no due date constraints. Resource 3 has two units and others have one unit each.

  21. Note: The base case has 9 tasks, 3 types of resources, 10 precedence relations and no due date constraints.

  22. Note: The base case has 9 tasks, 3 types of resources, 10 precedence relations and 8 min-delay relations.

  23. Integer Programming Approach(Unary Resource)

  24. Comparison of CP and B&B Note: 1. Time in seconds. 2. Performed on AMD Athlon 1GHz, 256 MB memory

  25. Conclusion • The declarative nature of Constraint Programming reduces the effort to express and formulate the models for SAT, MAX_SAT and RCPSP. • The novelty of specifying the search procedure in OPL separately from expressing the model will play an invaluable part in solving these NP-hard combinatorial problems. • For large instances of these problems, we might need to develop hybrid integer & constraint programming model to take advantages of both approaches.

  26. Questions? Comments?

  27. Thank You!

More Related