Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
wtlib
WindEnergyToolbox
Commits
c02550fd
Commit
c02550fd
authored
7 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost.dlcdefs: pass P_SOURCE to excel_stabcon to use as abs base path
parent
f4dbf8b5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/prepost/dlcdefs.py
+9
-2
9 additions, 2 deletions
wetb/prepost/dlcdefs.py
with
9 additions
and
2 deletions
wetb/prepost/dlcdefs.py
+
9
−
2
View file @
c02550fd
...
...
@@ -334,7 +334,7 @@ def tags_defaults(master):
def
excel_stabcon
(
proot
,
fext
=
'
xlsx
'
,
pignore
=
None
,
pinclude
=
None
,
sheet
=
0
,
silent
=
False
):
silent
=
False
,
p_source
=
False
):
"""
Read all MS Excel files that hold load case definitions according to
the team STABCON definitions. Save each case in a list according to the
...
...
@@ -368,6 +368,9 @@ def excel_stabcon(proot, fext='xlsx', pignore=None, pinclude=None, sheet=0,
Name or index of the Excel sheet to be considered. By default, the
first sheet (index=0) is taken.
p_source : string, default=False
Returns
-------
...
...
@@ -472,7 +475,11 @@ def excel_stabcon(proot, fext='xlsx', pignore=None, pinclude=None, sheet=0,
# in case there is a controller input file defined
if
'
[controller_tuning_file]
'
in
tags_dict
:
hs2
=
hawcstab2
.
ReadControlTuning
()
hs2
.
read_parameters
(
tags_dict
[
'
[controller_tuning_file]
'
])
# absolute path of the model root containing the tuning file
fpath
=
tags_dict
[
'
[controller_tuning_file]
'
]
if
p_source
:
fpath
=
os
.
path
.
join
(
p_source
,
fpath
)
hs2
.
read_parameters
(
fpath
)
tags_dict
[
'
[pi_gen_reg1.K]
'
]
=
hs2
.
pi_gen_reg1
.
K
tags_dict
[
'
[pi_gen_reg2.Kp]
'
]
=
hs2
.
pi_gen_reg2
.
Kp
tags_dict
[
'
[pi_gen_reg2.Ki]
'
]
=
hs2
.
pi_gen_reg2
.
Ki
...
...
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