Index: park-1.2.1/park/parameter.py
===================================================================
--- park-1.2.1/park/parameter.py	(revision 3570545bb48d1a639dd12458e3c717368477e67b)
+++ park-1.2.1/park/parameter.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
@@ -15,4 +15,5 @@
 __all__ = ['Parameter', 'ParameterSet']
 
+import math
 import numpy
 import expression        
@@ -162,6 +163,6 @@
         """
         range = ['.']*10
-        lo,hi = p.range
-        portion = (p.value-lo)/(hi-lo)
+        lo,hi = self.range
+        portion = (self.value-lo)/(hi-lo)
         if portion < 0: portion = 0.
         elif portion >= 1: portion = 0.99999999
@@ -169,5 +170,5 @@
         range[bar] = '|'
         range = "".join(range)
-        return "%25s %s %g in [%g,%g]"  % (p.name,range,p.value,lo,hi)
+        return "%25s %s %g in [%g,%g]"  % (self.name,range,self.value,lo,hi)
 
     def isfitted(self): return self.status == 'fitted'
@@ -273,8 +274,10 @@
         for p in self:
             if parts[1] == p.name:
-                if len(pars) == 2:
+                if len(parts) == 2:
                     return p
                 elif isinstance(p, ParameterSet):
                     return p._byname(parts[1:])
+                else:
+                    raise
         return None
 
@@ -283,5 +286,5 @@
         parts = name.split('.')
         if parts[0] == self.name:
-            p =  _byname(self, name.split('.'))
+            p =  self._byname(name.split('.'))
             if p: return p
         raise KeyError("parameter %s not in parameter set"%name)
Index: src/sans/fit/AbstractFitEngine.py
===================================================================
--- src/sans/fit/AbstractFitEngine.py	(revision 95d58d3a800344be2703a5e297ab0e7b153c6309)
+++ src/sans/fit/AbstractFitEngine.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
@@ -428,14 +428,6 @@
 
         sasmodel = model.model
-        if len(constraints) > 0:
-            for constraint in constraints:
-                name, value = constraint
-                try:
-                    model.parameterset[str(name)].set(str(value))
-                except:
-                    msg = "Fit Engine: Error occurs when setting the constraint"
-                    msg += " %s for parameter %s " % (value, name)
-                    raise ValueError, msg
-                
+        model.constraints = constraints
+
         if len(pars) > 0:
             temp = []
@@ -610,5 +602,4 @@
     def __init__(self, model=None, param_list=None, data=None):
         self.calls = None
-        self.pars = []
         self.fitness = None
         self.chisqr = None
@@ -621,5 +612,4 @@
         self.residuals = []
         self.index = []
-        self.parameters = None
         self.model = model
         self.data = data
Index: src/sans/fit/BumpsFitting.py
===================================================================
--- src/sans/fit/BumpsFitting.py	(revision ed4aef2412e82813a3c69fc3d050687b22a157ad)
+++ src/sans/fit/BumpsFitting.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
@@ -182,5 +182,5 @@
         """
         # Note: technically, unbounded fitters and unmonitored fitters are
-        self.setp(x)
+        self.setp(p)
 
         # Compute penalty for being out of bounds which increases the farther
