@@ -11,15 +11,15 @@ abstract type AbstractModel end
1111const AbstractEmptyModel = Union{AbstractModel, Nothing}
1212
1313"""
14- Model{IFM <: AbstractEmptyModel, MBM <: AbstractEmptyModel, MLM <: AbstractEmptyModel}
14+ Model{IFM <: AbstractEmptyModel, MBM <: AbstractEmptyModel, TC <: AbstractEmptyModel}
1515
1616A mutable struct that represents a model with three components: iceflow, mass balance, and machine learning.
1717
1818 Model(
1919 iceflow::IFM,
2020 mass_balance::MBM,
21- machine_learning::MLM ,
22- ) where {IFM <: AbstractEmptyModel, MBM <: AbstractEmptyModel, MLM <: AbstractEmptyModel}
21+ trainable_components::TC ,
22+ ) where {IFM <: AbstractEmptyModel, MBM <: AbstractEmptyModel, TC <: AbstractEmptyModel}
2323
2424 Model(;iceflow, mass_balance) = Model(iceflow, mass_balance, nothing)
2525
@@ -29,28 +29,28 @@ Initialize Model (no machine learning model).
2929
3030 - `iceflow::IFM}`: Represents the iceflow component, which is an instance of `IFM`.
3131 - `mass_balance::Union{MBM, Vector{MBM}}`: Represents the mass balance component, which is an instance of `MBM`.
32- - `machine_learning::MLM `: Represents the machine learning component , which is an instance of `MLM `.
32+ - `trainable_components::TC `: Represents the trainable components , which is an instance of `TC `.
3333
3434# Type Parameters
3535
3636 - `IFM`: A subtype of `AbstractEmptyModel` representing the type of the iceflow model.
3737 - `MBM`: A subtype of `AbstractEmptyModel` representing the type of the mass balance model.
38- - `MLM `: A subtype of `AbstractEmptyModel` representing the type of the machine learning model .
38+ - `TC `: A subtype of `AbstractEmptyModel` representing the type of the trainable components .
3939"""
4040mutable struct Model{
41- IFM <: AbstractEmptyModel , MBM <: AbstractEmptyModel , MLM <: AbstractEmptyModel }
41+ IFM <: AbstractEmptyModel , MBM <: AbstractEmptyModel , TC <: AbstractEmptyModel }
4242 iceflow:: IFM
4343 mass_balance:: MBM
44- machine_learning :: MLM
44+ trainable_components :: TC
4545
4646 function Model (
4747 iceflow:: IFM ,
4848 mass_balance:: MBM ,
49- machine_learning :: MLM
49+ trainable_components :: TC
5050 ) where {
51- IFM <: AbstractEmptyModel , MBM <: AbstractEmptyModel , MLM <: AbstractEmptyModel }
52- new {typeof(iceflow), typeof(mass_balance), typeof(machine_learning )} (
53- iceflow, mass_balance, machine_learning )
51+ IFM <: AbstractEmptyModel , MBM <: AbstractEmptyModel , TC <: AbstractEmptyModel }
52+ new {typeof(iceflow), typeof(mass_balance), typeof(trainable_components )} (
53+ iceflow, mass_balance, trainable_components )
5454 end
5555end
5656Model (; iceflow, mass_balance) = Model (iceflow, mass_balance, nothing )
@@ -99,11 +99,11 @@ function Base.show(io::IO, type::MIME"text/plain", model::Model)
9999 println (io)
100100 Base. show (io, type, model. mass_balance)
101101 println (io)
102- if isnothing (model. machine_learning )
102+ if isnothing (model. trainable_components )
103103 println (io, " No learnable components" )
104104 else
105105 println (io, " Learnable components" )
106- Base. show (io, type, model. machine_learning )
106+ Base. show (io, type, model. trainable_components )
107107 println (io)
108108 end
109109 print (io, " ***************" )
0 commit comments