Search code examples
excelms-solver-foundation

How to enforce a Square number constraint in Microsoft Solver foundation OML?


I want to limit the result to only square numbers ( I am using excel plugin). How do I enforce this?

As in, Minimize Goal X subject to a condition that X is a square number.


Solution

  • Create an adjustable cell, Y and restrict it to be an integer. Set the equation that you are trying to minimize equal to Y^2.