A Short Intro to Constraints
zalo.github.io
zalo.github.io
There's many problems I would like to solve using some sort of model definition with constraints given, and variable(s) to optimize. Either to aid in guiding the design of a system, or using generative design.
Example:
- Electrical power, voltage and amperage constraints along with physical size constraints, in a circuit model.
- Data size and throughput and concurrency constraints in a distributed system models.
I have a feeling there must be well known techniques and/or tools to do these kind of general purpose constraint modelling, but I can't put my finger on it. The closest that comes to mind is using Prolog, but I've only used it with boolean type of constraints.minizinc
prolog clpfd, chr
eclipse prolog-like constraint system
answer set programming
this is only one of many options but it’s a good one.
Personally, I find the languages and methods used in constraint programming (CP) to define models the most clear, even though that is not always the best way to actaully solve the problems.
To write CP models, the MiniZinc language is quite nice and has support for using many different solvers on the back end. The MiniZinc website (https://www.minizinc.org/) has quite a lot of documentation. For an outsider perspective, Hillel Wayne wrote an interesting blog post on using MiniZinc (https://hillelwayne.com/post/minizinc/).
I see further interesting graphics from the author here: https://github.com/zalo/MathUtilities
All of them are excellent graphics frameworks (though with strengths in 2D, 3D, and standalone content respectively).
this GDC talk is kinda hard to understand (at least for me) https://www.youtube.com/watch?v=SHinxAhv1ZE