I'm using AMPL to build a reverse logistics model. The model is rather simple and has a series of nodes: from production to recycling facility, the node are defined as follows:
node Plant: net_out = p_supply;
node Dist {i in D_CITY};
node Whse {j in W_CITY};
node Recy {k in R_CITY}: net_in = r_demand[k];
I would like to a have a constraint in Whse but i do not know how to apply it directly. I get by with the following "unelegant" way:
subject to dw_objd{j in W_CITY}: sum {(i,j) in DW_LINKS} DW_Ship[i,j] = w_demand[j];
Is there a way to do it directly in the node declaration?
Unfortunately, there's no way to declare it inside the node-arc environment since each node statement defines constraints on "flow in minus flow out".