Skip to content

erickgarro/colorMapSAT

Repository files navigation

colorMapSAT

A SAT encoder and visualizer for coloring maps

Project description:

Project: Colors

Installation:

Clone the repository:

git clone https://github.com/erickgarro/colorMapSAT.git

Install the dependencies:

pip install -r requirements.txt

Usage:

You can try it on your machine or on the cloud.
View the online demo: https://colors.erickgarro.com

For local / Mac execution:

Use the main branch.

For cloud / Linux execution:

Use the digitalocean branch.

Execution on Mac or Linux:

Create a virtual Python3 environment:

virtualenv -p python3 env

Activate your virtual environment:

source env/bin/activate

Run the command:

flask run
  1. Access the web app at: http://127.0.0.1:5000
  2. Select the map you want to solve.
  3. Type the number of colors you want to use.
  4. Click on the Solve it! button.
  5. Check the (no)solution.
  6. [Optional] Download the solution files or you solved map image.

Deployment on the cloud:

The web app is tested to work on the App Platform on Digital Ocean.

  1. Create an account
  2. Create a new App (we recommend a basic plan with 1vCPU and 512MB RAM).
  3. Choose the digitalocean branch as your source.
  4. Use this as your Run Command:
gunicorn --worker-tmp-dir /dev/shm --config gunicorn_config.py app:app
  1. Follow their instructions to finalize the deployment.
  2. Visit your provided URL.

Copyright © 2022. Brian Bronz, Erick Garro, and Lorenzo Zaniol.
Using Z3 and SAT clause generator by Martin Blicha. ToC @USI, Switzerland
Other copyrights belong to their respective owners.