G53CLP Constraint Logic Programming

Slides:



Advertisements
Similar presentations
Examples for Discrete Constraint Programming
Advertisements

CPAIOR02 School on OptimizationC. Le Pape1 Integrating Operations Research Algorithms in Constraint Programming Claude Le Pape ILOG S.A.
1 Integration of Artificial Intelligence and Operations Research Techniques for Combinatorial Problems Carla P. Gomes Cornell University
Satisfiability Modulo Theories (An introduction)
SCIP Optimization Suite
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
© Imperial College London Eplex: Harnessing Mathematical Programming Solvers for Constraint Logic Programming Kish Shen and Joachim Schimpf IC-Parc.
What is GAMS?. While they are not NLP solvers, per se, attention should be given to modeling languages like: GAMS- AIMMS-
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
Interconnect throughput modeling. Important network performance metrics Throughput – Point to point (link bandwidth + end host software overheads) – Aggregate.
Modeling problems with Integer Linear Programming (ILP) Name: Chuan Huang.
G53CLP Constraint Logic Programming Constraint Optimisation Problems – Demos in OPL Studio Dr Rong Qu.
Introduction to Computer Programming in C
A Short Tutorial on CPLEX Jason Woodard CS 286r Section March 5, 2004.
AMPL An Introduction. Outline AMPL - What is it (good for)? Basics Starting a Problem Running the Problem Example.
Andreas Bauer, Viorica Botea, Mark Brown, Matt Gray, Daniel Harabor & John Slaney CP 2010, 522—536 Presented by Heath Roehr.
Linear Programming: Computer Solution and Sensitivity Analysis
1 Planning and Scheduling to Minimize Tardiness John Hooker Carnegie Mellon University September 2005.
AMPL Presentation 1 By Raymond Kleinberg Outline AMPL - Ugh! - What is it good for? Basics Starting a Problem Running the Problem Example.
History FARGO Precursor to RPG RPG Released in 1959 for use with punched card machines RPG II 1969; first to handle i/o devices or workstation RPG III.
How to Play Sudoku & Win Integer Programming Formulation of a Popular Game Sven LeyfferSven Leyffer, Argonne, Feb. 15, 2005 (windoze powerpoint sumi painting.
Integer Programming and Logic-Based Modeling Jan Fábry, Jan Pelikán ___________________________________________________________________________ MME 2003,
Chapter 4 - Linear Programming: Computer Solution Excel Solver
Constraint Reasoning Florida Institute of Technology Computer Science.
CS548 Showcase Using SPSS for Data Mining Ahmedul Kabir.
Quantitative Methods of Management
A GAMS TUTORIAL. WHAT IS GAMS ? General Algebraic Modeling System Modeling linear, nonlinear and mixed integer optimization problems Useful with large,
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Operations Research Lecturer Eng. Ahmed H. Abo absa 2 nd Semester ITGD4207 University of Palestine.
Discovering Combinatorial Optimization with the ILOG Optimization Suite Gregory Glockner, Ph.D. Optimization Product Manager ILOG, Inc.
GAMS Anwendung Nutzeroberfläche eigene Programme Modellierungs- System GAMS AMPL ILOG Studio … Solver CPLEX, CONOPT, MINOS, COIN, BARON,...
Unit 2 – Week 5 Reasoning with Linear Equations and Inequalities Lesson 3 Students describe the solution set of two equations or inequalities joined.
CONSTRAINT PROGRAMMING Computer Science Seminar April 9 th, 2004 Kerem Kacel.
ILOG CPLEX introduction Presenter: Meng-yen Li. Outline Introduction Using the interactive interface Read problem from file LP format Demo with FS problem.
1 ILOG CPLEX CPLEX is a product developed by ILOG to solve  LPs  MIPs  QPs  MIQPs  Network Flow problems CPLEX technologies  CPLEX callable library.
3-1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Linear Programming: Computer Solution and Sensitivity Analysis Chapter 3.
Linear Programming with Excel Solver.  Use Excel’s Solver as a tool to assist the decision maker in identifying the optimal solution for a business decision.
G51IAI Introduction to AI Rong Qu Coursework G51IAI Coursework Available from 25 th Oct 2007 (updated yesterday)
29-Nov-15 Getting Ready for Java. 2 What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made.
Lab 3 Solver Add-In In Excel ► Lab 2 Review ► Solver Add-in Introduction ► Practice Solver following Instructor » Saferly Inc.
Solving MINLP problems with AIMMS Pittsburgh June 4, 2014 Marcel Hunting AIMMS Software Developer.
Ontology-based optimization modeling tool for distributed and ad-hoc business problems Piao Guangyuan.
Unit 2 – Week 5 Reasoning with Linear Equations and Inequalities Lesson 3 Students describe the solution set of two equations or inequalities joined by.
ICEE Internship International Center for Engineering Education Project: Natural Language Interaction with a Construction Estimating Virtual Reality Environment.
INTRODUCTION TO JAVA AND ANDROID. Slide 2 Our Ecosystem Java Eclipse Android SDK.
N-queens problem Original problem: How to place 8 queens on an 8x8 chessboard so that no two queens attack each other N-queen problem: Generalization for.
G53CLP Constraint Logic Programming Modeling CSPs – Case Study II Dr Rong Qu.
© 2010 IBM Corporation IBM Container Transport Optimization Dr. Juergen Koehl, IBM Research and Development, Boeblingen Juergen Koehl, IBM Container Logistics.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
P IBM Decision Optimization Technical Mastery Test v2
What’s New in CPLEX Optimization Studio ? …and how to use it
IBM Predictive Analytics Virtual Users’ Group Meeting March 30, 2016
Mobile Applications (Android Programming)
Transportation Networks CIVE 744
1Z0-808 Exam : Java SE 8 Programmer I
Constraint-based heuristics for amphibious embarkation planning
Staff Scheduling at USPS Mail Processing & Distribution Centers
Intro to CSC270 Survey of Programming Languages
EMIS 8373: Integer Programming
Chapter 3: Finite Constraint Domains
Using WinQSB to solve Linear Programming Models
A Mathematical Programming Language
CS Software Studio Assignment 1
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
Chapter 5 Transportation, Assignment, and Transshipment Problems
Optimization Direct Introduction & Recent Optimization Case Studies
DBOS DecisionBrain Optimization Server
Optimization Direct Introduction & Recent Optimization Case Studies
Applied Statistical and Optimization Models
Applied Statistical and Optimization Models
Presentation transcript:

G53CLP Constraint Logic Programming Dr Rong Qu Solving 8-Queen Puzzle – Demo

ILOG OPL Studio CPLEX Optimization software package Sold via CPLEX Optimization Inc. Acquired by ILOG Inc in 1997 Acquired by IBM in 2009 Also solves integer programming and large linear programming problems http://www.ilog.com/products/cplex/ http://en.wikipedia.org/wiki/CPLEX http://www.ilog.com/products/cplex/ G53CLP – Constraint Logic Programming Dr R. Qu

ILOG OPL Studio OPL Studio One of the modeling systems in ILOG For both mathematic programming and constraint programming OPL (Optimization Programming Language) was originally developed by Pascal van Hentenryck Provide an interpreter OPL models; A script language An IDE; An API G53CLP – Constraint Logic Programming Dr R. Qu

Other CP Solvers? Gecode 1.0.1 Java interface for constraint programming Free for download Released in Nov 2006 Possible coursework next year? http://www.gecode.org/gecodej/ G53CLP – Constraint Logic Programming Dr R. Qu

Solving the 8-Queen Problem G53CLP – Constraint Logic Programming Dr R. Qu

G52AIP – AI Programming A OPL Studio IDE screenshot Project: model + problem input data Source code editor Debug information Important: Solver, Optimisation, Solutions G52AIP – AI Programming

Solving The 8-Queen Problem – model 2 Variables x1, x2, …, xn: position of queens on the chessboard Domain {0 … n2-1}: tile index of each queen placed Constraint R = xi / n + 1 C = xi mod n + 1 Given R1, R2 and C1, C2 of two queens’ positions One queen each row/column R1 ≠ R2; C1 ≠ C2 One queen each diagnal R1 – R2 ≠ C1 – C2 R1 – R2 ≠ C2 – C1 G53CLP – Constraint Logic Programming Dr R. Qu

ILOG OPL Studio G53CLP – Constraint Logic Programming Dr R. Qu

Solving The 8-Queen Problem – model 2 //.mod file //declaration part var int queens[1..8] in 0..63; var int r[1..8] in 1..8; var int c[1..8] in 1..8; // problem model solve { … }; x1, x2, …, xn: position of queens on the chessboard {0 … n2-1}: tile index of each queen placed R = xi / n + 1 C = xi mod n + 1 R1 ≠ R2; C1 ≠ C2 R1 – R2 ≠ C1 – C2 R1 – R2 ≠ C2 – C1 G53CLP – Constraint Logic Programming Dr R. Qu

Solving The 8-Queen Problem – model 2 //.mod file //declaration part … //problem model solve { forall(ordered i,j in 1..8) { r[i] = queens[i] / 8 + 1; c[i] = queens[i] mod 8 + 1; r[j] = queens[j] / 8 + 1; c[j] = queens[j] mod 8 + 1; }; R = xi / n + 1 C = xi mod n + 1 R1 ≠ R2; C1 ≠ C2 R1 – R2 ≠ C1 – C2 R1 – R2 ≠ C2 – C1 G53CLP – Constraint Logic Programming Dr R. Qu

Solving The 8-Queen Problem – model 2 //.mod file //declaration part … //problem model solve { forall(ordered i,j in 1..8) { r[i] <> r[j] ; c[i] <> c[j] ; r[i] - r[j] <> c[i] - c[j]; r[i] - r[j] <> c[j] - c[i]; }; R = xi / n + 1 C = xi mod n + 1 R1 ≠ R2; C1 ≠ C2 R1 – R2 ≠ C1 – C2 R1 – R2 ≠ C2 – C1 G53CLP – Constraint Logic Programming Dr R. Qu

G52AIP – AI Programming

G52AIP – AI Programming

Solving The 8-Queen Problem – model 2 G53CLP – Constraint Logic Programming Dr R. Qu

Solving The 8-Queen Problem – models 1&3 Lab sessions start next week I: comparing the 3 models for solving the n-Queen problem II: G53CLP – Constraint Logic Programming Dr R. Qu

Solving The 8-Queen Problem To display decision tree Debug/Display Decision Tree To run Execution/Run, or To stop at a decision point Debug/Stop at Decision Point Next solution All solutions G53CLP – Constraint Logic Programming Dr R. Qu