This release is a huge effort to make pylinkage better!
It features abstract Joint
, the new Linear
joint, and the package structure was rewritten to make contributions easier.
Added
- New joint: the
Linear
joint! - New sub-package: optimization.collections.
optimization.collections.Agent
andoptimization.collections.MutableAgent
are two new classes that should standardize the format of
optimization, related to (#5).Agent
is immutable and inherits from a namedtuple. It is recommended to use it, as it is a bit faster.MutableAgent
is mutable. It may be deprecated/removed ifAgent
is satisfactory.
- New sub-package: geometry.
- It introduces two new functions
line_from_points
andcircle_line_intersection
.
- It introduces two new functions
- New examples:
examples/strider.py
from HugoFara/leggedsnake,
based on the Strider Linkage.examples/inverted_stroke_engine.py
is a demo of a four-stroke engine featuring a Linear joint.
Linkage.set_completely
is a new method combining bothLinkage.set_num_constraints
andLinkage.set_coords
.- New exception
NotCompletelyDefinedError
, when a joint is reloading but its anchor coordinates are set to None. - Some run configuration files added for users of PyCharm:
- Run all tests with "All Tests".
- Regenerate documentation with "Sphinx Documentation".
Changed
- Optimization return type changed (#5):
trials_and_error_optimization
return an array ofMutableAgent
.particle_swarm_optimization
return an array of oneAgent
.- It should not be a breaking change for most users.
- Changes to the "history" style.
- It is no longer a global variable in example scripts.
- It was in format iterations[dimensions, score], now it is a standard iterations[score, dimensions, initial pos].
repr_polar_swarm
(in example scripts) changed to follow the new format.swarm_tiled_repr
takes (index, swarm) as input argument. swarm is (score, dim, pos) for each agent for this
iteration.
repr_polar_swarm
reload frame only when a new buildable linkage is generated.- This makes the display much faster.
- For each iteration, you may see linkages that do not exist anymore.
- Folders reorganization:
- The
geometry
module is now a package (pylinkage/geometry
) - New package
pylinkage/linkage
:pylinkage/linkage.py
separated and inserted in this package.
- New package:
pylinkage/joints
- Joints definition are in respective files.
- New package
pylinkage/optimization/
pylinkage/optimizer.py
split and inserted in.- Trials-and-errors related functions goes to
grid_search.py
. - Particle swarm optimization is at
particle_swarm.py
. - New file
utils.py
forgenerate_bounds
.
- Tests follow the same renaming.
- From the user perspective, no change (execution may be a bit faster)
source/
renamed tosphinx/
because it was confusing and only for Sphinx configuration.
- The
- Transition from Numpydoc to reST for docstrings (#12).
__secant_circles_intersections__
renamed to
secant_circles_intersections
(inpylinkage/geometry/secants.py
).
Fixed
swarm_tiled_repr
invisualizer.py
was wrongly assigning dimensions.- Setting
locus_highlight
inplot_static_linkage
would result in an error. Pivot.reload
was returning arbitrary point when we had an infinity of solutions.- The highlighted locus was sometimes buggy in
plot_static_linkage
in
visualizer.py
.
Deprecated
- Using
tqdm_verbosity
is deprecated in favor of usingdisable=True
in a tqdm object. - The
Pivot
class is deprecated in favor of theRevolute
class.
The name "Pivot joint" is not standard.
Related to #13. - The
hyperstaticity
method is renamedindeterminacy
inLinkage
(linkage.py)
Removed
- Drops support for Python 3.7 and 3.8 as both versions reached end-of-life.
movement_bounding_bow
is replaced bymovement_bounding_box
(typo in function name).