- Timestamp:
- 08/04/10 16:07:50 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alta/mystic-0.2a1/tutorial_example_constrained.py
r361 r373 27 27 28 28 # Mystic can handle constraints in the form of matrices as well. 29 A= [[-1.0,0.0],[0.0,-1.0]]30 b= [0.0,0.0]31 G= [1.0, 1.0]32 h= [1.0]33 from constraint_tools import matrix_to_symbolic29 G = [[-1.0,0.0],[0.0,-1.0]] 30 h = [0.0,0.0] 31 A = [1.0, 1.0] 32 b = [1.0] 33 from mystic.constraint_tools import matrix_to_symbolic 34 34 constraints_string = matrix_to_symbolic(A=A, b=b, G=G, h=h) 35 35 … … 52 52 53 53 # Let's verify that the constraints actually are satisfied. 54 from constraint_tools import verify_constraints_satisfied54 from mystic.constraint_tools import verify_constraints_satisfied 55 55 print "Are constraints satisfied?" 56 56 print verify_constraints_satisfied(constraints_string, soln, ndim, tol=1e-7)
Note: See TracChangeset
for help on using the changeset viewer.