-
-
Notifications
You must be signed in to change notification settings - Fork 224
Adding inputs and outputs functions #1209
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
base: master
Are you sure you want to change the base?
Conversation
src/systems/abstractsystem.jl
Outdated
end | ||
|
||
function outputs(sys::AbstractSystem) | ||
[st for st in states(sys) if isoutput(st)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be true. Do you want it to be true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what case would it operate incorrectly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah they could be eliminated to observed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, so should I cat
any states in observed
that are also decorated as outputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then, you cannot calculate the Jacobian.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suppose we have the reduced output as an observed variable x ~ a + b
with the equation D(y) ~ a + sin(a) + b
. What's the derivative of the right hand wrt x ~ a + b
? We cannot differentiate this thing. First, matching a+b
is hard. Second, we don't know if this a + b
is from x
. It could very well be something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with you on the idea that the a+b
needs to be "from" x
, but I see your point nonetheless. Does that have anything to do with it being an output
though? Your argument seems to be valid regardless of that. Right now, don't we just expect people to, for lack of better words, "not do that"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given x
is an output, what's the output Jacobian of
D(y) ~ a + b + x
0 ~ a + b - x
and what's the output Jacobian of
```julia
D(y) ~ 2a + 2b
wrt a+b
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say x
isn't an output though. Isn't this still a problem? I'm failing to see where it being labelled as output=true
comes in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When linearizing control problems, we need to compute the Jacobian wrt the inputs or the outputs.
This adds functions to access inputs and outputs of a system