- Timestamp:
- 08/04/10 16:07:50 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alta/mystic-0.2a1/test_constraints_cvxopt_qp_allsolvers.py
r361 r373 232 232 # Additional parameters 233 233 ndim = 2 # Number of variables in the x vector. 234 x0 = [0.5, 0.5] # Infeasible initial point is ok! 235 #x0 = [0.8, 0.3] 236 #x0 = [1., 1.] 234 #x0 = [0.5, 0.5] # Feasible 235 #x0 = [0.8, 0.3] # Infeasible 236 x0 = [1., 1.] # Infeasible 237 237 npop = 25 # Required for differential evolution solver 238 238 … … 589 589 from scipy_bfgs import BFGSSolver 590 590 from mystic.termination import VTR 591 from mystic.termination import GradientTermination 592 from mystic.termination import ChangeOverGeneration as COG 591 593 solver = BFGSSolver(ndim) 592 594 593 595 solver.SetInitialPoints(x0) 594 596 solver.enable_signal_handler() 595 term = VTR() 597 term = VTR() # works well 598 #term = GradientTermination() # works well 599 #term= COG() # works well 596 600 solver.Solve(costfunc, term, constraints=constraints_string, \ 597 601 constraints_method='auglag') … … 619 623 from scipy_ncg import NCGSolver 620 624 from mystic.termination import VTR 625 from mystic.termination import SolutionImprovement 626 from mystic.termination import ChangeOverGeneration as COG 621 627 solver = NCGSolver(ndim) 622 628 623 629 solver.SetInitialPoints(x0) 624 630 solver.enable_signal_handler() 625 term = VTR() 626 solver.Solve(costfunc, term, constraints=constraints_string, \ 627 constraints_method='auglag') 631 term = VTR() # very slow with [0.8, 0.3] 632 #term = SolutionImprovement() # very slow with [0.8, 0.3] 633 #term = COG() # very slow with [0.8, 0.3] 634 solver.Solve(costfunc, term, constraints=constraints_string, \ 635 constraints_method='auglag', disp=True) 628 636 soln = solver.Solution() 629 637 … … 1135 1143 test_powelldirectional_auglag() 1136 1144 test_bfgs_auglag() 1137 test_ncg_auglag() # little off. gets stuck with x0=[0.8, 0.3] 1145 test_ncg_auglag() # very slow, esp. in the first SUMT iteration. probably 1146 # relies on the hack to not get completely stuck. 1138 1147 test_cg_auglag() 1139 1148
Note: See TracChangeset
for help on using the changeset viewer.