%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % MIDACO 7 benchmark - MINLPLib sporttournament22: Sports tournament breaks % -------------------------------------------------------------------------- % % A sports league of 22 teams plays a single round-robin tournament. A % team has a break when it plays two consecutive games at home or two % consecutive games away. Elf, Juenger and Rinaldi showed that minimizing % the breaks of a schedule is a maximum cut problem. This instance is the % quadratic binary form of MINLPLib (maximization of 234 there, here % minimization of -234). % % Reference: M. Elf, M. Juenger and G. Rinaldi, Minimizing breaks by % maximizing cuts, Operations Research Letters 31 (2003) 343-349. % MINLPLib instance sporttournament22: % https://www.minlplib.org/sporttournament22.html % % Variables: 231 binary variables % Constraints: none % Optimum: F(X) = -234 (proven optimal) % % MIDACO setting: all parameters by default, start at % the lower bounds, the run stops when F(X) reaches the optimum (FSTOP). % % This benchmark needs a full MIDACO license: the limited version % solves problems with up to 8 variables and the default parameters. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function sporttournament22 key = '************************************************************'; problem.func = @problem_function; problem.o = 1; % Number of objectives problem.n = 231; % Number of variables (in total) problem.ni = 231; % Number of integer variables (0 <= ni <= n) problem.m = 0; % Number of constraints (in total) problem.me = 0; % Number of equality constraints (0 <= me <= m) problem.xl = zeros(1,231); problem.xu = ones(1,231); problem.x = problem.xl; % Starting point: lower bounds option.maxeval = 10000000; option.maxtime = 60*60*24; option.printeval = 1000; option.save2file = 1; option.resumable = 0; option.param( 1) = 0; % ACCURACY option.param( 2) = 3; % SEED option.param( 3) = -234 + 0.5; % FSTOP option.param( 4) = 0; % ALGOSTOP option.param( 5) = 0; % EVALSTOP option.param( 6) = 0; % FOCUS option.param( 7) = 0; % ANTS option.param( 8) = 0; % KERNEL option.param( 9) = 0; % ORACLE option.param(10) = 0; % PARETOMAX option.param(11) = 0; % EPSILON option.param(12) = 0; % BALANCE option.param(13) = 0; % CHARACTER option.param(14) = 0; % SURROGATE option.param(15) = 0; % PMISQP option.parallel = 0; % Serial: 0 or 1, Parallel: 2,3,4,5,6,7,8... option.paradigm = 0; % Parallel mode: 0 = parfor, 1 = vectorized [F,G] = func(X) [ solution ] = midaco( problem, option, key ); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [ f, g ] = problem_function( x ) % F(X) = sum of q(i,j)*x(i)*x(j) over the list below (i < j), plus the % linear terms q(i,i)*x(i); MINLPLib maximizes -F, the optimum is F = -234 persistent I J W if isempty(I) Q = qdata(); I = Q(:,1); J = Q(:,2); W = Q(:,3); end f(1) = sum(W .* x(I)' .* x(J)'); g = []; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function Q = qdata() % MINLPLib sporttournament22, entries i j q(i,j) Q = [ 1 1 -2; 1 2 2; 1 85 2; 1 166 2; 1 170 -2; 2 2 -2; 2 62 2; 2 125 -2; 2 167 2; 3 3 -2; 3 89 -2; 3 172 2; 3 180 2; 3 181 2; 4 4 -2; 4 110 -2; 4 169 2; 4 172 2; 4 186 2; 5 5 -2; 5 8 2; 5 176 2; 6 6 -2; 6 36 2; 6 50 2; 6 135 -2; 6 169 2; 7 7 -2; 7 20 2; 7 118 -2; 7 194 2; 7 195 2; 8 8 -4; 8 48 2; 8 50 2; 8 173 2; 9 9 -2; 9 20 2; 9 29 2; 9 76 2; 9 146 -2; 10 10 -2; 10 29 2; 10 40 2; 10 99 2; 10 203 -2; 11 11 -2; 11 23 2; 11 133 2; 12 12 -2; 12 40 2; 12 56 2; 12 119 2; 12 207 -2; 13 13 -2; 13 20 -2; 13 31 2; 13 40 2; 13 208 2; 14 14 -4; 14 56 2; 14 77 2; 14 147 2; 14 207 2; 15 15 -2; 15 31 2; 15 42 2; 15 56 2; 15 195 -2; 16 16 -2; 16 46 2; 16 205 2; 17 17 -2; 17 18 2; 17 25 2; 17 93 2; 17 182 -2; 18 18 -2; 18 26 2; 18 38 2; 18 214 -2; 19 19 -2; 19 77 2; 19 101 2; 19 163 -2; 19 203 2; 20 20 -2; 20 30 2; 21 21 -4; 21 42 2; 21 58 2; 21 77 2; 21 195 2; 22 22 -2; 22 23 -2; 22 44 2; 22 66 2; 22 213 2; 23 23 -2; 23 24 2; 23 65 2; 24 24 -2; 24 66 2; 25 25 -2; 25 27 2; 25 53 2; 25 116 -2; 26 26 -2; 26 28 2; 26 164 2; 26 193 -2; 27 27 -4; 27 28 2; 27 164 2; 27 212 2; 28 28 -4; 28 118 2; 28 163 2; 29 29 -4; 29 41 2; 29 150 2; 30 30 -4; 30 58 2; 30 80 2; 30 101 2; 31 31 -4; 31 59 2; 31 200 2; 32 32 -4; 32 33 2; 32 63 2; 32 210 2; 32 216 2; 33 33 -2; 33 64 2; 33 87 2; 33 205 -2; 34 34 -2; 34 35 2; 34 86 2; 34 210 -2; 34 211 2; 35 35 -2; 35 87 2; 36 36 -2; 36 49 2; 37 37 -4; 37 49 2; 37 91 2; 37 176 2; 37 202 2; 38 38 -2; 38 39 -2; 38 177 2; 38 189 2; 39 39 2; 39 98 2; 39 146 -2; 39 218 -2; 40 40 -4; 40 57 2; 41 41 -2; 41 80 2; 41 104 2; 41 149 -2; 42 42 -4; 42 153 2; 42 196 2; 43 43 -2; 43 44 2; 43 156 2; 43 213 2; 43 220 -2; 44 44 -4; 44 45 2; 44 83 2; 45 45 -4; 45 84 2; 45 109 2; 45 205 2; 46 46 -4; 46 47 2; 46 159 2; 46 210 2; 47 47 -2; 47 109 2; 48 48 -2; 48 69 2; 49 49 -2; 49 51 2; 49 186 -2; 50 50 -2; 50 138 -2; 50 168 2; 51 51 -2; 51 69 2; 51 138 2; 51 206 -2; 52 52 -2; 52 53 2; 52 54 -2; 52 171 2; 52 202 2; 53 53 -2; 53 115 -2; 53 182 2; 54 54 2; 54 115 2; 54 142 -2; 54 221 -2; 55 55 2; 55 184 -2; 55 194 2; 55 203 -2; 55 222 -2; 56 56 -4; 56 79 2; 57 57 -2; 57 104 2; 57 122 2; 57 219 -2; 58 58 -4; 58 60 2; 58 204 2; 59 59 -4; 59 61 2; 59 62 2; 59 152 2; 60 60 -2; 60 62 2; 60 122 2; 60 185 -2; 61 61 -2; 61 63 -2; 61 127 2; 61 165 2; 62 62 -4; 62 63 2; 63 63 -2; 63 64 2; 64 64 -4; 64 65 2; 64 107 2; 65 65 -4; 65 108 2; 65 132 2; 66 66 -4; 66 67 2; 66 131 2; 67 67 -2; 67 132 2; 68 68 2; 68 176 -2; 68 223 -2; 69 69 -2; 69 70 2; 69 180 -2; 70 70 -2; 70 197 2; 70 209 -2; 70 223 2; 71 71 -2; 71 72 2; 71 73 -2; 71 168 2; 71 206 2; 72 72 -2; 72 95 -2; 72 177 2; 72 187 2; 73 73 2; 73 95 2; 73 212 -2; 73 225 -2; 74 74 2; 74 75 -2; 74 142 -2; 74 174 -2; 74 178 2; 75 75 2; 75 76 2; 75 207 -2; 75 226 -2; 76 76 -2; 76 100 2; 76 178 -2; 77 77 -4; 77 103 2; 78 78 -4; 78 100 2; 78 103 2; 78 150 2; 78 190 2; 79 79 -2; 79 102 -2; 79 122 2; 79 151 2; 80 80 -4; 80 81 2; 80 200 2; 81 81 -4; 81 151 2; 81 185 2; 81 220 2; 82 82 2; 82 83 -2; 82 153 -2; 82 165 -2; 82 175 2; 83 83 -2; 83 84 2; 83 220 2; 84 84 -4; 84 86 2; 84 128 2; 85 85 -2; 85 109 -2; 85 129 2; 85 161 2; 86 86 -4; 86 130 2; 86 161 2; 87 87 -4; 87 88 2; 87 160 2; 88 88 -2; 88 161 2; 89 89 2; 89 227 -2; 90 90 -2; 90 91 -2; 90 92 2; 90 223 2; 90 227 2; 91 91 -2; 91 93 2; 91 192 2; 92 92 -2; 92 93 2; 92 172 -2; 92 187 2; 93 93 -4; 93 214 2; 94 94 -2; 94 174 2; 94 191 2; 94 198 2; 94 199 -2; 95 95 2; 95 116 -2; 95 226 -2; 96 96 4; 96 97 -2; 96 115 -2; 96 177 -2; 96 178 -2; 97 97 -2; 97 99 2; 97 207 2; 97 226 2; 98 98 2; 98 120 -2; 98 189 -2; 98 190 -2; 99 99 -4; 99 120 2; 99 178 2; 100 100 -2; 100 102 2; 100 194 -2; 101 101 -2; 101 121 2; 101 215 -2; 102 102 -2; 102 120 2; 102 121 2; 103 103 -4; 103 105 2; 103 151 2; 104 104 -4; 104 106 2; 104 196 2; 105 105 -2; 105 106 2; 105 121 2; 105 165 -2; 106 106 -4; 106 155 2; 106 217 2; 107 107 -2; 107 108 2; 107 179 -2; 107 217 2; 108 108 -4; 108 157 2; 108 159 2; 109 109 -2; 109 229 2; 110 110 2; 110 136 -2; 111 111 -4; 111 112 2; 111 136 2; 111 209 2; 111 227 2; 112 112 -2; 112 181 -2; 112 182 2; 112 225 2; 113 113 2; 113 174 -2; 113 191 -2; 113 192 2; 113 193 -2; 114 114 -2; 114 192 -2; 114 193 2; 114 212 2; 114 225 2; 115 115 2; 115 222 -2; 116 116 4; 116 117 -2; 116 183 -2; 117 117 -2; 117 119 2; 117 203 2; 117 222 2; 118 118 2; 118 148 -2; 118 164 -2; 119 119 -4; 119 148 2; 119 183 2; 120 120 -2; 120 219 2; 121 121 -4; 121 123 2; 122 122 -4; 122 124 2; 123 123 -2; 123 124 2; 123 165 2; 123 231 -2; 124 124 -4; 124 125 2; 124 126 2; 125 125 2; 125 128 -2; 125 200 -2; 126 126 -2; 126 128 2; 126 204 -2; 126 216 2; 127 127 -2; 127 129 2; 127 130 -2; 127 185 2; 128 128 -2; 128 130 2; 129 129 -2; 129 131 -2; 129 170 2; 130 130 -2; 130 131 2; 131 131 -2; 131 133 2; 132 132 -2; 132 134 2; 132 166 -2; 133 133 -4; 133 134 2; 133 166 2; 134 134 -2; 135 135 2; 135 201 -2; 136 136 -2; 136 137 2; 136 228 2; 137 137 -4; 137 139 2; 137 201 2; 137 206 2; 138 138 2; 138 191 -2; 138 221 -2; 139 139 -4; 139 181 2; 139 188 2; 139 221 2; 140 140 2; 140 143 -2; 140 177 -2; 140 187 -2; 140 188 2; 141 141 -2; 141 142 2; 141 143 2; 141 188 -2; 141 221 2; 142 142 2; 142 218 -2; 143 143 -2; 143 144 2; 143 218 2; 144 144 2; 144 145 -2; 144 189 -2; 144 199 -2; 145 145 -2; 145 146 2; 145 147 2; 145 218 2; 146 146 2; 146 215 -2; 147 147 -4; 147 189 2; 147 215 2; 148 148 -2; 148 149 2; 148 219 2; 149 149 -2; 149 215 2; 149 231 2; 150 150 -2; 150 152 2; 150 208 -2; 151 151 -4; 151 154 2; 152 152 -4; 152 154 2; 152 231 2; 153 153 2; 153 156 -2; 153 208 -2; 154 154 -4; 154 156 2; 154 179 2; 155 155 2; 155 157 -2; 155 170 -2; 155 196 -2; 156 156 -2; 156 157 2; 157 157 -2; 157 158 2; 158 158 -2; 158 159 2; 158 160 2; 158 175 -2; 159 159 -2; 159 230 -2; 160 160 -2; 160 167 -2; 160 230 2; 161 161 -4; 161 162 2; 162 162 -2; 162 230 2; 163 164 -2; 163 190 2; 166 167 -2; 167 175 2; 168 169 -2; 168 198 -2; 169 197 -2; 170 179 2; 171 172 -2; 171 173 2; 171 192 -2; 173 201 -2; 173 202 -2; 174 184 2; 175 185 -2; 176 181 -2; 179 204 -2; 182 206 -2; 183 184 2; 183 194 -2; 184 212 -2; 187 202 -2; 188 209 -2; 190 195 -2; 191 197 2; 193 222 2; 196 220 -2; 197 225 -2; 198 209 2; 198 214 -2; 199 214 2; 199 226 2; 200 217 -2; 201 224 2; 204 208 2; 205 211 -2; 210 213 -2; 213 216 -2; 216 217 -2; 219 231 -2; 223 224 -2; 227 228 -2; 229 230 -2]; end