@Tamas_Papp: Thank you, I have edited my first post and will provide a better example. You are absolutely right, it is indispensable.
Here is an example. But because I have not really a problem in terms of error messages, I just give the structure of my code and use [...]
to abbreviate some content here.
### initialization
function read_INI_files()
IN_configINI = Inifile()
IN_calcINI = Inifile()
IN_envINI = Inifile()
read(IN_configINI, joinpath(dirname(@__FILE__),"config.ini"))
read(IN_calcINI, joinpath(dirname(@__FILE__),"calc.ini"))
read(IN_envINI, joinpath(dirname(@__FILE__),"env.ini"))
return(IN_configINI, IN_calcINI, IN_envINI)
end
function evaluate_INI_files(IN_configINI, IN_calcINI, IN_envINI)
[...]
end
IN_configINI, IN_calcINI, IN_envINI = read_INI_files()
IN_CalculationProperties, IN_N_StoragesToday, IN_N_RatesToday, IN_SupportValues, IN_SimStart, IN_SimEnd, IN_Δt = evaluate_INI_files(IN_configINI, IN_calcINI, IN_envINI)
### general properties
function initialize_TimeStep(IN_SimStart, IN_SimEnd, IN_Δt)
[...]
end
function initialize_Storages(IN_N_StoragesToday)
[...]
end
SM_N_Storages = initialize_Storages(IN_N_StoragesToday)
SM_SimStart, SM_SimEnd, SM_Δt, SM_SimSteps, SM_TimeStep = initialize_TimeStep(IN_SimStart, IN_SimEnd, IN_Δt)
# ------------------------------------------------------------------------------
### simulation
include("processes/Atm_N-1.1.jl")
include("processes/Lith_N-1.1.jl")
for SM_t in range(1, Int(SM_SimSteps) - 1)
[...]
At the moment I work at the simulation part (below the dashed line), but sometimes I need to change input variables. For this, I don’t want to call all functions individually. Instead of typing in the console…
IN_configINI, IN_calcINI, IN_envINI = read_INI_files()
IN_CalculationProperties, IN_N_StoragesToday, IN_N_RatesToday, IN_SupportValues, IN_SimStart, IN_SimEnd, IN_Δt = evaluate_INI_files(IN_configINI, IN_calcINI, IN_envINI)
SM_N_Storages = initialize_Storages(IN_N_StoragesToday)
SM_SimStart, SM_SimEnd, SM_Δt, SM_SimSteps, SM_TimeStep = initialize_TimeStep(IN_SimStart, IN_SimEnd, IN_Δt)
…I want to write something like…
reset()
Is there any easy possibility to bundle this?