mailr20383 - /branches/relax_disp/specific_analyses/relax_disp/parameters.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 18, 2013 - 11:56:
Author: bugman
Date: Thu Jul 18 11:56:58 2013
New Revision: 20383

URL: http://svn.gna.org/viewcvs/relax?rev=20383&view=rev
Log:
Added an upper constraint of 2e6 rad/s for the kex dispersion parameter.

This is to prevent slow optimisation to values in the order of 1e20 for 
models which fail.


Modified:
    branches/relax_disp/specific_analyses/relax_disp/parameters.py

Modified: branches/relax_disp/specific_analyses/relax_disp/parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/parameters.py?rev=20383&r1=20382&r2=20383&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/parameters.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/parameters.py Thu Jul 18 
11:56:58 2013
@@ -255,7 +255,7 @@
         phi_ex >= 0
         padw2 >= 0
         dw >= 0
-        kex >= 0
+        0 <= kex <= 2e6
         tex >= 0
         kA >= 0
 
@@ -290,6 +290,8 @@
         | 1  0  0 |     |   dw   |      |    0    |
         |         |     |        |      |         |
         | 1  0  0 |     |  kex   |      |    0    |
+        |         |     |        |      |         |
+        |-1  0  0 |     |  kex   |      |  -2e6   |
         |         |     |        |      |         |
         | 1  0  0 |     |  tex   |      |    0    |
         |         |     |        |      |         |
@@ -374,8 +376,18 @@
                 b.append(0.5 / scaling_matrix[param_index, param_index])
                 j += 1
 
-        # Exchange rates and times (k >= 0 and t >= 0).
-        elif param_name in ['kex', 'ka', 'tex']:
+        # Exchange rates and times (0 <= k <= 2e6).
+        elif param_name in ['kex', 'ka']:
+            A.append(zero_array * 0.0)
+            A.append(zero_array * 0.0)
+            A[j][param_index] = 1.0
+            A[j+1][param_index] = -1.0
+            b.append(0.0)
+            b.append(-2e6 / scaling_matrix[param_index, param_index])
+            j += 2
+
+        # Exchange times (k >= 0 and t >= 0).
+        elif param_name in ['tex']:
             A.append(zero_array * 0.0)
             A[j][param_index] = 1.0
             b.append(0.0)




Related Messages


Powered by MHonArc, Updated Thu Jul 18 12:40:02 2013