Engee documentation
Notebook

Calculation of loan interest and overpayments.

This model displays the calculation of the percentage of loan overpayments and overpayments for known payment months, monthly payment amount and total loan amount.

The model itself is shown in the picture below.

image.png

Next, we will add an auxiliary function of the model and specify the loan data.

In [ ]:
# Enabling the auxiliary model launch function.
function run_model( name_model)
    
    Path = (@__DIR__) * "/" * name_model * ".engee"
    
    if name_model in [m.name for m in engee.get_all_models()] # Checking the condition for loading a model into the kernel
        model = engee.open( name_model ) # Open the model
        model_output = engee.run( model, verbose=true ); # Launch the model
    else
        model = engee.load( Path, force=true ) # Upload a model
        model_output = engee.run( model, verbose=true ); # Launch the model
        engee.close( name_model, force=true ); # Close the model
    end
    sleep(5)
    return model_output
end
Out[0]:
run_model (generic function with 1 method)
In [ ]:
Term = 12*7;
Monthly_payment = 25000;
Sum = 1300000;

Let's run the model and calculate the calculated tax amount.

In [ ]:
run_model("Overpayment_on_loan") # Launching the model.

Loan_interest = collect(simout["Overpayment_on_loan/Loan interest"]);
Overpayment = collect(simout["Overpayment_on_loan/Overpayment"]);

println("Percentage of loan overpayments: " * string(Loan_interest.value))
println("Overpayment: " * string(Overpayment.value))
Building...
Progress 100%
Процент переплат по кредиту: Any[61.53846153846154]
Переплата: Any[800000]

Conclusion

In this example, we have demonstrated the possibilities of using Engee for everyday tasks.

Blocks used in example