Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
[0.5.0] - 2021-07-12¶
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 Linkageinstead offrom pylinkage.linkage import Linkage.Each module had his header improved.
The
generate_boundsfunctions is a simple way to generate bounds before optimization.The
order_relationarguments ofparticle_swarm_optimizationandtrials_and_errors_optimizationlet you choose between maximization and minimization problem.You can specify a custom order relation with
trials_and_errors_optimization.The
verboseargument in optimizers can disable verbosity.Staticjoints can now be defined implicitely.The
utilitymodule provides two useful decaratorskinematic_minimizationandkinematic_optimizatino. They greatly simplify the workflow of defining fitness functions.
Changed¶
The
particle_swarm_optimizationeval_funcsignature is now similar to the one ottrials_and_errorsoptimization. Wrappers are no longer needed!The
trials_and_errors_optimizationfunction now asks for bounds instead of dilatation and compression factors.In
trials_and_errors_optimizationabsolute stepdelta_dimis now replaced by number of subdivisionsdivisions.
Fixed¶
After many hours of computations, default parameters in
particle_swarm_optimizationare much more efficient. With the demofourbar_linkage, the output wasn’t even convergent some times. Now we have a high convergence rate (~100%), and results equivalent to thetrials_and_errors_optimization(in the example).variatorfunction ofoptimizermodule was poorly working.The docstrings were not displayed properly in documentation, this is fixed.
[0.4.1] - 2021-07-11¶
Added¶
The legend in
visualizer.pyis back!Documentation published to GitHub pages! It is contained in the
docs/folder.setup.cfgnow include links to the website.
Changed¶
Examples moved from
pylinkage/examples/todocs/examples/.Tests moved from
pylinkage/tests/totests/.
[0.4.0] - 2021-07-06¶
Added¶
The
bounding_boxmethod of geometry allow to compute the bounding box of a finite set of 2D points.You can now customize colors of linkage’s bars with the
COLOR_SWITCHERvariable ofvisualizer.py.movement_bounding_boxinvisualizer.pyto get the bounding box of multiple loci.parametersis optional intrials_and_errors_optimization(formerexhaustive_optimization)pylinkage/tests/test_optimizer.pyfor testing the optimizers, but it is a bit ugly as for now.Flake8 validation in
tox.ini
Fixed¶
set_num_constraintsinLinkagewas misbehaving due to update 0.3.0.Cost history is no longer plotted automatically after a PSO.
Changed¶
exhaustive_optimizationis now known astrials_and_errors_optimizattion.Axis on linkage visualization are now named “x” and “y”, and no longer “Points abcsices” and “Ordinates”.
A default view of the linkage is displayed in
plot_static_linkage.Default padding in linkage representation was changed from an absolute value of 0.5 to a relative 20%.
Static view of linkage is now aligned with its kinematic one.
get_posmethod ofLinkageis now known asget_coordsfor consistency.Parameters renamed, reorganized and removed in
particle_swarm_optimizationto align to PySwarms.README.mdupdated consequently to the changes.
Removed¶
Legacy built-in Particle Swarm Optimization, to avoid confusions.
We do no longer show a default legend on static representation.
[0.3.0] - 2021-07-05¶
Added¶
Jointobjects now have aget_constraintsmethod, consistent with theirset_constraintsone.Linkagenow has aget_num_constraintsmethod as synctactic sugar.Code vulnerabilities checker
Walktrough example has been expanded and now seems to be complete.
Changed¶
Linkage’s methodset_num_constraintsbehaviour changed! You should now addflat=Falseto come back to the previous behaviour.pylinkage/examples/fourbar_linkage.pyexpanded and finished.The
beginparameter ofarticle_swarm_optimizationis no longer mandatory.linkage.get_num_constraints()will be used ifbeginis not provided.More flexible package version in
environment.ymlOutput file name now is now formatted as “Kinematic {linkage.name}” in
plot_kinematic_linkagefunction ofpylinkage/visualizer.pyPython 3.6 is no longer tested in
tox.ini. Python 3.9 is now tested.
Fixed¶
When linkage animation was saved, last frames were often missing in
pylinkage/visualizer.py, functionplot_kinematic_linkage.
[0.2.2] - 2021-06-22¶
Added¶
More continuous integrations workflows for multiple Python versions.
Fixed¶
README.mdcould not be seen in PyPi.Various types
[0.2.1] - 2021-06-16¶
Added¶
swarm_tiled_reprfunction forpylinkage/visualizer.py, for vizualisation of PySwarms.EXPERIMENTAL!
hyperstaticitymethodLinkage’s hyperstaticity calculation.
Changed¶
pylinkage/exception.pynow handles exceptions in another file.Documentation improvements.
Python style improvements.
.gitignorenow modifed from the standard GitHub gitignore example for Python.
Fixed¶
circlemethod ofPivotinpylinkage/linkage.py. was causing errorstox.ininow fixed.
[0.2.0] - 2021-06-14¶
Added¶
pylinkage/vizualizer.pyview your linkages using matplotlib!Issue templates in
.github/ISSUE_TEMPLATE/.github/workflows/python-package-conda.yml: conda tests with unittest workflowCODE_OF_CONDUCT.mdMANIFEST.inREADME.mdenvironment.ymlsetup.cfgnow replacessetup.pytox.iniCHANGELOG.md
Changed¶
.gitignorePython Package specific extensions addedMIT License→LICENSElib/→pylinkage/tests/→pylinkage/tests/Revamped package organization.
Cleared
setup.py
[0.0.1] - 2021-06-12¶
Added¶
lib/geometry.pyas a mathematical for kinematic optimizationlib/linkage.py, linkage builderlib/optimizer.py, with Particle Swarm Optimization (built-in and PySwarms), and exhaustiveMIT Licenserequirements.txtsetup.pytests/__init__.pytests/test_geometry.pytests/test_linkage.py.gitignore