Created
June 21, 2018 23:18
-
-
Save wilsonianb/d17dc79f0e24ae030e225ed17a37c311 to your computer and use it in GitHub Desktop.
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
from sympy import * | |
# nj is larger UNL size, o is common unl size, pi/pj is extra size of ni/nj, qj is nj's quorum, tj is fault tolerance of nj | |
nj, pi, pj, qj, tj = symbols("nj, pi, pj, qj, tj") | |
oij = nj - pj | |
ni = oij + pi | |
ti = ni/4 - pi/4 - pj/4 | |
fork_safej = oij > (ni/2 + nj - qj + ti) | |
qj = solve(fork_safej,qj).args[1] | |
print 'qj >', qj | |
fork_firstj = (1-qj/nj)*nj > tj | |
print solve(fork_firstj,tj) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment