Skip to content

Constraint Optimization with MiniZinc and SMT/SAT solving with Microsoft Z3.

Notifications You must be signed in to change notification settings

buoi/present-wrapping-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Present-Wrapping-Problem

Marco Buiani & Daniele Verì

The Present Wrapping problem can be viewed as finding the position of rectangular pieces in order to fit them into the available rectangular paper shape without overlap and rotation. In this project we present solutions with MiniZinc Constraint Programming modelling, SMT and SAT modelling with Microsoft Z3 solver.

Schermata 2022-04-22 alle 13 40 56

Instructions for launching:

CP in MiniZinc: Report

run cp_solver.mzn from the Minizinc IDE, .dzn converted instances are provided inside the cp/instances/ folder

SMT in Z3: Report

. python3 smt/src/smt_solver.py smt/instances/<instance.txt> produces output to the terminal

. python3 smt/src/smt_solver.py smt/instances/<instance.txt> -o creates output file in the same folder as input

. python3 smt/src/smt_solver.py smt/instances/<instance.txt> --allow_rotations allows rotation of each present

. python3 smt/src/smt_solver.py smt/instances/<instance.txt> -v produces a png image of the solution (requires python pillow)

SAT in Z3: Report

. python3 sat/src/sat_solver.py sat/instances/<instance.txt> produces output to the terminal

About

Constraint Optimization with MiniZinc and SMT/SAT solving with Microsoft Z3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages