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

Population Scale min/max #45

Open
nixpulvis opened this issue Sep 19, 2024 · 1 comment
Open

Population Scale min/max #45

nixpulvis opened this issue Sep 19, 2024 · 1 comment

Comments

@nixpulvis
Copy link
Owner

nixpulvis commented Sep 19, 2024

let pop_avg = if scale_population.0 {
// TODO: This is *very* slow and should be precomputed when the set of systems changes.
set.p0().iter().map(|(_, s)| s.population).sum::<u64>()
/ set.p0().iter().len() as u64

if scale_population.0 {
let pop_factor = system.population as f32 / pop_avg as f32;
scale *= 0.2 * pop_factor.ln();
}

@nixpulvis
Copy link
Owner Author

The current population scaling is backwards 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant