Skip to content
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

Add resetmap getter #25

Merged
merged 3 commits into from
Feb 9, 2019
Merged

Add resetmap getter #25

merged 3 commits into from
Feb 9, 2019

Conversation

mforets
Copy link
Collaborator

@mforets mforets commented Feb 9, 2019

This is a rework of #22.

Note that i added the type annotation R<:AbstractMap in HybridSystem. The motivation is that if we are going to let assignment be the function, then it cannot be Union{AbstractDiscreteSystem, AbstractMap} as implied in the previous doc, because the discrete systems do not have an "apply" method.

If you're not convinced i can revert it, letting assignment work only when:

assignment(hs::HybridSystem{A, S, R, W}, t) where {A, S<:AbstractSystem, R<:AbstractMap, W} = ...

I also added the type annotation S<:AbstractSystem in HybridSystem. Becaue we have methods such as inputset, statedim and so on that make sense if the vector of modes are systems.

@mforets
Copy link
Collaborator Author

mforets commented Feb 9, 2019

Note that i added the type annotation R<:AbstractMap in HybridSystem.
I also added the type annotation S<:AbstractSystem in HybridSystem.

I take back these. Since they are not strictly needed for this PR, for now let's just make assignment work for maps.

@schillic
Copy link
Collaborator

schillic commented Feb 9, 2019

See my comment here.

@codecov
Copy link

codecov bot commented Feb 9, 2019

Codecov Report

Merging #25 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #25   +/-   ##
=======================================
  Coverage   81.36%   81.36%           
=======================================
  Files           6        6           
  Lines         161      161           
=======================================
  Hits          131      131           
  Misses         30       30
Impacted Files Coverage Δ
src/HybridSystems.jl 73.33% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6ac0b6...6d43466. Read the comment docs.

src/HybridSystems.jl Outdated Show resolved Hide resolved
@mforets
Copy link
Collaborator Author

mforets commented Feb 9, 2019

Ready. Waiting for review.

@blegat blegat merged commit ce9996e into master Feb 9, 2019
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