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

Better Structure Restricted Derivatives #196

Open
pulsipher opened this issue Jan 6, 2022 · 0 comments
Open

Better Structure Restricted Derivatives #196

pulsipher opened this issue Jan 6, 2022 · 0 comments
Labels
enhancement New feature or request simplification Simplify the underlying complexity
Milestone

Comments

@pulsipher
Copy link
Collaborator

pulsipher commented Jan 6, 2022

Currently, we provide 2 different ways to define derivatives over restricted domains.

model = InfiniteModel()
@infinite_parameter(model, t in [0, 1])
@infinite_parameter(model, x in [-1, 1])
@variable(model, y, Infinite(t, x))

dy1 = deriv(y, x)(0, x) # option 1
dy2 = deriv(y(0, x), x) # option 2

Here dy1 and dy2 are equivalent mathematically. However, programmatically dy1 is a restricted derivative and dy2 is a derivative of a restricted variable. We should choose one or the other to be created behind the scenes such that transformation techniques don't have to worry about both.

Note that this equivalence is not true if the restriction and derivative use the same infinite parameter:

dy3 = deriv(y, t)(0, x) # time derivative evaluated at t=0
dy4 = deriv(y(0, x), t) # time derivative of time restricted y(0, x) --> 0

So in this particular context, the transformation technique will only have to worry about dy3 since dy4 = 0.0.

Hence, it probably makes the most sense to only use restrictions of derivatives behind the scenes, since that covers both cases. So we would only have to worry about restricted derivatives (not derivatives of restrictions).

@pulsipher pulsipher added enhancement New feature or request simplification Simplify the underlying complexity labels Jan 6, 2022
@pulsipher pulsipher added this to the v0.6 milestone Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request simplification Simplify the underlying complexity
Projects
None yet
Development

No branches or pull requests

1 participant