Contents
- Demonstrate 3D optimization.
- Constants
- Mission set up
- Sail physical parameters
- Cost function weighting
- ode113 parameters
- Optimization parameters
- Simplex parameters
- GA parameters
- Costate to sail angle function
- On the next pass use the newly computed lambda as the first guess
- Acceleration
- Data for selected mission
- Dynamics function
- Cost function called by optimizer
- Initial costate guess
- Integration (ode113) parameters
- If nondimensionalize
- Weights for the costates
- Optimize the trajectory.
Demonstrate 3D optimization.
You can select an Earth to Mars mission or a Solar Polar Imager mission. You can pick either dimensional units or nondimensional units. Try either Simplex or genetic algorithms.
Functions demonstrated:
TrajectoryOptimization LambdaToConeClock3D RHSOpt3DOrbit Plot3DTrajectory Cost3D
------------------------------------------------------------------------ See also Constant, IsVersionAfter, Planets, ElToMEq, TimeDisplay, TrajectoryOptimization, LambdaToConeClock3D, Plot3DTrajectory, RHSOpt3DOrbit, Cost3D ------------------------------------------------------------------------
%------------------------------------------------------------------------------- % Copyright (c) 2005-2006 Princeton Satellite Systems, Inc. % All rights reserved. %------------------------------------------------------------------------------- % Since version 7. %------------------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%% % User parameters %%%%%%%%%%%%%%%%%%%%% mission = 'elements'; % 'elements' 'planet name', 'spi', 'inclination' nonDim = 0; % = 1 for nondimensional parameters, mu = 1, normalize position to 1 au method = 'downhill simplex'; % 'downhill simplex' or 'genetic algorithm' % Also see below for many more parameters. %%%%%%%%%%%%%%%%%%%%%
Constants
%---------- aU = Constant('au'); c = Constant('speed of light'); muSun = Constant('mu sun');
Mission set up
%--------------- % general purpose setup for 'elements' mission: el0 = [ aU;0;0;0;0.0;0]; elF = [1.5*aU;0;0;0;0.0;0];
Sail physical parameters
%------------------------- sailArea = 1e4; sailMass = 100; sailRhoS = 1.0; sailRhoAD = 0.0; sailRhoR = 0.0; duration = 420; % days, 420 good for pure planar and 10 deg inclination change
Cost function weighting
%------------------------ % [1;1e8;1e8;4e8;4e8;0.9e9];, Best results planar with simplex % [10;2e9;2e9;1e8;1e8;0.9e9];, Best results inclination with simplex % This weighting is for the 1 aU to 1.5 aU circular orbit transfer problem % No e error, i < 0.1 deg, no a error optimizationErrorWeighting = [1;1e8;1e8;4e8;4e8;0.9e9];
ode113 parameters
%------------------
integrationRelativeTolerance = 1e-2;
integrationAbsoluteTolerance = 1e-2;
Optimization parameters
%------------------------
d.method = method;
d.repeat = 0;
Simplex parameters
%-------------------
d.d.stateTol = 1e-2;
d.d.funTol = 1e-2;
d.d.nIts = 2000;
GA parameters
%-------------- d.d.nG = 50; % generations d.d.nI = 10; % Note: need to scale # mutations and # gen with # individuals. d.d.bounds = [-1 1; -1 1; -1 1; -1 1; -1 1; -1 1]; if IsVersionAfter(6.0) eval('fncSelect = @normGeomSelect;fncXOver = @heuristicXover;fncMutate = @nonUnifMutation;'); else fncSelect = 'normGeomSelect'; fncMutate = 'nonUnifMutation'; fncXOver = 'heuristicXover'; end d.d.fncMutate = fncMutate; d.d.optMutate = [floor(d.d.nI/2) d.d.nG 3]; % # mutations, last gen, sigma d.d.fncSelect = fncSelect; d.d.optSelect = [0.01]; % %chance that a solution is the best d.d.fncXOver = fncXOver; d.d.optXOver = [floor(d.d.nI/2) 3]; % # crossovers, # retries switch method case 'downhill simplex' nSteps = d.d.nIts; case 'genetic algorithm' nSteps = d.d.nG*(2*sum(d.d.optXOver)+d.d.optMutate(1)) + d.d.nI; end
Costate to sail angle function
%------------------------------- if IsVersionAfter(6.0) eval('d.d.lambdaToAccel = @LambdaToConeClock3D;'); else d.d.lambdaToAccel = 'LambdaToConeClock3D'; end
On the next pass use the newly computed lambda as the first guess
%------------------------------------------------------------------
d.d.mu = muSun;
Acceleration
%------------- d.d.accel = sailArea*1367*aU^2*1e-6/(c*sailMass); % km/sec^2
Data for selected mission
%-------------------------- switch mission case 'elements' d.d.xF = ElToMEq( elF, d.d.mu ); d.d.x0 = ElToMEq( el0, d.d.mu ); a0 = el0(1); d.d.iF = elF(2); case 'spi' [name,a,e,i,W,w,L] = Planets('rad',3); % Earth a = a*aU; d.d.x0 = ElToMEq( [a(1,1);i(1,1);W(1,1);w(1,1);e(1,1);L(1,1)], d.d.mu ); a0 = a(1,1); a(1,1) = 0.48*aU; i(1,1) = 70*pi/180; d.d.xF = ElToMEq( [a(1,1);i(1,1);W(1,1);w(1,1);e(1,1);L(1,1)], d.d.mu ); d.d.iF = i(1,1); % Final inclination case 'spimini' [name,a,e,i,W,w,L] = Planets('rad',3); % Earth a = a*aU; d.d.x0 = ElToMEq( [a(1,1);i(1,1);W(1,1);w(1,1);e(1,1);L(1,1)], d.d.mu ); a0 = a(1,1); a(1,1) = 0.9*aU; i(1,1) = 7*pi/180; d.d.xF = ElToMEq( [a(1,1);i(1,1);W(1,1);w(1,1);e(1,1);L(1,1)], d.d.mu ); d.d.iF = i(1,1); % Final inclination otherwise [~,a,e,i,W,w,L] = Planets('rad',3); % Earth a = a*aU; d.d.x0 = ElToMEq( [a(1,1);i(1,1);W(1,1);w(1,1);e(1,1);L(1,1)], d.d.mu ); [name,a,e,i,W,w,L] = Planets('rad',mission); a = a*aU; a0 = a(1,1); d.d.xF = ElToMEq( [a(1,1);i(1,1);W(1,1);w(1,1);e(1,1);L(1,1)], d.d.mu ); d.d.iF = i(1,1); % Final inclination end d.d.xF(6) = 0; % Lambda for state 6 must be zero
Dynamics function
%------------------ d.d.rhsFun = 'RHSOpt3DOrbit'; d.d.plotFun = 'Plot3DTrajectory'; d.d.coordType = 'equinoctial'; % 'cartesian' d.d.boundCond = [1:5 12]; d.d.hasThruster = false; d.d.rhoS = sailRhoS; d.d.rhoAD = sailRhoAD; d.d.rhoR = sailRhoR; TimeDisplay('initialize','Sail 3D Optimization', nSteps );
Cost function called by optimizer
%---------------------------------- if IsVersionAfter(6.0) eval('d.d.costFun = @Cost3D;'); else d.d.costFun = 'Cost3D'; end
Initial costate guess
%----------------------
d.d.lambda0 = [0.0;0;0;0.0025;0.0025;0.00];
Integration (ode113) parameters
%-------------------------------- d.d.data.absTol = integrationAbsoluteTolerance; d.d.data.relTol = integrationRelativeTolerance; d.d.data.maxStep = 1; % ode113 will never take a step bigger than this % fraction of the end time d.d.tEnd = duration*86400; % (s)
If nondimensionalize
%--------------------- d.d.nonDim = nonDim; if( nonDim ) w0 = sqrt(d.d.mu/a0^3); d.d.accel = d.d.accel/(w0^2*a0)/aU^2; d.d.tEnd = d.d.tEnd*w0; d.d.x0(1,1) = d.d.x0(1,1)/a0; d.d.xF(1,1) = d.d.xF(1,1)/a0; d.d.mu = 1; d.d.w0 = w0; d.d.a0 = a0; end
Weights for the costates
%-------------------------
d.d.errorScale = optimizationErrorWeighting;
Optimize the trajectory.
It will use Plot3DTrajectory to plot the results
%------------------------------------------------------- TrajectoryOptimization( d ); TimeDisplay('close' ); %--------------------------------------
Case 1: Method: downhill simplex Iteration Func-count min f(x) Procedure 0 1 1.24557e+08 1 7 1.21068e+08 initial simplex 2 9 1.21068e+08 contract outside 3 11 1.21068e+08 contract inside 4 13 1.21068e+08 contract inside 5 15 1.21068e+08 contract inside 6 17 1.21068e+08 contract inside 7 19 1.21068e+08 contract inside 8 21 1.21068e+08 contract inside 9 23 1.21068e+08 contract inside 10 25 1.21068e+08 contract inside 11 27 1.21068e+08 contract inside 12 29 1.21068e+08 contract inside 13 31 1.21068e+08 contract inside 14 33 1.21068e+08 contract inside 15 35 1.21068e+08 contract inside 16 37 1.21068e+08 contract inside 17 39 1.21068e+08 contract inside 18 41 1.21068e+08 contract inside 19 43 1.21068e+08 contract inside 20 45 1.21068e+08 contract inside 21 47 7.49038e+07 reflect 22 49 7.49038e+07 contract inside 23 51 6.8338e+07 reflect 24 52 6.8338e+07 reflect 25 53 6.8338e+07 reflect 26 55 5.36678e+07 contract inside 27 57 5.36678e+07 contract outside 28 59 3.90157e+07 expand 29 60 3.90157e+07 reflect 30 62 3.90157e+07 contract inside Warning: Failure at t=3.628224e+07. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.192093e-07) at time t. 31 64 3.90056e+07 reflect 32 66 2.81028e+07 reflect 33 68 2.81028e+07 contract inside Warning: Failure at t=3.593226e+07. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.192093e-07) at time t. 34 70 2.81028e+07 contract inside 35 72 2.81028e+07 contract inside 36 74 2.81028e+07 contract inside Warning: Failure at t=3.558291e+07. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.192093e-07) at time t. 37 76 2.42802e+07 reflect 38 77 2.42802e+07 reflect 39 79 2.42802e+07 contract inside 40 81 2.42802e+07 contract outside 41 83 2.42802e+07 contract inside 42 84 2.42802e+07 reflect 43 86 2.42802e+07 contract inside 44 87 2.42802e+07 reflect 45 89 2.42802e+07 contract inside 46 91 2.42802e+07 contract inside 47 93 2.42802e+07 contract inside 48 94 2.42802e+07 reflect 49 96 2.42802e+07 contract inside 50 98 2.27831e+07 reflect 51 100 2.27831e+07 contract inside 52 102 2.14294e+07 reflect 53 104 2.14294e+07 contract inside 54 106 2.14294e+07 contract inside 55 108 2.10394e+07 reflect 56 110 2.10394e+07 contract inside 57 112 2.10394e+07 contract inside 58 114 2.09488e+07 contract inside 59 116 2.00196e+07 reflect 60 118 2.00196e+07 contract inside 61 120 2.00196e+07 contract inside 62 121 2.00196e+07 reflect 63 123 2.00196e+07 contract inside 64 125 2.00196e+07 contract outside 65 127 1.98875e+07 reflect 66 129 1.90973e+07 reflect 67 130 1.90973e+07 reflect 68 132 1.83049e+07 expand 69 133 1.83049e+07 reflect 70 134 1.83049e+07 reflect 71 135 1.83049e+07 reflect 72 136 1.83049e+07 reflect 73 138 1.77753e+07 reflect 74 139 1.77753e+07 reflect 75 141 1.77753e+07 contract inside 76 143 1.61842e+07 expand 77 144 1.61842e+07 reflect 78 145 1.61842e+07 reflect 79 147 1.61842e+07 contract outside 80 149 1.49275e+07 expand 81 150 1.49275e+07 reflect 82 151 1.49275e+07 reflect 83 152 1.49275e+07 reflect 84 153 1.49275e+07 reflect 85 155 1.4445e+07 reflect 86 157 1.30765e+07 expand 87 158 1.30765e+07 reflect 88 159 1.30765e+07 reflect 89 160 1.30765e+07 reflect 90 162 1.18512e+07 expand 91 164 1.03799e+07 expand 92 165 1.03799e+07 reflect 93 166 1.03799e+07 reflect 94 167 1.03799e+07 reflect 95 169 9.16122e+06 expand 96 170 9.16122e+06 reflect 97 171 9.16122e+06 reflect 98 173 8.49344e+06 reflect 99 174 8.49344e+06 reflect 100 176 6.80002e+06 expand 101 177 6.80002e+06 reflect 102 178 6.80002e+06 reflect 103 179 6.80002e+06 reflect 104 180 6.80002e+06 reflect 105 182 6.45682e+06 reflect 106 184 6.38238e+06 reflect 107 185 6.38238e+06 reflect 108 186 6.38238e+06 reflect 109 188 6.38238e+06 contract inside 110 190 6.32573e+06 reflect 111 192 6.11212e+06 expand 112 193 6.11212e+06 reflect 113 194 6.11212e+06 reflect 114 196 6.07092e+06 reflect 115 197 6.07092e+06 reflect 116 198 6.07092e+06 reflect 117 200 6.07092e+06 contract inside 118 201 6.07092e+06 reflect 119 202 6.07092e+06 reflect 120 204 6.06351e+06 contract outside 121 206 6.06069e+06 contract inside 122 208 6.06069e+06 contract inside 123 209 6.06069e+06 reflect 124 210 6.06069e+06 reflect 125 218 6.04915e+06 shrink 126 220 6.04915e+06 contract inside 127 221 6.04915e+06 reflect 128 223 6.04915e+06 contract inside 129 224 6.04915e+06 reflect 130 226 6.04502e+06 reflect 131 228 6.04502e+06 contract inside 132 229 6.04502e+06 reflect 133 230 6.04502e+06 reflect 134 231 6.04502e+06 reflect 135 233 6.04502e+06 contract inside 136 235 6.04502e+06 contract inside 137 237 6.04502e+06 contract outside 138 238 6.04502e+06 reflect 139 239 6.04502e+06 reflect 140 241 6.04436e+06 contract inside 141 243 6.0438e+06 contract inside 142 245 6.04327e+06 contract inside 143 247 6.04327e+06 contract inside 144 248 6.04327e+06 reflect 145 250 6.04327e+06 contract inside 146 252 6.04327e+06 contract inside 147 254 6.04087e+06 expand 148 255 6.04087e+06 reflect 149 256 6.04087e+06 reflect 150 257 6.04087e+06 reflect 151 258 6.04087e+06 reflect 152 259 6.04087e+06 reflect 153 260 6.04087e+06 reflect 154 262 6.03965e+06 expand 155 264 6.039e+06 expand 156 265 6.039e+06 reflect 157 267 6.03812e+06 reflect 158 268 6.03812e+06 reflect 159 270 6.03442e+06 expand 160 271 6.03442e+06 reflect 161 273 6.03206e+06 expand 162 274 6.03206e+06 reflect 163 276 6.03077e+06 expand 164 278 6.02324e+06 expand 165 279 6.02324e+06 reflect 166 280 6.02324e+06 reflect 167 281 6.02324e+06 reflect 168 283 6.00822e+06 expand 169 284 6.00822e+06 reflect 170 285 6.00822e+06 reflect 171 287 5.99776e+06 expand 172 289 5.98622e+06 expand 173 290 5.98622e+06 reflect 174 292 5.96998e+06 expand 175 293 5.96998e+06 reflect 176 295 5.95572e+06 expand 177 297 5.92612e+06 expand 178 299 5.89175e+06 expand 179 300 5.89175e+06 reflect 180 301 5.89175e+06 reflect 181 302 5.89175e+06 reflect 182 303 5.89175e+06 reflect 183 304 5.89175e+06 reflect 184 306 5.8203e+06 expand 185 307 5.8203e+06 reflect 186 308 5.8203e+06 reflect 187 309 5.8203e+06 reflect 188 311 5.71936e+06 expand 189 312 5.71936e+06 reflect 190 313 5.71936e+06 reflect 191 314 5.71936e+06 reflect 192 316 5.60573e+06 expand 193 317 5.60573e+06 reflect 194 319 5.46873e+06 expand 195 320 5.46873e+06 reflect 196 321 5.46873e+06 reflect 197 323 5.31307e+06 expand 198 325 5.13465e+06 expand 199 327 4.90193e+06 expand 200 328 4.90193e+06 reflect 201 329 4.90193e+06 reflect 202 330 4.90193e+06 reflect 203 331 4.90193e+06 reflect 204 333 4.63631e+06 reflect 205 334 4.63631e+06 reflect 206 335 4.63631e+06 reflect 207 336 4.63631e+06 reflect 208 338 4.63631e+06 contract inside 209 339 4.63631e+06 reflect 210 341 4.35285e+06 expand 211 343 4.35285e+06 contract inside 212 344 4.35285e+06 reflect 213 345 4.35285e+06 reflect 214 346 4.35285e+06 reflect 215 348 4.19434e+06 expand 216 349 4.19434e+06 reflect 217 350 4.19434e+06 reflect 218 352 4.05231e+06 reflect 219 354 4.05231e+06 contract inside 220 355 4.05231e+06 reflect 221 356 4.05231e+06 reflect 222 358 4.011e+06 reflect 223 359 4.011e+06 reflect 224 361 4.011e+06 contract outside 225 363 3.88934e+06 reflect 226 364 3.88934e+06 reflect 227 366 3.88934e+06 contract inside 228 368 3.88934e+06 contract inside 229 370 3.88934e+06 contract inside 230 371 3.88934e+06 reflect 231 373 3.86667e+06 reflect 232 374 3.86667e+06 reflect 233 376 3.80244e+06 expand 234 377 3.80244e+06 reflect 235 378 3.80244e+06 reflect 236 380 3.80244e+06 contract inside 237 381 3.80244e+06 reflect 238 382 3.80244e+06 reflect 239 384 3.80244e+06 contract inside 240 386 3.80244e+06 contract inside 241 388 3.70391e+06 expand 242 389 3.70391e+06 reflect 243 390 3.70391e+06 reflect 244 392 3.69962e+06 reflect 245 393 3.69962e+06 reflect 246 394 3.69962e+06 reflect 247 396 3.65342e+06 reflect 248 398 3.65342e+06 contract outside 249 400 3.65342e+06 contract inside 250 401 3.65342e+06 reflect 251 402 3.65342e+06 reflect 252 404 3.62248e+06 reflect 253 405 3.62248e+06 reflect 254 406 3.62248e+06 reflect 255 408 3.62248e+06 contract inside 256 410 3.62248e+06 contract inside 257 412 3.62248e+06 contract inside 258 414 3.62248e+06 contract inside 259 415 3.62248e+06 reflect 260 417 3.62248e+06 contract inside 261 418 3.62248e+06 reflect 262 420 3.62248e+06 contract inside 263 422 3.62234e+06 contract outside 264 424 3.61998e+06 contract inside 265 426 3.61996e+06 contract inside 266 428 3.61775e+06 reflect 267 430 3.61775e+06 contract inside 268 432 3.61775e+06 contract outside 269 433 3.61775e+06 reflect 270 435 3.6162e+06 reflect 271 437 3.6162e+06 contract inside 272 439 3.6162e+06 contract outside 273 440 3.6162e+06 reflect 274 442 3.6162e+06 contract inside 275 444 3.6162e+06 contract inside 276 445 3.6162e+06 reflect 277 447 3.6162e+06 contract inside 278 449 3.6162e+06 contract inside 279 450 3.6162e+06 reflect 280 451 3.6162e+06 reflect 281 453 3.6162e+06 contract inside 282 454 3.6162e+06 reflect 283 456 3.6162e+06 contract inside 284 457 3.6162e+06 reflect 285 459 3.6162e+06 contract inside 286 460 3.6162e+06 reflect 287 462 3.61615e+06 contract inside 288 464 3.61596e+06 reflect 289 466 3.61596e+06 contract outside 290 468 3.61596e+06 contract inside 291 470 3.61596e+06 contract inside 292 472 3.61595e+06 reflect 293 473 3.61595e+06 reflect 294 474 3.61595e+06 reflect 295 475 3.61595e+06 reflect 296 476 3.61595e+06 reflect 297 478 3.61595e+06 contract inside 298 480 3.61594e+06 reflect 299 481 3.61594e+06 reflect 300 483 3.61588e+06 reflect 301 485 3.61588e+06 contract inside 302 493 3.61588e+06 shrink 303 494 3.61588e+06 reflect 304 495 3.61588e+06 reflect 305 497 3.61588e+06 reflect 306 499 3.61588e+06 contract inside 307 501 3.61588e+06 contract inside 308 503 3.61588e+06 contract inside 309 504 3.61588e+06 reflect 310 506 3.61588e+06 contract inside 311 514 3.61588e+06 shrink 312 516 3.61584e+06 expand 313 517 3.61584e+06 reflect 314 518 3.61584e+06 reflect 315 519 3.61584e+06 reflect 316 520 3.61584e+06 reflect 317 521 3.61584e+06 reflect 318 522 3.61584e+06 reflect 319 524 3.61579e+06 reflect 320 525 3.61579e+06 reflect 321 533 3.61579e+06 shrink 322 534 3.61579e+06 reflect 323 535 3.61579e+06 reflect 324 537 3.61579e+06 contract inside 325 539 3.61579e+06 contract inside 326 540 3.61579e+06 reflect 327 548 3.61579e+06 shrink 328 549 3.61579e+06 reflect 329 551 3.61579e+06 contract inside 330 559 3.61579e+06 shrink 331 560 3.61579e+06 reflect 332 561 3.61579e+06 reflect 333 562 3.61579e+06 reflect 334 564 3.61579e+06 contract inside 335 572 3.61579e+06 shrink 336 574 3.61579e+06 contract outside 337 576 3.61579e+06 contract inside 338 577 3.61579e+06 reflect 339 578 3.61579e+06 reflect 340 580 3.61579e+06 contract inside 341 582 3.61579e+06 contract inside 342 584 3.61579e+06 contract inside 343 592 3.61579e+06 shrink 344 594 3.61577e+06 reflect 345 596 3.61577e+06 contract inside 346 597 3.61577e+06 reflect 347 605 3.61577e+06 shrink 348 606 3.61577e+06 reflect 349 614 3.61577e+06 shrink 350 615 3.61577e+06 reflect 351 616 3.61577e+06 reflect 352 617 3.61577e+06 reflect 353 619 3.61577e+06 contract inside 354 627 3.61575e+06 shrink 355 628 3.61575e+06 reflect 356 630 3.61575e+06 contract inside 357 638 3.61575e+06 shrink 358 639 3.61575e+06 reflect 359 640 3.61575e+06 reflect 360 641 3.61575e+06 reflect 361 642 3.61575e+06 reflect 362 644 3.61575e+06 contract inside 363 646 3.61575e+06 contract inside 364 647 3.61575e+06 reflect 365 649 3.61575e+06 contract inside 366 651 3.61575e+06 contract inside 367 659 3.61575e+06 shrink 368 661 3.61575e+06 contract inside 369 662 3.61575e+06 reflect 370 663 3.61575e+06 reflect 371 671 3.61575e+06 shrink 372 672 3.61575e+06 reflect 373 680 3.61575e+06 shrink 374 681 3.61575e+06 reflect 375 683 3.61575e+06 contract inside 376 684 3.61575e+06 reflect 377 686 3.61575e+06 reflect 378 687 3.61575e+06 reflect 379 695 3.61575e+06 shrink 380 696 3.61575e+06 reflect 381 698 3.61575e+06 contract inside 382 699 3.61575e+06 reflect 383 707 3.61575e+06 shrink 384 709 3.61575e+06 contract inside 385 711 3.61575e+06 contract inside 386 713 3.61574e+06 reflect 387 721 3.61574e+06 shrink 388 722 3.61574e+06 reflect 389 723 3.61574e+06 reflect 390 724 3.61574e+06 reflect 391 732 3.61574e+06 shrink 392 733 3.61574e+06 reflect 393 734 3.61574e+06 reflect 394 735 3.61574e+06 reflect 395 743 3.61574e+06 shrink 396 745 3.61574e+06 contract inside 397 747 3.61574e+06 contract outside 398 748 3.61574e+06 reflect 399 749 3.61574e+06 reflect 400 750 3.61574e+06 reflect 401 758 3.61574e+06 shrink 402 766 3.61574e+06 shrink 403 774 3.61574e+06 shrink 404 775 3.61574e+06 reflect 405 777 3.61574e+06 contract outside 406 778 3.61574e+06 reflect 407 786 3.61574e+06 shrink 408 787 3.61574e+06 reflect 409 788 3.61574e+06 reflect 410 789 3.61574e+06 reflect 411 791 3.61574e+06 contract inside 412 793 3.61574e+06 contract inside 413 794 3.61574e+06 reflect 414 802 3.61574e+06 shrink 415 804 3.61574e+06 contract outside 416 805 3.61574e+06 reflect 417 807 3.61574e+06 contract inside 418 815 3.61574e+06 shrink 419 816 3.61574e+06 reflect 420 818 3.61574e+06 contract outside 421 826 3.61574e+06 shrink 422 827 3.61574e+06 reflect 423 828 3.61574e+06 reflect 424 829 3.61574e+06 reflect 425 831 3.61574e+06 contract inside 426 833 3.61574e+06 contract inside 427 835 3.61574e+06 contract inside 428 836 3.61574e+06 reflect 429 838 3.61574e+06 contract inside 430 840 3.61574e+06 contract inside 431 842 3.61574e+06 contract inside 432 844 3.61574e+06 contract inside 433 852 3.61574e+06 shrink 434 853 3.61574e+06 reflect 435 861 3.61574e+06 shrink 436 862 3.61574e+06 reflect 437 870 3.61574e+06 shrink 438 872 3.61574e+06 contract outside 439 873 3.61574e+06 reflect 440 874 3.61574e+06 reflect 441 875 3.61574e+06 reflect 442 876 3.61574e+06 reflect 443 884 3.61574e+06 shrink 444 885 3.61574e+06 reflect 445 887 3.61574e+06 contract inside 446 888 3.61574e+06 reflect 447 896 3.61574e+06 shrink 448 898 3.61574e+06 contract inside 449 906 3.61574e+06 shrink 450 907 3.61574e+06 reflect 451 909 3.61574e+06 contract inside 452 911 3.61574e+06 contract inside 453 912 3.61574e+06 reflect 454 913 3.61574e+06 reflect 455 915 3.61574e+06 contract inside 456 923 3.61574e+06 shrink 457 924 3.61574e+06 reflect 458 925 3.61574e+06 reflect 459 927 3.61574e+06 contract inside 460 935 3.61574e+06 shrink 461 936 3.61574e+06 reflect 462 944 3.61574e+06 shrink 463 945 3.61574e+06 reflect 464 947 3.61573e+06 reflect 465 948 3.61573e+06 reflect 466 950 3.61572e+06 reflect 467 958 3.61572e+06 shrink 468 960 3.61572e+06 contract inside 469 962 3.61572e+06 reflect 470 964 3.61572e+06 contract inside 471 966 3.61572e+06 contract inside 472 974 3.61572e+06 shrink 473 975 3.61572e+06 reflect 474 977 3.61572e+06 contract outside 475 978 3.61572e+06 reflect 476 979 3.61572e+06 reflect 477 981 3.61572e+06 contract inside 478 983 3.61572e+06 reflect 479 984 3.61572e+06 reflect 480 992 3.61572e+06 shrink 481 994 3.61572e+06 contract outside 482 995 3.61572e+06 reflect 483 1003 3.61572e+06 shrink 484 1005 3.61572e+06 reflect 485 1007 3.61572e+06 contract inside 486 1008 3.61572e+06 reflect 487 1009 3.61572e+06 reflect 488 1011 3.61572e+06 contract outside 489 1012 3.61572e+06 reflect 490 1014 3.61572e+06 contract inside 491 1015 3.61572e+06 reflect 492 1023 3.61572e+06 shrink 493 1024 3.61572e+06 reflect 494 1025 3.61572e+06 reflect 495 1026 3.61572e+06 reflect 496 1027 3.61572e+06 reflect 497 1028 3.61572e+06 reflect 498 1029 3.61572e+06 reflect 499 1030 3.61572e+06 reflect 500 1031 3.61572e+06 reflect 501 1033 3.61572e+06 contract inside 502 1034 3.61572e+06 reflect 503 1035 3.61572e+06 reflect 504 1036 3.61572e+06 reflect 505 1037 3.61572e+06 reflect 506 1038 3.61572e+06 reflect 507 1046 3.61572e+06 shrink 508 1054 3.61572e+06 shrink 509 1056 3.61572e+06 contract inside 510 1058 3.61572e+06 contract inside 511 1060 3.61572e+06 contract inside 512 1062 3.61572e+06 contract inside 513 1064 3.61572e+06 contract inside 514 1066 3.61572e+06 contract inside 515 1074 3.61572e+06 shrink 516 1082 3.61572e+06 shrink 517 1090 3.61572e+06 shrink 518 1098 3.61572e+06 shrink 519 1106 3.61572e+06 shrink 520 1114 3.61572e+06 shrink 521 1122 3.61572e+06 shrink 522 1130 3.61572e+06 shrink 523 1138 3.61572e+06 shrink 524 1146 3.61572e+06 shrink 525 1154 3.61572e+06 shrink 526 1162 3.61572e+06 shrink 527 1170 3.61572e+06 shrink 528 1178 3.61572e+06 shrink 529 1186 3.61572e+06 shrink 530 1194 3.61572e+06 shrink 531 1202 3.61572e+06 shrink 532 1210 3.61572e+06 shrink 533 1218 3.61572e+06 shrink 534 1226 3.61572e+06 shrink 535 1234 3.61572e+06 shrink 536 1242 3.61572e+06 shrink 537 1250 3.61572e+06 shrink 538 1258 3.61572e+06 shrink 539 1266 3.61572e+06 shrink 540 1274 3.61572e+06 shrink 541 1282 3.61572e+06 shrink 542 1290 3.61572e+06 shrink 543 1298 3.61572e+06 shrink 544 1306 3.61572e+06 shrink 545 1314 3.61572e+06 shrink 546 1322 3.61572e+06 shrink 547 1330 3.61572e+06 shrink 548 1338 3.61572e+06 shrink 549 1346 3.61572e+06 shrink 550 1354 3.61572e+06 shrink 551 1362 3.61572e+06 shrink 552 1370 3.61572e+06 shrink 553 1378 3.61572e+06 shrink 554 1386 3.61572e+06 shrink 555 1394 3.61572e+06 shrink 556 1402 3.61572e+06 shrink 557 1410 3.61572e+06 shrink 558 1418 3.61572e+06 shrink 559 1426 3.61572e+06 shrink 560 1434 3.61572e+06 shrink 561 1442 3.61572e+06 shrink 562 1450 3.61572e+06 shrink 563 1458 3.61572e+06 shrink 564 1466 3.61572e+06 shrink 565 1474 3.61572e+06 shrink 566 1482 3.61572e+06 shrink 567 1490 3.61572e+06 shrink 568 1498 3.61572e+06 shrink 569 1506 3.61572e+06 shrink 570 1514 3.61572e+06 shrink 571 1522 3.61572e+06 shrink 572 1530 3.61572e+06 shrink 573 1538 3.61572e+06 shrink 574 1546 3.61572e+06 shrink 575 1554 3.61572e+06 shrink 576 1562 3.61572e+06 shrink 577 1570 3.61572e+06 shrink 578 1578 3.61572e+06 shrink 579 1586 3.61572e+06 shrink 580 1594 3.61572e+06 shrink 581 1602 3.61572e+06 shrink 582 1610 3.61572e+06 shrink 583 1618 3.61572e+06 shrink 584 1626 3.61572e+06 shrink 585 1634 3.61572e+06 shrink 586 1642 3.61572e+06 shrink 587 1650 3.61572e+06 shrink 588 1658 3.61572e+06 shrink 589 1666 3.61572e+06 shrink 590 1674 3.61572e+06 shrink 591 1682 3.61572e+06 shrink 592 1690 3.61572e+06 shrink 593 1698 3.61572e+06 shrink 594 1706 3.61572e+06 shrink 595 1714 3.61572e+06 shrink 596 1722 3.61572e+06 shrink 597 1730 3.61572e+06 shrink 598 1738 3.61572e+06 shrink 599 1746 3.61572e+06 shrink 600 1754 3.61572e+06 shrink 601 1762 3.61572e+06 shrink 602 1770 3.61572e+06 shrink 603 1778 3.61572e+06 shrink 604 1786 3.61572e+06 shrink 605 1794 3.61572e+06 shrink 606 1802 3.61572e+06 shrink 607 1810 3.61572e+06 shrink 608 1818 3.61572e+06 shrink 609 1826 3.61572e+06 shrink 610 1834 3.61572e+06 shrink 611 1842 3.61572e+06 shrink 612 1850 3.61572e+06 shrink 613 1858 3.61572e+06 shrink 614 1866 3.61572e+06 shrink 615 1874 3.61572e+06 shrink 616 1882 3.61572e+06 shrink 617 1890 3.61572e+06 shrink 618 1898 3.61572e+06 shrink 619 1906 3.61572e+06 shrink 620 1914 3.61572e+06 shrink 621 1922 3.61572e+06 shrink 622 1930 3.61572e+06 shrink 623 1938 3.61572e+06 shrink 624 1946 3.61572e+06 shrink 625 1954 3.61572e+06 shrink 626 1962 3.61572e+06 shrink 627 1970 3.61572e+06 shrink 628 1978 3.61572e+06 shrink 629 1986 3.61572e+06 shrink 630 1994 3.61572e+06 shrink 631 2002 3.61572e+06 shrink Exiting: Maximum number of function evaluations has been exceeded - increase MaxFunEvals option. Current function value: 3615717.104302