Index: src/sans/fit/ParkFitting.py
===================================================================
--- src/sans/fit/ParkFitting.py	(revision 95d58d3a800344be2703a5e297ab0e7b153c6309)
+++ src/sans/fit/ParkFitting.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
@@ -122,5 +122,4 @@
         """
         list_params = []
-        self.pars = []
         self.pars = fitparams
         for item in fitparams:
@@ -501,7 +500,6 @@
             if fproblem.get_to_fit() == 1:
                 fitproblems.append(fproblem)
-        if len(fitproblems) == 0: 
+        if len(fitproblems) == 0:
             raise RuntimeError, "No Assembly scheduled for Park fitting."
-            return
         for item in fitproblems:
             model = item.get_model()
@@ -512,9 +510,13 @@
                     ind = item.pars.index(name)
                     parkmodel.model.setParam(name, item.vals[ind])
+
+            # set the constraints into the model
+            for p,v in model.constraints:
+                parkmodel.parameterset[str(p)].set(str(v))
             
             for p in parkmodel.parameterset:
                 ## does not allow status change for constraint parameters
                 if p.status != 'computed':
-                    if p.get_name()in item.pars:
+                    if p.get_name() in item.pars:
                         ## make parameters selected for 
                         #fit will be between boundaries
@@ -583,6 +585,6 @@
             if result is not None:
                 for p in result.parameters:
-                    if p.data.name == small_result.data.name and \
-                            p.model.name == small_result.model.name:
+                    #if p.data.name == small_result.data.name and
+                    if p.model.name == small_result.model.name:
                         small_result.index = m.data.idx
                         small_result.fitness = result.fitness
Index: src/sans/perspectives/fitting/simfitpage.py
===================================================================
--- src/sans/perspectives/fitting/simfitpage.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/perspectives/fitting/simfitpage.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
@@ -378,5 +378,5 @@
         box_description = wx.StaticBox(self, -1,"Easy Setup ")
         boxsizer = wx.StaticBoxSizer(box_description, wx.HORIZONTAL)     
-        sizer_constraint = wx.BoxSizer(wx.HORIZONTAL|wx.LEFT|wx.RIGHT|wx.EXPAND)
+        sizer_constraint = wx.BoxSizer(wx.HORIZONTAL)
         self.model_cbox_left = wx.ComboBox(self, -1, style=wx.CB_READONLY)
         self.model_cbox_left.Clear()
Index: st/park_integration/test/test_fit_cylinder.py
===================================================================
--- test/park_integration/test/test_fit_cylinder.py	(revision da5d8e8ddcd10ca55862386be6991a9817ba1897)
+++ 	(revision )
@@ -1,138 +1,0 @@
-"""
-    Unit tests for fitting module 
-    @author G.alina
-"""
-import unittest
-import math
-
-from sans.fit.AbstractFitEngine import Model
-from sans.fit.Fitting import Fit
-from sans.dataloader.loader import Loader
-
-class TestSingleFit(unittest.TestCase):
-    """ test single fitting """
-    def setUp(self):
-        """ initialize data"""
-        self.data = Loader().load("cyl_400_20.txt")
-        # Create model that fitting engine understands
-        from sans.models.CylinderModel import CylinderModel
-        self.model  = CylinderModel()
-        self.model.setParam("scale", 1.0)
-        self.model.setParam("radius",18)
-        self.model.setParam("length", 397)
-        self.model.setParam("sldCyl",3e-006 )
-        self.model.setParam("sldSolv",0.0 )
-        self.model.setParam("background", 0.0)
-        #select parameters to fit
-        self.pars1 =['length','radius','scale']
-        
-    def _fit(self, name="scipy"):
-        """ return fit result """
-        fitter = Fit(name)
-        fitter.set_data(self.data,1)
-        fitter.set_model(self.model,1,self.pars1)
-        fitter.select_problem_for_fit(id=1,value=1)
-        return  fitter.fit()
-       
-
-    def test_scipy(self):
-        """ Simple cylinder model fit (scipy)  """
-        
-        result1, = self._fit("scipy")
-        
-        self.assert_(result1)
-        self.assertTrue(len(result1.pvec)>0 or len(result1.pvec)==0 )
-        self.assertTrue(len(result1.stderr)> 0 or len(result1.stderr)==0)
-        
-        self.assertTrue( math.fabs(result1.pvec[0]-400.0)/3.0 < result1.stderr[0] )
-        self.assertTrue( math.fabs(result1.pvec[1]-20.0)/3.0  < result1.stderr[1] )
-        self.assertTrue( math.fabs(result1.pvec[2]-1.0)/3.0   < result1.stderr[2] )
-        self.assertTrue( result1.fitness < 1.0 )
-        
-        
-    def test_park(self):
-        """ Simple cylinder model fit (park)  """
-        #raise NotImplementedError()
-        result1, = self._fit("park")
-        
-        self.assert_(result1)
-        self.assertTrue(len(result1.pvec)>0 or len(result1.pvec)==0 )
-        self.assertTrue(len(result1.stderr)> 0 or len(result1.stderr)==0)
-       
-        self.assertTrue( math.fabs(result1.pvec[0]-400.0)/3.0 < result1.stderr[0] )
-        self.assertTrue( math.fabs(result1.pvec[1]-20.0)/3.0  < result1.stderr[1] )
-        self.assertTrue( math.fabs(result1.pvec[2]-1.0)/3.0   < result1.stderr[2] )
-        self.assertTrue( result1.fitness < 1.0 )
-        
-        
-        
-class TestSimultaneousFit(unittest.TestCase):
-    """ test simultaneous fitting """
-    def setUp(self):
-        """ initialize data"""
-        
-        self.data1=Loader().load("cyl_400_20.txt")
-        self.data2=Loader().load("cyl_400_40.txt")
-    
-        # Receives the type of model for the fitting
-        from sans.models.CylinderModel import CylinderModel
-        cyl1  = CylinderModel()
-        cyl1.name = "C1"
-        self.model1 = Model(cyl1)
-        self.model1.set(scale= 1.0)
-        self.model1.set(radius=18)
-        self.model1.set(length=396)
-        self.model1.set(sldCyl=3e-006, sldSolv=0.0)
-        self.model1.set(background=0.0)
-        
-        cyl2  = CylinderModel()
-        cyl2.name = "C2"
-        self.model2 = Model(cyl2)
-        self.model2.set(scale= 1.0)
-        self.model2.set(radius=37)
-        self.model2.set(length='C1.length')
-        self.model2.set(sldCyl=3e-006, sldSolv=0.0)
-        self.model2.set(background=0.0)
-       
-    def _fit(self, name="park"):
-        """ return fit result """
-        fitter = Fit(name)
-        fitter.set_data(self.data1,1)
-        fitter.set_model(self.model1, 1, ['length','radius','scale'])
-        
-        fitter.set_data(self.data2,2)
-        fitter.set_model(self.model2, 2, ['radius','scale'])
-        fitter.select_problem_for_fit(id=1,value=1)
-        fitter.select_problem_for_fit(id=2,value=1)
-        return fitter.fit()
-    
-    
-    def test_park2(self):
-        """ Simultaneous cylinder model fit (park)  """
-        raise NotImplementedError()
-        result1,= self._fit('park')
-        self.assert_(result1)
-        self.assertTrue(len(result1.pvec)>=0  )
-        self.assertTrue(len(result1.stderr)>= 0)
-      
-        for par in result1.parameters:
-            if par.name=='C1.length':
-                print par.name, par.value
-                self.assertTrue( math.fabs(par.value-400.0)/3.0 < par.stderr )
-            elif par.name=='C1.radius':
-                print par.name, par.value
-                self.assertTrue( math.fabs(par.value-20.0)/3.0 < par.stderr )
-            elif par.name=='C2.radius':
-                print par.name, par.value
-                self.assertTrue( math.fabs(par.value-40.0)/3.0 < par.stderr )
-            elif par.name=='C1.scale':
-                print par.name, par.value
-                self.assertTrue( math.fabs(par.value-1.0)/3.0 < par.stderr )
-            elif par.name=='C2.scale':
-                print par.name, par.value
-                self.assertTrue( math.fabs(par.value-1.0)/3.0 < par.stderr )
-            
-
-if __name__ == '__main__':
-    unittest.main()        
-       
Index: test/park_integration/test/utest_fit_cylinder.py
===================================================================
--- test/park_integration/test/utest_fit_cylinder.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
+++ test/park_integration/test/utest_fit_cylinder.py	(revision fb7180c8dc1e7aa05eb379b946873bb0faebc57c)
@@ -0,0 +1,135 @@
+"""
+    Unit tests for fitting module 
+    @author G.alina
+"""
+import unittest
+import math
+
+from sans.fit.AbstractFitEngine import Model
+from sans.fit.Fitting import Fit
+from sans.dataloader.loader import Loader
+
+class TestSingleFit(unittest.TestCase):
+    """ test single fitting """
+    def setUp(self):
+        """ initialize data"""
+        self.data = Loader().load("cyl_400_20.txt")
+        # Create model that fitting engine understands
+        from sans.models.CylinderModel import CylinderModel
+        self.model  = CylinderModel()
+        self.model.setParam("scale", 1.0)
+        self.model.setParam("radius",18)
+        self.model.setParam("length", 397)
+        self.model.setParam("sldCyl",3e-006 )
+        self.model.setParam("sldSolv",0.0 )
+        self.model.setParam("background", 0.0)
+        #select parameters to fit
+        self.pars1 =['length','radius','scale']
+        
+    def _fit(self, name="scipy"):
+        """ return fit result """
+        fitter = Fit(name)
+        fitter.set_data(self.data,1)
+        fitter.set_model(self.model,1,self.pars1)
+        fitter.select_problem_for_fit(id=1,value=1)
+        return  fitter.fit()
+       
+
+    def test_scipy(self):
+        """ Simple cylinder model fit (scipy)  """
+        
+        result1, = self._fit("scipy")
+        
+        self.assert_(result1)
+        self.assertTrue(len(result1.pvec)>0 or len(result1.pvec)==0 )
+        self.assertTrue(len(result1.stderr)> 0 or len(result1.stderr)==0)
+        
+        self.assertTrue( math.fabs(result1.pvec[0]-400.0)/3.0 < result1.stderr[0] )
+        self.assertTrue( math.fabs(result1.pvec[1]-20.0)/3.0  < result1.stderr[1] )
+        self.assertTrue( math.fabs(result1.pvec[2]-1.0)/3.0   < result1.stderr[2] )
+        self.assertTrue( result1.fitness < 1.0 )
+        
+        
+    def test_park(self):
+        """ Simple cylinder model fit (park)  """
+        #raise NotImplementedError()
+        result1, = self._fit("park")
+        
+        self.assert_(result1)
+        self.assertTrue(len(result1.pvec)>0 or len(result1.pvec)==0 )
+        self.assertTrue(len(result1.stderr)> 0 or len(result1.stderr)==0)
+       
+        self.assertTrue( math.fabs(result1.pvec[0]-400.0)/3.0 < result1.stderr[0] )
+        self.assertTrue( math.fabs(result1.pvec[1]-20.0)/3.0  < result1.stderr[1] )
+        self.assertTrue( math.fabs(result1.pvec[2]-1.0)/3.0   < result1.stderr[2] )
+        self.assertTrue( result1.fitness < 1.0 )
+        
+        
+        
+class TestSimultaneousFit(unittest.TestCase):
+    """ test simultaneous fitting """
+    def setUp(self):
+        """ initialize data"""
+        
+        self.data1=Loader().load("cyl_400_20.txt")
+        self.data2=Loader().load("cyl_400_40.txt")
+    
+        # Receives the type of model for the fitting
+        from sans.models.CylinderModel import CylinderModel
+        cyl1  = CylinderModel()
+        cyl1.name = "C1"
+        self.model1 = Model(cyl1)
+        self.model1.set(scale= 1.0)
+        self.model1.set(radius=18)
+        self.model1.set(length=396)
+        self.model1.set(sldCyl=3e-006, sldSolv=0.0)
+        self.model1.set(background=0.0)
+        
+        cyl2  = CylinderModel()
+        cyl2.name = "C2"
+        self.model2 = Model(cyl2)
+        self.model2.set(scale= 1.0)
+        self.model2.set(radius=37)
+        self.model2.set(length='C1.length')
+        self.model2.set(sldCyl=3e-006, sldSolv=0.0)
+        self.model2.set(background=0.0)
+       
+    def _fit(self, name="park"):
+        """ return fit result """
+        fitter = Fit(name)
+        fitter.set_data(self.data1,1)
+        fitter.set_model(self.model1, 1, ['length','radius','scale'])
+
+        fitter.set_data(self.data2,2)
+        fitter.set_model(self.model2, 2, ['radius','scale'])
+        fitter.select_problem_for_fit(id=1,value=1)
+        fitter.select_problem_for_fit(id=2,value=1)
+        return fitter.fit()
+    
+    
+    def test_park2(self):
+        """ Simultaneous cylinder model fit (park)  """
+        result1, result2 = self._fit('park')
+        self.assert_(result1)
+        self.assertTrue(len(result1.pvec)>0)
+        self.assertTrue(len(result1.stderr)>0)
+
+        for n, v, dv in zip(result1.param_list, result1.pvec, result1.stderr):
+            print "M1.%s = %s +/- %s"%(n,v,dv)
+            if n == "length":
+                self.assertTrue( math.fabs(v-400.0)/3.0 < dv )
+            elif n=='radius':
+                self.assertTrue( math.fabs(v-20.0)/3.0 < dv )
+            elif n=='scale':
+                self.assertTrue( math.fabs(v-1.0)/3.0 < dv )
+        for n, v, dv in zip(result2.param_list, result2.pvec, result2.stderr):
+            print "M2.%s = %s +/- %s"%(n,v,dv)
+            if n=='radius':
+                self.assertTrue( math.fabs(v-40.0)/3.0 < dv )
+            elif n=='scale':
+                self.assertTrue( math.fabs(v-1.0)/3.0 < dv )
+
+
+if __name__ == '__main__':
+    unittest.main()        
+       
