A Method for Solving Optimization Problems with Equality Constraints by Using the SPICE Program