-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error handling for repeated variable names (cont.) #181
Comments
originally posted in #164 (comment)
|
I found a new error, that the tests in @system(x' = A*x + B*w, noise:w)
ERROR: ArgumentError: input and noise variables have the same name `w` throws an error because we set the input here if @capture(stripped, (x_ = A_*x_ + B_*u_) |
(x_ = x_ + B_*u_) |
(x_ = A_*x_ + B_*u_ + c_) |
(x_ = x_ + B_*u_ + c_) |
(x_ = f_(x_, u_)) )
input_var = u
end and then here elseif got_input_var && got_noise_var && (input_var == noise_var)
throw(ArgumentError("input and noise variables have the same name `$(input_var)`"))
end it "breaks". All the convenience functions and special cases are taking its toll. |
Summary:Not properly working are:
|
In #164 we added default variable names in
parse_system
and an error message is sent in case of conflict. However, the noise variable is read a posteriori so there is still a possible conflict. As a consequence the following error is a bit cryptic and can be improved:ref: #164 (comment)
An approach suggested here is to make the error checks in
extract_sum
.The text was updated successfully, but these errors were encountered: