I wonder if it would be easier to process the estimates after the nonlinear fitting without contstraints. I assume that the dmax1 and rate1 parameter estimates will go together and the dmax2 and rate2 parameter estimates will go together even if the dmax1 and rate1 parameter estimates are not always first. Then to achieve the order that you want, you can simply swap the order in the data table after saving the estimates table. This example shows what I have in mind:
Names Default to Here( 1 );
dt = New Table( "Double Exponential Models",
Add Rows( 20 ),
New Column( "dmax1",
Values( J( 20, 1, Random Uniform() ) )
),
New Column( "rate1",
Values( J( 20, 1, Random Uniform() ) )
),
New Column( "dmax2",
Values( J( 20, 1, Random Uniform() ) )
),
New Column( "rate2",
Values( J( 20, 1, Random Uniform() ) )
)
);
Wait( 5 );
For Each Row(
If( :rate1 > :rate2,
temp = :dmax1;
:dmax1 = :dmax2;
:dmax2 = temp;
temp = :rate1;
:rate1 = :rate2;
:rate2 = temp;
);
);