Heuristics with Mad queens and example from jssp.

Slides:



Advertisements
Similar presentations
Examples for Discrete Constraint Programming
Advertisements

Constraint Satisfaction Problems
Constraint Satisfaction Patrick Prosser. An Example, Exam Timetabling Someone timetables the exams We have a number of courses to examine how many? Dept.
Constraint Satisfaction Problems Russell and Norvig: Chapter
Planning  We have done a sort of planning already  Consider the “search” applied to general problem solving  The sequence of moves with the “Jugs” was.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 19: November 21, 2005 Scheduling Introduction.
Maintaining Arc Consistency We have a constraint graph G of variables X 1,...X n, and constraint relations {X i  X j}, and each Xi has a value set V (X.
Lecture 11 Last Time: Local Search, Constraint Satisfaction Problems Today: More on CSPs.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Lecture 6: Job Shop Scheduling Introduction
1 Chapter 8: Modelling with Finite Domain Constraints Where we examine how modelling and controlling search interact with finite domain constraints.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
BackTracking Algorithms
CPM, Crashing, Resource Leveling using MS Excel & MS Project
Contents College 4 §4.1, §4.2, §4.4, §4.6 Extra literature on resource constrained project scheduling (will be handed out)
Constraint Processing and Programming Introductory Exemple Javier Larrosa.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Constraint Satisfaction Problems
Skip Counting Counting by 2, 5, and 10.
Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.
Iterative Flattening in Cumulative Scheduling. Cumulative Scheduling Problem Set of Jobs Each job consists of a sequence of activities Each activity has.
Constraint Satisfaction Problems
Constraint Satisfaction Definition. A constraint is a formula of the form: (x = y) (x  y) (x = red) (x  red) Where x and y are variables that can take.
Graph Colouring Various Models. an obvious model SAT sets demo random graphs chromatic number maxCol phase transition.
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
Jobshop scheduling. We have a set of resources a set of jobs a job is a sequence of operations/activities sequence the activities on the resources.
© J. Christopher Beck Lecture 13: Modeling in Constraint Programming.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
Chapter 5 Constraint Satisfaction Problems
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
EXAMPLE: MAP COLORING. Example: Map coloring Variables — WA, NT, Q, NSW, V, SA, T Domains — D i ={red,green,blue} Constraints — adjacent regions must.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
Constraint Satisfaction Problems
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Jobshop scheduling.
Scheduling with Constraint Programming
Vehicle Routing and Job Shop Scheduling:
CSC Modeling with FD Constraints
Basic Project Scheduling
Constraint Satisfaction Problems (CSPs)
Constraint Satisfaction Problems Lecture # 14, 15 & 16
Lecture 11: Tree Search © J. Christopher Beck 2008.
Basic Project Scheduling
Instructor: Vincent Conitzer
Design and Analysis of Algorithm
Advanced Artificial Intelligence
Skip Counting Counting by 2, 5, and 10.
SAT-Based Area Recovery in Technology Mapping
Skip Counting Counting by 2, 5, and 10.
Constraint Satisfaction Problems
Artificial Intelligence
Number partitioning.
Constraint satisfaction problems
Sequencing Sequencing: Determine the order in which jobs at a work center will be processed. Workstation: An area where one person works, usually with.
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Constraint based scheduling
Constraint satisfaction problems
Presentation transcript:

Heuristics with Mad queens and example from jssp

Heuristics in choco Variable ordering Value ordering

Example: Mad Queens Given a 8x8 chessboard put 4 non attacking Queens on the board and leave the remaining Queens off the board. Just to show a simple static variable ordering heuristic

Mad Queens with off the shelf static variable ordering heuristic

MyVarOrder

MadQueens using MyVarOrder

Slack-based heuristics for jssp

jssp refresh

We have a set of resources a set of jobs a job is a sequence of operations/activities sequence the activities on the resources

An example: 3 x 4 We have 4 resources: green, yellow, red and blue a job is a sequence of operations (precedence constraints) each operation is executed on a resource (resource constraints) each resource can do one operation at a time the duration of an operation is the length of its box we have a due date, giving time windows for operations (time constraints) Op1.1 Op1.2 Op1.3Op1.4Op1.1 Op2.1 Op2.2 Op2.3Op2.4 Op3.1 Op3.2 Op3.3Op3.4 job1job2 job3

Op1.1 Op1.2 Op1.3Op1.4Op1.1 Op2.1 Op2.2 Op2.3Op2.4 Op3.1 Op3.2 Op3.3Op3.4 An example: 3 x 4 Op1.1 Op2.3 Op3.1 Op1.4 Op2.4 Op3.2 Op1.2 Op2.1 Op3.4 Op1.3 Op2.2 Op3.3

The problem Assign a start time to each operation such that (a) no two operations are in process on the same machine at the same time and (b) time constraints are respected The problem is NP complete

Op1.1 Op1.2 Op1.3Op1.4Op1.1 Op2.1 Op2.2 Op2.3Op2.4 Op3.1 Op3.2 Op3.3Op3.4 An example: 3 x 4 Op1.1 Op2.3 Op3.1 On the “green” resource, put a direction on the arrows A disjunctive graph

Op1.1 Op1.2 Op1.3Op1.4Op1.1 Op2.1 Op2.2 Op2.3Op2.4 Op3.1 Op3.2 Op3.3Op3.4 An example: 3 x 4 Op1.1 Op2.3 Op3.1 On the “green” resource, put a direction on the arrows A disjunctive graph We do not bind operations to start times We take a least commitment approach Consequently we get a set of solutions!

op1.before(op2)

earliest startlatest end duration Picture of an operation

op1.before(op2) earliest startlatest start duration Picture of an operation Constrained integer variable represents start time

op1.before(op2) Picture of an operation op1 op2 op1.before(op2)op1.start() + op1.duration() ≤ op2.start()

op1.before(op2) Picture of an operation op1 op2 op1.before(op2)op1.start() + op1.duration() ≤ op2.start() propagate

op1.before(op2) Picture of an operation op1 op2 op1.before(op2) OR op2.before(op1) op1 and op2 cannot be in process at same time Not easy to propagate until decision made (disjunction broken)

op1.before(op2) Picture of an operation op1 op2 d[i][j] = 0  op[i]1.before(op[j]) Use a 0/1 decision variable d[i][j] as follows d[i][j] = 1  op[j]1.before(op[i])

heuristics

JUST ONE EXAMPLE

We have an engineering problem. Search solver uses IntDomainVar and model used IntegerVariable. To work out slack on a decision variable we need to get access to information on Operations, in particular duration and start time. How do we do that?

Anyway, will the variable ordering heuristic make a difference on it’s own? Admittedly the heuristic is rather expensive to run so will it reduce search effort to the point that it reduces run time (the bottom line)

Do some experiments