I'm working on an optimization problem regarding a directed acyclic graph. The constraint looks in
pyomo like this:
model.K = RangeSet(0,n_edges) model.con_part=ConstraintList() for k in model.K: model.con_part.add(model.x[edge_list['from_i'][k]] <= model.x[edge_list['to_i'][k]])
x is a binary variable. Mathematically, I would write something like this:
$$x_1\le x_2\quad\forall e_k(x_1,x_2)$$
$e_k$ is an edge which goes form $x_1$ to $x_2$. $k\in K$ which are all the edges of the graph.
Is there a way to express this nicely?