function partial_order = elim_order_constraints(bnet)
% ELIM_ORDER_CONSTRAINTS Compute any constraints on the elimination ordering.
% partial_order = elim_order_constrains(bnet)
% 
% 
% Currently, the only constraint is for unrolled DBNs: 
% we eliminate all the nodes from slice t before any from slice t+1.
% We can also use this routine to ensure we eliminate continuous nodes before discrete
% (a "strong" triangulation), and state nodes before action/utility nodes.

if bnet.is_dbn & bnet.algo == 'j'
  partial_order = cell(1, bnet.num_slices);
  ss = bnet.slice_size;
  for t=1:bnet.num_slices
    first_in_slice = (t-1)*ss + 1;
    partial_order{t} = first_in_slice : first_in_slice + ss - 1;
  end
else
  partial_order = cell(1,1);
  partial_order{1} = 1:length(bnet.adj_mat);
end
