Model-Free Unsupervised Learning for Optimization Problems with Constraints