1classdef Model < Copyable
2 % Abstract parent
class for all models in the LINE framework
4 % This
class provides the basic structure and common functionality
5 %
for all LINE model types. It maintains model metadata such as
6 % name, version, and attributes.
8 % Copyright (c) 2012-2026, Imperial College London
12 attribute; % Model attributes and metadata
13 lineVersion; % Version of LINE used to create the model
17 name; % Name of the model
21 function self = Model(name)
22 % Constructor: Creates a
new Model instance
25 % name - String name
for the model
28 % self - Model instance
30 % This constructor ensures LINE
is properly initialized,
31 % sets the model name, and records the LINE version.
33 % Initialize LINE
if not already done
34 if isempty(GlobalConstants.Verbose)
38 % Set version and name
39 lineVersion = strtrim(GlobalConstants.Version);
40 self.setVersion(lineVersion);
44 function out = getName(self)
48 % out - String name of the model
53 function self = setName(self, name)
57 % name - String name for the model
60 % self - Updated Model instance
65 function v = getVersion(self)
66 % Get the LINE version used to create this model
69 % v - String version of LINE
74 function self = setVersion(self, version)
75 % Set the LINE version for this model
78 % version - String version of LINE
81 % self - Updated Model instance
83 self.lineVersion = version;