How to programmatically change the weight of children in a taxonomy vocabulary?
Change the weight property on the term object. 

$term = taxonomy_term_load($tid); //$tid = your taxonomy term id
$term-&gt;weight = 10000; //Whatever weight value
taxonomy_save_term($term);