Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCDDS-core
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
SCDDS
SCDDS-core
Commits
168a11d2
Commit
168a11d2
authored
4 years ago
by
Cristian Galperti
Browse files
Options
Downloads
Patches
Plain Diff
ipoffs and adaptipstart tunparam actualize ok
from scd server for now
parent
16bbe781
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/classes/SCDclass_mdspar.m
+25
-5
25 additions, 5 deletions
code/classes/SCDclass_mdspar.m
code/classes/SCDclass_mdsparboolean.m
+41
-0
41 additions, 0 deletions
code/classes/SCDclass_mdsparboolean.m
with
66 additions
and
5 deletions
code/classes/SCDclass_mdspar.m
+
25
−
5
View file @
168a11d2
...
...
@@ -35,6 +35,9 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
unlinked
% unlinked parameter, no actualization will be performed (this is set via an empty MDS source path)
actualizable
% true if after MDS data retrieval phase the parameter is actualizable
overrideshot
% =1 if biult with overridden whot number in this case this shot number will be always used during actualization
overrideshotn
% shot number in case of overridden shot number
end
properties
...
...
@@ -54,6 +57,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
addParameter
(
obj
.
cparser
,
'datadictname'
,
''
,
@
(
x
)
ischar
(
x
));
addParameter
(
obj
.
cparser
,
'modeltpstruct'
,
''
,
@
(
x
)
ischar
(
x
));
% desttp ?
addParameter
(
obj
.
cparser
,
'skippable'
,
'false'
,
@
(
x
)
ischar
(
x
));
addParameter
(
obj
.
cparser
,
'shot'
,
NaN
,
@
(
x
)
isnumeric
(
x
)
&&
isscalar
(
x
));
obj
.
verbose
=
1
;
obj
.
matlabseparator
=
'.'
;
...
...
@@ -82,6 +86,13 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
else
obj
.
unlinked
=
0
;
end
if
isnan
(
obj
.
cparser
.
Results
.
shot
)
obj
.
overrideshot
=
0
;
else
obj
.
overrideshot
=
1
;
obj
.
overrideshotn
=
obj
.
cparser
.
Results
.
shot
;
end
end
function
name
=
getmodelname
(
obj
)
...
...
@@ -96,9 +107,14 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
assert
(
~~
exist
(
'mdsconnect'
,
'file'
),
...
'SCD:NoMDS'
,
'mdsconnect not found, are the mds matlab tools installed?'
)
mdsconnect
(
obj
.
mdsserver
);
s
=
mdsopen
(
obj
.
mdstree
,
shot
);
if
obj
.
overrideshot
==
1
localshot
=
obj
.
overrideshotn
;
else
localshot
=
shot
;
end
s
=
mdsopen
(
obj
.
mdstree
,
localshot
);
str
=
sprintf
(
'SCDclass_mdsparam (%s), failed opening MDS+ tree'
,
obj
.
modelparam
);
assert
(
s
==
shot
,
str
);
assert
(
s
==
local
shot
,
str
);
end
function
obj
=
preactualizecommon
(
obj
,
shot
)
...
...
@@ -172,11 +188,15 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
fprintf
(
' MDS+ source server:
''
%s
''
, Tree:
''
%s
''
\n'
,
obj
.
mdsserver
,
obj
.
mdstree
);
fprintf
(
' MDS+ TDI expressions, model:
''
%s
''
'
,
obj
.
tdiexprmodel
);
if
(
strcmp
(
obj
.
tdiexprmodel
,
obj
.
tdiexprshot
))
fprintf
(
', shot: same
.\n
'
);
fprintf
(
', shot: same'
);
else
fprintf
(
', shot:
''
%s
''
\n'
,
obj
.
tdiexprshot
);
fprintf
(
', shot:
''
%s
''
'
,
obj
.
tdiexprshot
);
end
if
obj
.
overrideshot
==
1
fprintf
(
', WARNING: shot ovr to %d.\n'
,
obj
.
overrideshotn
);
else
fprintf
(
'.\n'
);
end
else
fprintf
(
' UNLINKED!\n'
);
end
...
...
This diff is collapsed.
Click to expand it.
code/classes/SCDclass_mdsparboolean.m
0 → 100644
+
41
−
0
View file @
168a11d2
classdef
SCDclass_mdsparboolean
<
SCDclass_mdspar
% A constant boolean MDS+ parameter
properties
end
methods
function
obj
=
SCDclass_mdsparboolean
(
srctdimodel
,
destparam
,
varargin
)
obj
@
SCDclass_mdspar
();
% Constructor parser customization definitions here
obj
=
obj
.
parseconstructorcommon
(
srctdimodel
,
destparam
,
varargin
);
% Constructor parser customization results here
obj
.
classname
=
mfilename
;
obj
.
marteclassname
=
'MDSParScalarBool'
;
end
function
actualizedata
(
obj
,
shot
)
obj
=
obj
.
preactualizecommon
(
shot
);
if
~
obj
.
actualizable
,
return
;
end
obj
.
caststring
=
sprintf
(
'%s=logical(%s);'
,
obj
.
assignvar
,
obj
.
assignvar
);
obj
.
postactualizecommon
(
shot
);
end
function
[
obj
,
value
]
=
getdata
(
obj
,
shot
)
[
obj
,
value
]
=
obj
.
getdatacommon
(
shot
);
value
=
int32
(
value
);
end
function
printinfo
(
obj
)
obj
.
printinfocommon
;
end
function
entrystring
=
genMARTe2entry
(
obj
,
shot
)
entrystring
=
obj
.
genMARTe2entrycommon
(
shot
);
entrystring
=
[
entrystring
' }'
];
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment