Skip to content

Alexander-Schiendorfer/cp-examples

Repository files navigation

CP-examples

This repository contains example problems and visualizations of different main flavors in constraint programming and discrete optimization, in general.

Its goal is to show the applicability for classes of problems such as scheduling-like, packing-like, etc. in analogy to what has been successfully done for machine learning (supervised, unsupervised, reinforcement).

Requirements

Installation

Execute the following line (for example in an Anaconda Prompt).

pip install -r requirements.txt

Then enter the directory you're interested in (for example, scheduling) and execute

python run_scheduling.py

An image will appear that visualizes the solution found by MiniZinc.

Example Problems

Each example has an associated .mzn file (and maybe some .dzn data files) and can be executed using the respective run_xyz.py Python file.

Assign tasks without overlaps and precedence requirements.

See https://www.youtube.com/watch?v=2ijSMrOFsJ8 for an explanation of the proposed model.

An example solution to a scheduling problem.

Fit as many rectangles within a square as possible. See https://www.youtube.com/watch?v=2ijSMrOFsJ8 for an explanation of the proposed model.

An example solution to a packing problem.

Put cars with several options in order such that consecutive capacity constraints are respected on an assembly line.

See https://www.youtube.com/watch?v=2ijSMrOFsJ8 for an explanation of the proposed model. An example solution to a scheduling problem.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages