tests.optimization package
Submodules
tests.optimization.test_optimizer module
- class tests.optimization.test_optimizer.TestEvaluation(methodName='runTest')
Bases:
TestCase
Test if a linkage can properly be evaluated.
- constraints = (3, 1)
- linkage = <pylinkage.linkage.linkage.Linkage object>
- test_score()
Test if score is well returned.
- class tests.optimization.test_optimizer.TestGenerateBounds(methodName='runTest')
Bases:
TestCase
Test various things about the generate_bounds function.
- test_function()
Test is the function runs simply.
- class tests.optimization.test_optimizer.TestPSO(methodName='runTest')
Bases:
TestCase
Test the particle swarm optimization.
- constraints = (3, 1)
- linkage = <pylinkage.linkage.linkage.Linkage object>
- test_convergence()
Test if the result is not too far from 0.0.
- class tests.optimization.test_optimizer.TestTrialsAndErrors(methodName='runTest')
Bases:
TestCase
Tests for the trials and errors optimization.
- linkage = <pylinkage.linkage.linkage.Linkage object>
- test_convergence()
Test if the output after some iterations is improved.
- class tests.optimization.test_optimizer.TestVariator(methodName='runTest')
Bases:
TestCase
Test case for the variation creators.
- test_length()
Test that the length is about the number of subdivisions.
- tests.optimization.test_optimizer.prepare_linkage()
Simple four-bar linkage.
- Returns:
A four-bar linkage
- Return type:
pylinkage.Linkage