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.
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.
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.
Mark's answer helped. The solution in OML would look like
Model[
Decisions[ .... ],
Decisions[
Integers[10000,31622],y
],
Constraints[
x == y*y,
... ]
]