Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tooling
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FOCUS
Tooling
Commits
02899a00
Commit
02899a00
authored
1 year ago
by
Christoph von Oy
Browse files
Options
Downloads
Patches
Plain Diff
Removed Profile class
parent
21d8e2a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dynamics/Dynamic.py
+0
-13
0 additions, 13 deletions
dynamics/Dynamic.py
input_profile_processor/input_profile_processor.py
+1
-3
1 addition, 3 deletions
input_profile_processor/input_profile_processor.py
with
1 addition
and
16 deletions
dynamics/Dynamic.py
+
0
−
13
View file @
02899a00
...
@@ -338,19 +338,6 @@ class PartialDynamic(Dynamic):
...
@@ -338,19 +338,6 @@ class PartialDynamic(Dynamic):
raise
IndexError
(
"
The dynamic does not have all requested indices for the sub dynamic!
"
)
raise
IndexError
(
"
The dynamic does not have all requested indices for the sub dynamic!
"
)
return
PartialDynamic
(
self
.
reference
,
reference_start
,
reference_end
)
return
PartialDynamic
(
self
.
reference
,
reference_start
,
reference_end
)
class
Profile
:
def
__init__
(
self
,
values
,
dynamic
):
self
.
values
=
values
self
.
dynamic
=
dynamic
# returns a profile resampled to the given dynamic
def
resample
(
self
,
target_dynamic
):
return
Profile
(
resample
(
self
.
values
,
self
.
dynamic
,
target_dynamic
),
target_dynamic
)
# return values resampled to the given dynamic
def
resample_values
(
self
,
target_dynamic
):
return
resample
(
self
.
values
,
self
.
dynamic
,
target_dynamic
)
# only works if both dynamics share the same root dynamic
# only works if both dynamics share the same root dynamic
def
resample
(
values
,
dynamic
,
target_dynamic
):
def
resample
(
values
,
dynamic
,
target_dynamic
):
if
dynamic
.
root
()
!=
target_dynamic
.
root
():
if
dynamic
.
root
()
!=
target_dynamic
.
root
():
...
...
This diff is collapsed.
Click to expand it.
input_profile_processor/input_profile_processor.py
+
1
−
3
View file @
02899a00
...
@@ -28,8 +28,6 @@ from Tooling.demand_generator.electrical_demand.ElectricalDemand import Electric
...
@@ -28,8 +28,6 @@ from Tooling.demand_generator.electrical_demand.ElectricalDemand import Electric
from
Tooling.demand_generator.thermal_demand.ThermalDemand
import
ThermalDemand
from
Tooling.demand_generator.thermal_demand.ThermalDemand
import
ThermalDemand
from
Tooling.input_profile_processor.calc_irradiance
import
generate_g_t_series
from
Tooling.input_profile_processor.calc_irradiance
import
generate_g_t_series
from
Tooling.modifier
import
Modifier
from
Tooling.modifier
import
Modifier
from
Tooling.dynamics.Dynamic
import
Profile
def
process_input_profiles
(
input_profile_dict
,
t_start
,
dynamic
):
def
process_input_profiles
(
input_profile_dict
,
t_start
,
dynamic
):
d_step_min
=
min
(
dynamic
.
step_size_p
(
position
)
for
position
in
range
(
dynamic
.
number_of_steps
()))
d_step_min
=
min
(
dynamic
.
step_size_p
(
position
)
for
position
in
range
(
dynamic
.
number_of_steps
()))
...
@@ -75,7 +73,7 @@ def process_input_profiles(input_profile_dict, t_start, dynamic):
...
@@ -75,7 +73,7 @@ def process_input_profiles(input_profile_dict, t_start, dynamic):
input_profile
=
input_profile
.
squeeze
()
input_profile
=
input_profile
.
squeeze
()
input_profile
.
set_axis
(
list
(
range
(
dynamic
.
number_of_steps
())),
inplace
=
True
)
input_profile
.
set_axis
(
list
(
range
(
dynamic
.
number_of_steps
())),
inplace
=
True
)
input_profiles
[
input_profile_name
]
=
Profile
(
input_profile
,
dynamic
)
input_profiles
[
input_profile_name
]
=
(
input_profile
,
dynamic
)
return
input_profiles
return
input_profiles
def
resample_profile
(
name
,
profile
,
t_start
,
dynamic
,
d_step_min
,
t_last
):
def
resample_profile
(
name
,
profile
,
t_start
,
dynamic
,
d_step_min
,
t_last
):
...
...
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