Skip to content

Comments

Reorganization and introducing Plant as a type#91

Merged
anchal-physics merged 3 commits intomasterfrom
plant
Jul 22, 2025
Merged

Reorganization and introducing Plant as a type#91
anchal-physics merged 3 commits intomasterfrom
plant

Conversation

@anchal-physics
Copy link
Collaborator

Releasing v2.2.2

Plant is now an Abstract Type just like Actuators and Controllers. It
will also be callable and should hold any input conditioning inside it.

The InputConditioning is provided as an Abstract Type also and now
system_id and system_id_optimal_inp_cond both return a Plant object
directly.

PVLC and MPC have been updated.

Plant is now an Abstract Type just like Actuators and Controllers. It
will also be callable and should hold any input conditioning inside it.

The InputConditioning is provided as an Abstract Type also and now
system_id and system_id_optimal_inp_cond both return a Plant object
directly.

Note that plant now holds the state of the plant, so it should be used
carefully.

model_evolve will use a deepcopy of passed plant object so that it
doesn't affect the state of the plant.
actuators.jl

- Fixed DelayedActuator so that it works for zero delay also.

controllers.jl

- PVLC and MPC now are limited to LinearPlant as they use `state_prediction_matrices`.
- Both PVLC and MPC now do `offset_scale` before using `state_prediction_matrices`.
- MPC has options of guess and curve_fit_kwargs now.
- run_closed_loop_sim does deepcopy on plant, act, and ctrl inside now, so it runs a on a copy of the models.

system_id.jl

- Added curve_fit_kwargs now
Plant is now an Abstract type with input conditioning being a type as
well. PVLC and MPC have been upgraded accordingly. This makes the
architecture more consistent.
@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 91.91176% with 11 lines in your changes missing coverage. Please review.

Project coverage is 87.21%. Comparing base (fc9f53f) to head (5969db6).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/actuators.jl 86.20% 4 Missing ⚠️
src/plant.jl 80.00% 4 Missing ⚠️
src/controllers.jl 95.00% 2 Missing ⚠️
src/system_id.jl 97.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
- Coverage   87.37%   87.21%   -0.17%     
==========================================
  Files           6        9       +3     
  Lines         935      970      +35     
==========================================
+ Hits          817      846      +29     
- Misses        118      124       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anchal-physics anchal-physics merged commit d67029b into master Jul 22, 2025
6 checks passed
@eldond eldond deleted the plant branch July 23, 2025 19:34
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.

1 participant