Skip to content

Optimized optimizers, simplified workflow

Compare
Choose a tag to compare
@HugoFara HugoFara released this 12 Jul 11:36
· 131 commits to main since this release

End alpha development! The package is now robust enough to be used by a mere human. This version introduces a lot of changes and simplifications, so everything is not perfect yet, but it is complete enough to be considered a beta version.

Git tags will no longer receive a "-alpha" mention.

Added

  • It is now possible and advised to import useful functions from pylinkage.{object}, without full path. For instance, use from pylinkage import Linkage instead of from pylinkage.linkage import Linkage.
  • Each module had his header improved.
  • The generate_bounds functions is a simple way to generate bounds before optimization.
  • The order_relation arguments of particle_swarm_optimization and trials_and_errors_optimization let you choose between maximization and minimization problem.
  • You can specify a custom order relation with trials_and_errors_optimization.
  • The verbose argument in optimizers can disable verbosity.
  • Static joints can now be defined implicitely.
  • The utility module provides two useful decarators kinematic_minimization and kinematic_optimizatino. They greatly simplify the workflow of defining fitness functions.
  • Versionning is now done thanks to bump2version.

Changed

  • The particle_swarm_optimization eval_func signature is now similar to the one of trials_and_errors optimization. Wrappers are no longer needed!
  • The trials_and_errors_optimization function now asks for bounds instead of dilatation and compression factors.
  • In trials_and_errors_optimization absolute step delta_dim is now replaced by number of subdivisions divisions.

Fixed

  • After many hours of computations, default parameters in particle_swarm_optimization are much more efficient. With the demo fourbar_linkage, the output wasn't even convergent some times. Now we have a high convergence rate (~100%), and results equivalent to the trials_and_errors_optimization (in the example).
  • variator function of optimizer module was poorly working.
  • The docstrings were not displayed properly in documentation, this is fixed.