GAMS [ Home | Downloads | Documentation | Solvers | APIs | Tools | Model Libraries | Resources | Sales | Support | Contact Us | Search ]

MCFILTER

Table of Contents

MCFilter filters duplicate and dominated points from a solution set.

Usage

mcfilter InputFile

The input is a gdx file with the following data:

parameter X(point, i)

Points containing binary values; use EPS when all zero for a point

parameter F(point, obj)

Objectives for the points X; use EPS when all zero for a point

parameter S(obj)

Direction of each objective: 1=max,-1=min

The output will be a gdx file called InputFile_res.gdx with the same parameters but without duplicates and dominated points.

Example

* Generate random data to test MCFilter
set Ri /R1*R65535/
   Xi /X1*X16/
   Fi /F1*F5/;
 
parameter X(Ri, Xi) 'the binary variables'
         F(Ri, Fi) 'calculated F variables'
         S(Fi)     'sign on the F variables';
 
* The following points will be unique
X(Ri, Xi) = mod(floor(Ri.ord / power(2, Xi.off)), 2);
 
F(Ri, Fi) = uniform(1, 2);
 
S(Fi) = -1 + 2$(uniform(0,1) <= 0.5);
 
execute_unload 'testdata.gdx', X F S;
 
execute 'mcfilter testdata.gdx';
 
* The file testdata_res.gdx will contain the results

Below is the partial log after running the above model:

mcfilter v3.
Number of records     =    65535
Number of X variables =       16
Number of F variables =        5
Loading GDX data      =      156 ms
After X Filter, count =    65535
X Duplicate filter    =       16 ms
After F Filter, count =     1070
F Dominance filter    =      249 ms
Writing GDX data      =       16 ms