Skip to content

Commit 3a38eea

Browse files
authored
Merge branch 'bancaditalia:main' into mem
2 parents cb9b71d + 2d6f417 commit 3a38eea

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

examples/basic_example.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ data = Bit.init_data(model);
3434

3535
for t in 1:T
3636
println(t)
37-
Bit.one_epoch!(model; multi_threading = true)
37+
Bit.run_one_epoch!(model; multi_threading = true)
3838
Bit.update_data!(data, model)
3939
end
4040

examples/benchmark_w_matlab.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function run(parameters, initial_conditions, T; multi_threading = false)
1212
data = BeforeIT.init_data(model);
1313

1414
for _ in 1:T
15-
BeforeIT.one_epoch!(model; multi_threading = multi_threading)
15+
BeforeIT.run_one_epoch!(model; multi_threading = multi_threading)
1616
BeforeIT.update_data!(data, model)
1717
end
1818
return model, data

main.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data = BeforeIT.init_data(model)
1010

1111
for t in 1:T
1212
println("Epoch: ", t)
13-
BeforeIT.one_epoch!(model; multi_threading = true)
13+
BeforeIT.run_one_epoch!(model; multi_threading = true)
1414
BeforeIT.update_data!(data, model)
1515
end
1616

src/one_epoch.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
"""
4-
one_epoch!(model; multi_threading = false)
4+
run_one_epoch!(model; multi_threading = false)
55
66
This function simulates a single epoch the economic model, updating various components of the model based
77
the interactions between different economic agents. It accepts a `model` object, which encapsulates the state for the
@@ -17,7 +17,7 @@ Key operations performed include:
1717
1818
The function updates the model in-place and does not return any value.
1919
"""
20-
function one_epoch!(model; multi_threading = false, shock = NoShock())
20+
function run_one_epoch!(model; multi_threading = false, shock = NoShock())
2121

2222
gov = model.gov # government
2323
cb = model.cb # central bank

src/one_simulation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The simulation runs for a number of epochs specified by `model.prop.T`.
1212
1313
# Details
1414
The function initializes the data using `BeforeIT.init_data(model)`, then iteratively updates the model and data
15-
for each epoch using `BeforeIT.one_epoch!(model)` and `BeforeIT.update_data!(data, model)` respectively.
15+
for each epoch using `BeforeIT.run_one_epoch!(model)` and `BeforeIT.update_data!(data, model)` respectively.
1616
1717
# Example
1818
```julia
@@ -26,7 +26,7 @@ function run_one_sim!(model; multi_threading = false, shock = NoShock())
2626
T = model.prop.T
2727

2828
for _ in 1:T
29-
BeforeIT.one_epoch!(model; multi_threading = multi_threading, shock = shock)
29+
BeforeIT.run_one_epoch!(model; multi_threading = multi_threading, shock = shock)
3030
BeforeIT.update_data!(data, model)
3131
end
3232

src/precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using PrecompileTools
88
@compile_workload let
99
model = BeforeIT.init_model(parameters, initial_conditions, T)
1010
data = BeforeIT.init_data(model);
11-
BeforeIT.one_epoch!(model)
11+
BeforeIT.run_one_epoch!(model)
1212
BeforeIT.update_data!(data, model)
1313
end
1414
end

src/utils/data.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Update the data `d` with the model `m`.
146146
147147
```julia
148148
data = BeforeIT.init_data(model)
149-
one_epoch!(model)
149+
run_one_epoch!(model)
150150
BeforeIT.update_data!(data, model)
151151
```
152152
"""

test/accounting_identities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using Test
1212
data = BeforeIT.init_data(model)
1313

1414
for t in 1:T
15-
BeforeIT.one_epoch!(model; multi_threading = false)
15+
BeforeIT.run_one_epoch!(model; multi_threading = false)
1616
BeforeIT.update_data!(data, model)
1717
end
1818

test/deterministic/deterministic_ouput_t1_t5.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
model = BeforeIT.init_model(parameters, initial_conditions, T)
88
data = BeforeIT.init_data(model)
99

10-
BeforeIT.one_epoch!(model; multi_threading = false)
10+
BeforeIT.run_one_epoch!(model; multi_threading = false)
1111
BeforeIT.update_data!(data, model)
1212

1313
# import results from matlab run
@@ -33,7 +33,7 @@
3333
model = BeforeIT.init_model(parameters, initial_conditions, T)
3434
data = BeforeIT.init_data(model)
3535
for t in 1:T
36-
BeforeIT.one_epoch!(model; multi_threading = false)
36+
BeforeIT.run_one_epoch!(model; multi_threading = false)
3737
BeforeIT.update_data!(data, model)
3838
end
3939

test/deterministic/one_run_deterministic.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
model = BeforeIT.init_model(parameters1, initial_conditions1, T;)
1515
data = BeforeIT.init_data(model)
1616
for t in 1:(T - 1)
17-
BeforeIT.one_epoch!(model; multi_threading = false)
17+
BeforeIT.run_one_epoch!(model; multi_threading = false)
1818
BeforeIT.update_data!(data, model)
1919
end
2020

@@ -23,7 +23,7 @@
2323
data2 = BeforeIT.init_data(model2)
2424

2525
for t in 1:(T - 1)
26-
BeforeIT.one_epoch!(model2; multi_threading = false)
26+
BeforeIT.run_one_epoch!(model2; multi_threading = false)
2727
BeforeIT.update_data!(data2, model2)
2828
end
2929

test/steady_state.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data = BeforeIT.init_data(model)
1010

1111
for t in 1:T
1212
println(t)
13-
BeforeIT.one_epoch!(model; multi_threading = false)
13+
BeforeIT.run_one_epoch!(model; multi_threading = false)
1414
BeforeIT.update_data!(data, model)
1515
end
1616

0 commit comments

Comments
 (0)