This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# min x + y ** 2 + z**3 | |
# s.t | |
# 1/x + 2/y + 3/z = 1 | |
# x =(nearly) 19.7297094474278 | |
# y =(nearly) 7.301528640155925 | |
# z =(nearly) 4.441813756499455 | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Given a standard 8×8 chessboard, write a function to determine a sequence of moves for | |
a knight such that it visits every square exactly once | |
""" | |
import gamspy as gp | |
m = gp.Container() | |
moves = gp.Set(m, name="moves", records=range(64)) |