Skip to content

Input component and Hydraulic changes #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 1, 2023
Merged

Input component and Hydraulic changes #163

merged 16 commits into from
May 1, 2023

Conversation

bradcarman
Copy link
Contributor

  • Input component that can now properly drive models from data. See: input component tutorial for more information
  • Hydraulic/IsothermalCompressible now exports Tube instead of Pipe so as to not conflict with Base.Pipe
  • Added Actuator component to Hydraulic library

@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Merging #163 (7ca521c) into main (87b07ad) will decrease coverage by 0.62%.
The diff coverage is 51.62%.

@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
- Coverage   60.23%   59.61%   -0.62%     
==========================================
  Files          40       41       +1     
  Lines        1818     2028     +210     
==========================================
+ Hits         1095     1209     +114     
- Misses        723      819      +96     
Impacted Files Coverage Δ
src/Hydraulic/IsothermalCompressible/components.jl 44.17% <32.35%> (-10.61%) ⬇️
src/Hydraulic/IsothermalCompressible/utils.jl 59.18% <33.33%> (-13.04%) ⬇️
src/Mechanical/Translational/sources.jl 73.33% <70.00%> (-10.00%) ⬇️
src/Blocks/sources.jl 79.38% <74.11%> (-4.11%) ⬇️
src/Mechanical/TranslationalPosition/sources.jl 83.33% <100.00%> (ø)

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@YingboMa YingboMa merged commit c686f68 into main May 1, 2023
@YingboMa YingboMa deleted the bgc/input branch May 1, 2023 19:31
Copy link
Contributor

@baggepinnen baggepinnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not completely clear to me what kind of input data this new Input component can handle, does the data have to be equidistantly sampled? I think the name Input might be slightly unfortunate since

  1. input is a keyword in modelica with a completely different meaning. We have a similar metadata field in MTK [input = true] which also has a different semantic meaning.
  2. The functionality behind the Input component appears to be limited to sampled data inputs only, and the sample rate must be equidistant? SampledDataInput may be a more descriptive name.

Comment on lines +497 to +502
if T isa Float16
return NaN16
elseif T isa Float32
return NaN32
elseif T isa Float64
return NaN64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T(NaN)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants