Say I have that constraint:
e(i,j).. ... =l= ...;
How do I write only the binding constraints to an external file?
Say I have that constraint:
e(i,j).. ... =l= ...;
How do I write only the binding constraints to an external file?
To find out if a constraint is binding you just need to look at equation_name.slack.
After solving you could selectively write only those instances of constraint e, which are binding:
file fx /binding.txt/; put fx;
loop((i,j)$(e.slack(i,j)<1e-6),
put i.tl, j.tl, e.slack(i,j) /
);