Skip to content

More General Options for Objectives / Constraints in Container Objects#38

Merged
electronsandstuff merged 29 commits intomainfrom
objectives-constraints-options
Jan 26, 2025
Merged

More General Options for Objectives / Constraints in Container Objects#38
electronsandstuff merged 29 commits intomainfrom
objectives-constraints-options

Conversation

@electronsandstuff
Copy link
Owner

@electronsandstuff electronsandstuff commented Jan 23, 2025

This PR allows the container objects to store "non-canonical" optimization data. That is, for problems that are not minimization problems with constraints such that g >= 0 is feasible.

  • New members in Population objects:
    • obj_directions: string where each character represents maximization (+) or minimization (-) for each objective
    • constraint_directions: string where each character represents a constraint satisfied when g is less than the target (<) or greater than the target (>)
    • constraint_targets: numpy array of the target values for constraints
  • Population random generation includes option for randomizing constraint and objective settings
  • Population random generator is updated so that constraints lie in (-0.5, 0.5) instead of (0, 1) which was always feasible.
  • Plotting, file saving reflects new settings
  • The container notebook has been updated with examples on usage of new settings. Population examples were also changed to avoid from_random which doesn't provide the best example for new users to library.
  • New tests for saving and loading previous file format versions. New notebook to save file version checkpoints.
  • New test for feasibility on example individuals

@electronsandstuff electronsandstuff merged commit 140051e into main Jan 26, 2025
2 checks passed
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.

1 participant