Skip to content

ENH: Simple Initial Solution #230

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

Conversation

giovaniceotto
Copy link
Member

Pull request type

Please check the type of change your PR introduces:

  • Code base additions (bugfix, features)
  • Code maintenance (refactoring, formatting, renaming, tests)
  • ReadMe, Docs and GitHub maintenance
  • Other (please describe):

Pull request checklist

Please check if your PR fulfills the following requirements, depending on the type of PR:

  • Code base additions (for bug fixes / features):

    • Tests for the changes have been added
    • Docs have been reviewed and added / updated if needed
    • Lint (black rocketpy) has passed locally and any fixes were made
    • All tests (pytest --runslow) have passed locally

What is the current behavior?

Using the initialSolution argument of the Flight class is quite inconvenient, specially when you retrieve from a previous Flight instance. The argument only supports an array as input.

What is the new behavior?

Flight instances can now be used as input to the initialSolution argument of the Flight class.

Does this introduce a breaking change?

  • Yes
  • No

Other information

One option that we have is: should we initialize the solution monitors by copying the data from the Flight instance submited in the initialSolution argument? If we do this, the resulting Flight will have trajectory data from both Flights. Is this a convinience or an inconvience?

@giovaniceotto giovaniceotto changed the title Eng/complex_simulations/simple_initial_solution ENH: Simple Initial Solution Sep 14, 2022
@giovaniceotto giovaniceotto self-assigned this Sep 14, 2022
@giovaniceotto giovaniceotto added this to the RocketPy at EuroC 2022 milestone Sep 14, 2022
@giovaniceotto giovaniceotto added the Enhancement New feature or request, including adjustments in current codes label Sep 14, 2022
@Gui-FernandesBR
Copy link
Member

One option that we have is: should we initialize the solution monitors by copying the data from the Flight instance submited in the initialSolution argument? If we do this, the resulting Flight will have trajectory data from both Flights. Is this a convinience or an inconvience?

Both options of anwser can be right. I mean, there will be moments where the user wants to copy data from previous flight, but also there will be moments qhere you want to start a totally new flight. Should we be flexible? that old mergeFlights idea doesn't sound weird here.

Another question: Would be good idea allowing the user to set the time where to get the initial solution state? I mean, is that for sure that the last state vector is always the best vector to be used in the initialization of a second flight?

All in all, just have to say thank you for this PR, @giovaniceotto , this will definitely improve our development!

@MateusStano
Copy link
Member

I like what @Gui-FernandesBR said! I also think having at least one test would be really important for this one since some changes in flight could make for some extreme initial conditions act weirdly. For now though seems to be a really good implementation

@giovaniceotto
Copy link
Member Author

Thanks for the reviews. I will make some quick updats to the implementation considering the feedback.

I agree that tests are needed. I will add a couple of them.

1 similar comment
@giovaniceotto
Copy link
Member Author

Thanks for the reviews. I will make some quick updats to the implementation considering the feedback.

I agree that tests are needed. I will add a couple of them.

@Gui-FernandesBR
Copy link
Member

@giovaniceotto please just write down what tasks you have in mind and we can separate ourselves to tackle everything together if this is faster

@Gui-FernandesBR Gui-FernandesBR added the Outputs Dedicated to visualizations enhancements like prints and plots label Sep 21, 2022
@Gui-FernandesBR
Copy link
Member

Thanks for the reviews. I will make some quick updats to the implementation considering the feedback.

I agree that tests are needed. I will add a couple of them.

Hey @giovaniceotto really sorry for that, but I need to move forward today with the "complex simulations" development. We might be using the codes from this PR with current state.
You can add your ideas as TODOs and this is going to be already good, better than coding.

Gui-FernandesBR and others added 2 commits September 24, 2022 13:52
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, tks

@Gui-FernandesBR Gui-FernandesBR merged commit e781509 into enh/complex_simulations Sep 27, 2022
@Gui-FernandesBR Gui-FernandesBR deleted the eng/complex_simulations/simple_initial_solution branch November 3, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes Outputs Dedicated to visualizations enhancements like prints and plots
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants