Created
March 11, 2016 12:46
-
-
Save ghorn/57a0267c6008c15d2686 to your computer and use it in GitHub Desktop.
This file contains 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
# check for inequalities | |
for k in range(arg['lbx'].shape[0]): | |
lbx = arg['lbx'].cat[k] | |
ubx = arg['ubx'].cat[k] | |
if lbx == ubx: | |
pass | |
elif lbx == -np.inf and ubx == np.inf: | |
pass | |
else: | |
raise ValueError('x index %d is an inequality (%.3g, %.3g)' % (k, lbx, ubx)) | |
for k in range(arg['lbg'].shape[0]): | |
lbg = arg['lbg'].cat[k] | |
ubg = arg['ubg'].cat[k] | |
if lbg == ubg: | |
pass | |
elif lbg == -np.inf and ubg == np.inf: | |
pass | |
else: | |
raise ValueError('g index %d is an inequality (%.3g, %.3g)' % (k, lbg, ubg)) | |
res = solver(arg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment