Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Constraints on tree (Read 2168 times)
ofedrigo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Constraints on tree
Feb 8th, 2006 at 7:22am
 
Hi,

If you try to contrain differently one branch and the rest of the tree. I was wondering if there is a required order to specify the constraints. When you apply a contraint, does it automatically clear previously specified constraints?

In other words, is it equivalent to do:

ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
or
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
?

thanks,

Olivier
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Constraints on tree
Reply #1 - Feb 10th, 2006 at 9:55am
 
Dear Olivier,

Quote:
If you try to contrain differently one branch and the rest of the tree. I was wondering if there is a required order to specify the constraints. When you apply a contraint, does it automatically clear previously specified constraints?

In other words, is it equivalent to do:

ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
or
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
?


The order is not important in this case. ReplicateConstraint will scan all the branches, and apply constraints (when appropriate) only if the parameters have niot been previously constained. If you choose order 1 (branch/rest), ReplicateConstraint will not be applied to the branch (you need to use ClearConstraints before calling ReplicateConstraint if you want to override this behavior). In order 2, ReplicateConstraint will apply to all branches of the tree not previously constrained, but ExecuteCommand will override the assignment for the branch you want. messages.log will contain the constraints generated by ReplicateConstraint if you wanted to double-check.

It also is probably a good idea to call ClearConstraints (givenTree) before you impose any new constraints to make sure nothing unwanted carries over from the previous commands.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged