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

Gradual amplification coefficient change #33

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Gradual amplification coefficient change #33

merged 2 commits into from
Aug 16, 2024

Conversation

JanKuczma
Copy link
Collaborator

Enforce gradual change of A. There are two additional constants that control how the A can be changed:

  • MIN_AMP_DURATION - The minimum period (in milisec) for ramping A. Set to 24h.
  • MAX_AMP_CHANGE - How many times the A can increase or decrease over one ramping period (at least MIN_AMP_DURATION).
    E.g. the current A is 100, and the MAX_A_CHANGE is set to 10. It means the A can be changed to a value in range 10 to 1000 (current_A / MAX_A_CHANGE to current_A * MAX_A_CHANGE).
  • A is also restricted with MIN_A and MAX_A.

@JanKuczma JanKuczma requested a review from woocash2 August 14, 2024 12:33
Copy link
Contributor

@woocash2 woocash2 left a comment

Choose a reason for hiding this comment

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

Looks good.

I only had one concern: whether someone could enforce too fast amp_coef change by repeatedly calling ramp and stop_ramp. But it seems that because amp_delta is rounded down due to division, it can't happen.

@JanKuczma JanKuczma merged commit 270acaa into main Aug 16, 2024
1 check passed
@JanKuczma JanKuczma deleted the amp-change branch August 16, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants