User Tools

Site Tools


gams:write_only_the_binding_constraints_to_an_external_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
gams:write_only_the_binding_constraints_to_an_external_file [2008/05/27 16:47]
support
gams:write_only_the_binding_constraints_to_an_external_file [2020/05/18 14:44] (current)
Lutz Westermann simplify example
Line 5: Line 5:
  
 Assume you have that constraint: Assume you have that constraint:
 +
 <​code>​ <​code>​
-e(i,j)$(ord(i)<​ord(j)).. ... =l= ...;+e(i,j).. ... =l= ...;
 </​code>​ </​code>​
 +
 Now you solve and afterwards you could selectively write only those instances ​ Now you solve and afterwards you could selectively write only those instances ​
 of constraint ''​e'',​ which are binding: of constraint ''​e'',​ which are binding:
 +
 <​code>​ <​code>​
 file fx /​binding.txt/;​ put fx;  file fx /​binding.txt/;​ put fx; 
-loop((i,​j)$(ord(i)<​ord(j) and e.slack(i,​j)<​1e-6), ​+loop((i,​j)$(e.slack(i,​j)<​1e-6), ​
      put i.tl, j.tl, e.slack(i,​j) /      put i.tl, j.tl, e.slack(i,​j) /
      );      );
 </​code>​ </​code>​
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