quick debugg on convictio3

This commit is contained in:
Zargham 2019-10-19 15:54:42 +02:00
parent 800c10222a
commit 54763ac333
6 changed files with 363 additions and 333 deletions

File diff suppressed because one or more lines are too long

View File

@ -87,7 +87,7 @@ def initialize_network(n,m, funds_func=total_funds_given_total_supply, trigger_f
network.nodes[j]['age']=0
r_rv = gamma.rvs(3,loc=0.001, scale=10000)
network.node[j]['funds_requested'] = r_rv
network.nodes[j]['funds_requested'] = r_rv
network.nodes[j]['trigger']= trigger_threshold(r_rv, initial_funds, initial_supply)

View File

@ -49,7 +49,7 @@ def gen_new_proposal(network, funds, supply, trigger_func, scale_factor = 1.0/10
rescale = funds*scale_factor
r_rv = gamma.rvs(3,loc=0.001, scale=rescale)
network.node[j]['funds_requested'] = r_rv
network.nodes[j]['funds_requested'] = r_rv
network.nodes[j]['trigger']= trigger_func(r_rv, funds, supply)
@ -252,8 +252,8 @@ def complete_proposal(params, step, sL, s, _input):
for i in participants:
force = network.edges[(i,j)]['affinity']
sentiment = network.node[i]['sentiment']
network.node[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)
sentiment = network.nodes[i]['sentiment']
network.nodes[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)
@ -262,8 +262,8 @@ def complete_proposal(params, step, sL, s, _input):
network.nodes[j]['status']='failed'
for i in participants:
force = -network.edges[(i,j)]['affinity']
sentiment = network.node[i]['sentiment']
network.node[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)
sentiment = network.nodes[i]['sentiment']
network.nodes[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)
key = 'network'
value = network