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

Allow Optimization of two equilibria simultaneously #1570

Open
1 of 2 tasks
dpanici opened this issue Feb 5, 2025 · 0 comments
Open
1 of 2 tasks

Allow Optimization of two equilibria simultaneously #1570

dpanici opened this issue Feb 5, 2025 · 0 comments
Labels
P3 Highest Priority, someone is/should be actively working on this

Comments

@dpanici
Copy link
Collaborator

dpanici commented Feb 5, 2025

This is interesting for the cases of "flexible" stellarators where maybe one wants to optimize multiple stellarators with some common criteria, say, to be able to be created with a single coilset geometry (this last part is allowed by #1320 ). What this issue is focusing on is the areas in optimizer.py where we are assuming we only have a single Equilibrium in things and what should be changed to allow multiple without bugs

  • When we add the self-consistency constraints in _maybe_add_self_consistency, we only check if the constraint exists at all, we don't check if the constraint exists for the specific eq that was passed into the _maybe_add_self_consistency. We would just need to add a check for if the constraint exists, check that its things[0] is equal to the thing passed in, and if not, add the consistency constraint again. Change maybe_add_self_consistency to account for multiple objects of same type #1571

If above are done, then lsq-auglag and any of the other non-proximal optimizers should work with multiple equilibria

Proximal does not currently work with multiple equilibria, that also would need to be changed, I have not looked into what exactly the changes are yet but below are som:

  • with copy=True and proximal optimizers, internally that is only setup to work with one equilibrium (it just grabs the params of the first Equilibrium in things and then sets the original object's params to that equilibrium's params to avoid modifying the original object). This will cause wrong behavior with the proximal optimizers
@dpanici dpanici added the P3 Highest Priority, someone is/should be actively working on this label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Highest Priority, someone is/should be actively working on this
Projects
None yet
Development

No branches or pull requests

1 participant