Algorithm The weighted average and cosine algorithm (w.a.co) |
input: The number of decision variables (n), the number of constraints (m), the coefficient matrix of the problem (A), the vector of the right-hand side coefficients (b), the vector of the objective coefficients (c), two random integer numbers , . output: The percentage of binding constraints after the reduction that are identical to the binding ones in the original problem (p.bind), the total used constraints (used), the constraints of the weighted average method (m1), the constraints of the cosine similarity method (m2), the common constraints ( ). |
(Initialization) Compute: , , using (3) , for , , using (4) Set , Set , (General loop) While , , do Select: m1 = the Select: m2 = the constraints of rnd2 set that their rank is If , then use the subset If the problem (1) is feasible, then solve the problem (1) using an LP method - STOP else select and solve the problem (1) using an LP method end second if else if & , then solve the problem (1) using an LP method - STOP end first if p.bind, used, m1, m2, common end while |