Changeset 831 for mystic/examples2/eq10.py
- Timestamp:
- 09/28/15 20:45:46 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mystic/examples2/eq10.py
r817 r831 41 41 from mystic.symbolic import generate_penalty, generate_conditions 42 42 pf = generate_penalty(generate_conditions(equations)) 43 #from mystic.constraints import as_constraint, discrete44 #cf = as_constraint(pf)43 from mystic.symbolic import generate_constraint, generate_solvers, solve 44 cf = generate_constraint(generate_solvers(solve(equations))) 45 45 46 46 from numpy import round as npround … … 53 53 54 54 #result = diffev2(objective, x0=bounds, bounds=bounds, penalty=pf, npop=20, gtol=50, disp=True, full_output=True) 55 result = diffev2(objective, x0=bounds, bounds=bounds, penalty=pf, constraints=npround, npop=40, gtol=50, disp=True, full_output=True) 55 #result = diffev2(objective, x0=bounds, bounds=bounds, penalty=pf, constraints=npround, npop=40, gtol=50, disp=True, full_output=True) 56 result = diffev2(objective, x0=bounds, bounds=bounds, constraints=cf, npop=4, gtol=1, disp=True, full_output=True) 56 57 57 58 print result[0]
Note: See TracChangeset
for help on using the changeset viewer.