Skip to content

Instantly share code, notes, and snippets.

@azarnyx
Created July 28, 2019 17:22
Show Gist options
  • Save azarnyx/d382c72e613940380af8ab029935abf0 to your computer and use it in GitHub Desktop.
Save azarnyx/d382c72e613940380af8ab029935abf0 to your computer and use it in GitHub Desktop.
ini_guess1 = np.array([1/num_sides1]*num_sides1)
ini_guess2 = np.array([1/num_sides2]*num_sides2)
sol1 = minimize(sum_form, ini_guess1,
bounds=bnds1, constraints=[cons01, cons21], options={'maxiter':1001})
sol2 = minimize(sum_form, ini_guess2,
bounds=bnds2, constraints=[cons02, cons22], options={'maxiter':1001})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment