User Tools

Site Tools


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.

Assume you have that constraint:

e(i,j).. ... =l= ...;

Now you solve and afterwards you could selectively write only those instances of constraint e, which are binding:

file fx /binding.txt/; put fx; 
     put,, e.slack(i,j) /
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/write_only_the_binding_constraints_to_an_external_file.txt · Last modified: 2020/05/18 14:44 by Lutz Westermann