Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
結果を平方数のみに制限したい(Excelプラグインを使用しています)。これを強制するにはどうすればよいですか?
のように、Xが平方数であるという条件の下で、目標Xを最小化します。
調整可能なセルYを作成し、整数に制限します。最小化しようとしている方程式をY^2に等しく設定します。
マークの答えは役に立ちました。OMLのソリューションは次のようになります
Model[ Decisions[ .... ], Decisions[ Integers[10000,31622],y ], Constraints[ x == y*y, ... ] ]