Skip to content

Commit

Permalink
paper 4 model constant initalization
Browse files Browse the repository at this point in the history
  • Loading branch information
Deer-WarLord committed Aug 11, 2022
1 parent e577121 commit 54ba5bc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
6 changes: 5 additions & 1 deletion initial_data_3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"L0": 160822,
"L0": 544909.8292,
"alpha": -0.520527831,
"beta": -0.218150282,
"gamma": -46165.86125,
"nu": 0.34081467,

"A_old": ["3.76844009867984E-09", "397.666323155632", "0.000392438510741043"],
"mu": ["0.69", "0.36", "0.435"],
Expand Down
26 changes: 12 additions & 14 deletions main3.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,16 @@ def _build_production_eq(self, j, prefix="_old"):
self.EQ["q_{N}".format(i=i, N=j)])

def _build_base_labor_eq(self, j, dt):
L1 = lambda t: t
L2 = lambda t: t
L3 = lambda t: t
L4 = lambda t: t

self.EQ["L_{N}".format(N=j)] = self.EQ["alpha"] * L1(dt) + \
self.EQ["beta"] * L2(dt) - \
self.EQ["gamma"] * L3(dt) - \
self.EQ["nu"] * L4(dt)
'''
X1 X2 X3 X4
a0 a1 a2 a3 a4
544909,8292 -0,520527831 -0,218150282 -46165,86125 0,34081467
'''
self.EQ["L_{N}".format(N=j)] = self.EQ["L0"] + \
self.EQ["alpha"] * dt + \
self.EQ["beta"] * dt + \
self.EQ["gamma"] * dt + \
self.EQ["nu"] * dt

def _price_eq(self, i, j, prefix="_old"):
self.EQ["p{}_{i}_{N}".format(prefix, N=j, i=i)] = (self.EQ["Y0{}_{i}".format(prefix, i=i)] +
Expand Down Expand Up @@ -240,10 +241,7 @@ def _build_salary_cond(self, j):
for i in range(0, 3):
self.COND["salary_{N}".format(N=j)] = self.EQ["w_{i}".format(i=i)] - self.EQ["W_{i}_min".format(i=i)] # >=0



# TODO init equation consts for Labor
# TODO init equation variables
# TODO init equation variables | Поділ на сектори ВІФ знайти всі константи | Аі - це yD
# TODO init equation conditions
# TODO check steps
# TODO check ranges
Expand Down Expand Up @@ -1115,4 +1113,4 @@ def save_data(rs, tau, N, dt):
if rs.find_initial_vector():
rs.find_min_vector(rs.results)
save_data(rs, 2, 4, "025")
'''

0 comments on commit 54ba5bc

Please sign in to comment.