User Tools

Site Tools


projects:project2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:project2 [2016/08/08 13:36]
aytonb removed
projects:project2 [2016/11/16 21:16] (current)
aytonb
Line 1: Line 1:
 ====== Project 02: Reasoning About Constraints in a Real-World Problem ====== ====== Project 02: Reasoning About Constraints in a Real-World Problem ======
  
-  * **Released on:** 11/15 +  * **Released on:** 10/26 
-  * **Due on:** __12/04 (by midnight)__+  * **Due on:** __11/23 11:59 pm__
  
 There are three objectives for this project: There are three objectives for this project:
Line 18: Line 18:
  
 As this project doesn'​t focus on integrating together several tools (unlike Project 1). We will be returning to the Jupyter notebook for the project. You can find the project files under projects/​project2. As this project doesn'​t focus on integrating together several tools (unlike Project 1). We will be returning to the Jupyter notebook for the project. You can find the project files under projects/​project2.
 +
 +===== Dependencies (Students Not Using the VM) =====
 +
 +This project makes use of Numberjack to formulate problems, and SCIP as a solver.
 +
 +Find SCIP and an academic license in ''​chef/​site-cookbooks/​intro-to-autonomy/​files/​default/​scipopt''​. Place the contents in ''/​usr/​local/​src''​. (No need to decompress yet.)
 +
 +Run the following script from ''/​usr/​local/​src''​ as root to compile SCIP with NumberJack flags:
 +
 +<​code>​
 +#!/bin/bash
 +
 +set -e
 +# Check SCIP not compiled yet
 +file="/​usr/​local/​src/​scipoptsuite-3.2.0/​lib/​libscipopt-3.2.0.linux.x86_64.gnu.opt.a"​
 +if [ -f "​$file"​ ]
 +then
 +  echo "​Compiled SCIP library found. Exiting compilation of SCIP bash script successfully."​
 +  exit 0
 +else
 +  echo "SCIP compiled library not found in: $file. Proceeding to compile SCIP....."​
 +  tar xvf scipoptsuite-3.2.0.tgz
 +  cd scipoptsuite-3.2.0
 +  make scipoptlib ZIMPL=false ZLIB=false READLINE=false GAMS=false GMP=false LEGACY=true SPX_LEGACY=true -j3
 +  echo "SCIP compiled sucessfully. Exiting compilation of SCIP bash script successfully."​
 +fi
 +</​code>​
 +
 +Then, set a SCIP environment variable, which will be used when Numberjack is installed:
 +
 +<​code>​
 +ENV['​ZIBPATH'​] = '/​usr/​local/​src/​scipoptsuite-3.2.0'​
 +</​code>​
 +
 +Finally, install Numberjack, matplotlib, and numpy through pip. The Python files required for this project are located in the Project 2 git repository.
 +
 +
 +===== If You Cannot Use SCIP =====
 +
 +If you are unable to use SCIP in the VM, please follow [[:​numberjack|these instructions]].
  
 ===== Project Overview ===== ===== Project Overview =====
Line 33: Line 73:
 ===== Part 0: Introduction ===== ===== Part 0: Introduction =====
  
-First, you must learn about the VRP problem. Read the following sections of [[http://​citeseerx.ist.psu.edu/​viewdoc/​download?​doi=10.1.1.170.2577&​rep=rep1&​type=pdf|Handbook of Constraint Programming (2006)]]:+First, you must learn about the VRP problem. Read the following sections of [[http://​citeseerx.ist.psu.edu/​viewdoc/​download?​doi=10.1.1.170.2577&​rep=rep1&​type=pdf|Handbook of Constraint Programming (2006)]] ​(also posted on Stellar):
  
   * Chapter 23 intro    * Chapter 23 intro 
Line 219: Line 259:
  
 If you do see an application to your own research, please be aware that while Numberjack is great for pedagogical purposes, it has some serious issues that prevent it from being fully utilized in a non-exploratory research context. If you'd like to learn more about other options for specifying constraint programs, please drop the course staff a line and we can give you some pointers. If you do see an application to your own research, please be aware that while Numberjack is great for pedagogical purposes, it has some serious issues that prevent it from being fully utilized in a non-exploratory research context. If you'd like to learn more about other options for specifying constraint programs, please drop the course staff a line and we can give you some pointers.
 +
 +===== Errata =====
 +
 +There are two errors in the provided code for part 2:
 +
 +1. Correct
 +
 +<​code>​
 +q = VarArray(len(V),​ 0, n + 2*m - 1, "​q"​)
 +</​code>​
 +
 +to
 +
 +<​code>​
 +q = VarArray(len(V),​ 0, max([self.vrp.capacity(k) for k in M]), "​q"​)
 +</​code>​
 +
 +
 +2. Correct
 +
 +<​code>​
 +v = VarArray(len(V),​ 0, n + 2*m - 1, "​v"​)
 +</​code>​
 +
 +to
 +
 +<​code>​
 +v = VarArray(len(V),​ 0, m - 1, "​v"​)
 +</​code>​
projects/project2.1470677764.txt.gz · Last modified: 2016/08/08 13:36 by aytonb