Currently, I am working on an unconstrained energy minimization function, but I need to add some constraints. My system is a 2D lattice with a force applied to it, and I want the sides to be able to move, but the length of each side to be constant.
I know that using a Lagrange multiplier could make the terms I want to stay constant, constant by making the energy cost so huge that it won't move anything. But I was wondering if there was a different way to add constraints to the system without changing the fact that the energy minimization is unconstrained.