import numpy as np
import json
import pathlib
from MMnSimulator import MMnSimulator
from nMM1Simulator import nMM1Simulator
from nEnM1Simulator import nEnM1Simulator
from nMM1ShortSimulator import nMM1ShortSimulator
from common import data_path, N

rho_list = list(np.arange(0.1, 1., 0.05))
n_list = list(range(1, 11))
result = {
    'N': N,
    'rho_list': rho_list,
    'n_list': n_list,
    'result': {},
}

miu = 1
for n in n_list:
    data = {
        'MMn': {'simulate': [], 'theory': []},
        'nMM1': {'simulate': [], 'theory': []},
        'nEnM1': {'simulate': [], 'theory': []},
        'nMM1Short': {'simulate': []},
    }
    for rho in rho_list:
        _miu = miu
        _lambda = rho * _miu * n
        for name in data:
            simulator = eval(name + "Simulator(_lambda, _miu, n)")
            if not name == 'nMM1Short':
                data[name]['theory'].append(simulator.Elq_theory)
            data[name]['simulate'].append(simulator.run(N))
    result['result'][n] = data

with data_path.open("w", encoding='UTF-8') as f:
    json.dump(result, f, indent=4)

a0b94f3db3e03587a516bc6837b54c8701cd2ec7
<mask token>

<mask token>
for n in n_list:
    data = {'MMn': {'simulate': [], 'theory': []}, 'nMM1': {'simulate': [],
        'theory': []}, 'nEnM1': {'simulate': [], 'theory': []}, 'nMM1Short':
        {'simulate': []}}
    for rho in rho_list:
        _miu = miu
        _lambda = rho * _miu * n
        for name in data:
            simulator = eval(name + 'Simulator(_lambda, _miu, n)')
            if not name == 'nMM1Short':
                data[name]['theory'].append(simulator.Elq_theory)
            data[name]['simulate'].append(simulator.run(N))
    result['result'][n] = data
with data_path.open('w', encoding='UTF-8') as f:
    json.dump(result, f, indent=4)

<mask token>
rho_list = list(np.arange(0.1, 1.0, 0.05))
n_list = list(range(1, 11))
result = {'N': N, 'rho_list': rho_list, 'n_list': n_list, 'result': {}}
miu = 1
for n in n_list:
    data = {'MMn': {'simulate': [], 'theory': []}, 'nMM1': {'simulate': [],
        'theory': []}, 'nEnM1': {'simulate': [], 'theory': []}, 'nMM1Short':
        {'simulate': []}}
    for rho in rho_list:
        _miu = miu
        _lambda = rho * _miu * n
        for name in data:
            simulator = eval(name + 'Simulator(_lambda, _miu, n)')
            if not name == 'nMM1Short':
                data[name]['theory'].append(simulator.Elq_theory)
            data[name]['simulate'].append(simulator.run(N))
    result['result'][n] = data
with data_path.open('w', encoding='UTF-8') as f:
    json.dump(result, f, indent=4)

import numpy as np
import json
import pathlib
from MMnSimulator import MMnSimulator
from nMM1Simulator import nMM1Simulator
from nEnM1Simulator import nEnM1Simulator
from nMM1ShortSimulator import nMM1ShortSimulator
from common import data_path, N
rho_list = list(np.arange(0.1, 1.0, 0.05))
n_list = list(range(1, 11))
result = {'N': N, 'rho_list': rho_list, 'n_list': n_list, 'result': {}}
miu = 1
for n in n_list:
    data = {'MMn': {'simulate': [], 'theory': []}, 'nMM1': {'simulate': [],
        'theory': []}, 'nEnM1': {'simulate': [], 'theory': []}, 'nMM1Short':
        {'simulate': []}}
    for rho in rho_list:
        _miu = miu
        _lambda = rho * _miu * n
        for name in data:
            simulator = eval(name + 'Simulator(_lambda, _miu, n)')
            if not name == 'nMM1Short':
                data[name]['theory'].append(simulator.Elq_theory)
            data[name]['simulate'].append(simulator.run(N))
    result['result'][n] = data
with data_path.open('w', encoding='UTF-8') as f:
    json.dump(result, f, indent=4)

import numpy as np
import json
import pathlib
from MMnSimulator import MMnSimulator
from nMM1Simulator import nMM1Simulator
from nEnM1Simulator import nEnM1Simulator
from nMM1ShortSimulator import nMM1ShortSimulator
from common import data_path, N

rho_list = list(np.arange(0.1, 1., 0.05))
n_list = list(range(1, 11))
result = {
    'N': N,
    'rho_list': rho_list,
    'n_list': n_list,
    'result': {},
}

miu = 1
for n in n_list:
    data = {
        'MMn': {'simulate': [], 'theory': []},
        'nMM1': {'simulate': [], 'theory': []},
        'nEnM1': {'simulate': [], 'theory': []},
        'nMM1Short': {'simulate': []},
    }
    for rho in rho_list:
        _miu = miu
        _lambda = rho * _miu * n
        for name in data:
            simulator = eval(name + "Simulator(_lambda, _miu, n)")
            if not name == 'nMM1Short':
                data[name]['theory'].append(simulator.Elq_theory)
            data[name]['simulate'].append(simulator.run(N))
    result['result'][n] = data

with data_path.open("w", encoding='UTF-8') as f:
    json.dump(result, f, indent=4)
