I'm curious if someone would know where to point me?
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.
What you describe falls under the general umbrella term of combinatorial optimization, of which Constraint Programming, Mixed Integer Programming, SAT, SMT, and local search techniques can be said to fall under.
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/).
Have you looked at Propagator Networks? It's a fascinating computation model that I believe was originally proposed by Gerald Sussman. The original use case/example was electrical circuits.
Seems like AYBABTME is talking about constrained optimization, whereas you are speaking of "constraints" in a different context, i.e., this paper (https://dspace.mit.edu/handle/1721.1/6255) by Stallman and Sussman, further developed in Guy Steele's PhD dissertation, eventually leading to the propagator model by Radul and Sussman (https://groups.csail.mit.edu/mac/users/gjs/propagators/). Both kinds of "constraints" are very interesting, but one is a class of numerical algorithms and another a general programming framework.
So probably the author put a "distance less than or equal to" constraint. Having a "distance equal to" constraint would have the point always on the circle. And, magically, "distance larger than" would have the point always outside the circle.
That one didn't show code. I have to assume the code tests if the point is outside the circle before constraining it, similarly to how a later constraint tests if a point is inside the circle before constraining it (the one where you shove balls around).
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:
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.