tweaks
This commit is contained in:
commit
a51669185d
|
|
@ -2,3 +2,8 @@ __pycache__
|
|||
.vscode
|
||||
.ipynb_checkpoints
|
||||
.DS_Store
|
||||
.idea
|
||||
models/__pycache__
|
||||
models/v3/__pycache__
|
||||
models/v3/model/__pycache__
|
||||
models/v3/model/parts/__pycache__
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 80 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -34,7 +34,16 @@ exp.append_configs(
|
|||
)
|
||||
|
||||
|
||||
|
||||
# Initialize network x
|
||||
for c in configs:
|
||||
c.initial_state = deepcopy(c.initial_state)
|
||||
|
||||
print("Params (config.py) : ", c.sim_config['M'])
|
||||
|
||||
c.initial_state['network'] = initialize_network(initial_values['n'],initial_values['m'],
|
||||
initial_values['funds'],
|
||||
initial_values['supply'],c.sim_config['M'])
|
||||
|
||||
def get_configs():
|
||||
'''
|
||||
Function to extract the configuration information for display in a notebook.
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,35 +1,23 @@
|
|||
import numpy as np
|
||||
|
||||
# Define parameter values
|
||||
beta = int(0.2) # maximum share of funds a proposal can take
|
||||
rho = 0.0025 # tuning param for the trigger function
|
||||
# Alpha from solidity code - uint256 _decay = 9999599; // 3 days halftime. halftime_alpha = (1/2)**(1/t)
|
||||
# Half life associated with solidity code alpha (in number of blocks on xDai).
|
||||
# Our simulation is associated with timesteps, so our half life is based of of days.
|
||||
alpha = 2**(-1/3) # timescale set in days with 3 day halflife
|
||||
|
||||
|
||||
|
||||
# Initial values
|
||||
initial_values = {
|
||||
'sentiment': 0.6,
|
||||
'n': 30, #initial participants
|
||||
'm': 7, #initial proposals
|
||||
'funds': 4867.21, # in honey, as of 8-5-2020
|
||||
'supply': 22392.22, # Honey total supply balance as of 8-5-2020
|
||||
'params': { 'beta': beta,
|
||||
'rho': rho, # tuning param for the trigger function
|
||||
'alpha': alpha
|
||||
},
|
||||
'supply': 22392.22, # Honey total supply balance as of 8-5-2020
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Alpha from solidity code - uint256 _decay = 9999599; // 3 days halftime. halftime_alpha = (1/2)**(1/t)
|
||||
# Half life associated with solidity code alpha (in number of blocks on xDai).
|
||||
# Our simulation is associated with timesteps, so our half life is based of of days.
|
||||
# Parameters
|
||||
params = {
|
||||
'beta': [beta],
|
||||
'rho': [rho],
|
||||
'alpha': [alpha],
|
||||
'beta': [0.2], # maximum share of funds a proposal can take
|
||||
'rho': [0.0025], # tuning param for the trigger function
|
||||
'alpha': [2**(-1/3)], # timescale set in days with 3 day halflife (see above)
|
||||
'gamma': [0.001], # expansion of supply per per day
|
||||
'sensitivity': [.75],
|
||||
'tmin': [1], #unit days; minimum periods passed before a proposal can pass
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ from .parts.utils import *
|
|||
from .parts.sys_params import *
|
||||
|
||||
state_variables = {
|
||||
'network': initialize_network(initial_values['n'],initial_values['m'],
|
||||
initial_values['funds'],
|
||||
initial_values['supply'],initial_values['params']),
|
||||
'network': 0, # will initialize during config.py
|
||||
'funds':initial_values['funds'],
|
||||
'sentiment': initial_values['sentiment'],
|
||||
'effective_supply': (initial_values['supply']-initial_values['funds'])*.8,
|
||||
|
|
|
|||
Loading…
Reference in New Issue