문제

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,  
... ]  

]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top