My codes of models in MiniZinc (rare constraint programming language). All codes are short because MiniZinc is a high-level constraint programming system, which uses third-party solvers. Every folder has an own README-file with a detailed explanation.
I studied discrete optimization in MiniZinc via a MOOC-course at Coursera "Basic Modeling for Discrete Optimization" https://www.coursera.org/learn/basic-modeling
About constraint programming you can read here https://en.wikipedia.org/wiki/Constraint_programming
And here in Russian https://habr.com/ru/company/billing/blog/342550/