File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,14 @@ function rcsAllocationSimplex!(r::RcsAllocator, u)
350350 # Find the non-basis thruster that is candidate to enter the basis
351351 # The thrusters which maximize '∇z' is invited in the basis
352352 # (and if ∇zMin > 0, i.e. if there is still room for improvement)
353- ∇zMin, iIn = findmin (first, ∇z)
353+ ∇zMin = ∇z[1 ]; iIn = 1
354+ @inbounds for i in 2 : n
355+ if ∇z[i] < ∇zMin
356+ ∇zMin = ∇z[i]
357+ iIn = i
358+ end
359+ end
360+ # ∇zMin, iIn = findmin(first, ∇z)
354361 if ∇zMin ≥ 0.0 ; break ; end # No further improvement possible
355362
356363 # Determine the candidate base thrusters to leave the basis
@@ -464,7 +471,9 @@ function rcsAllocationSimplex!(r::RcsAllocator, u)
464471 E[i, j] += ei * eNew[j]
465472 end
466473 end
467- E[jOut, :] = eNew
474+ @inbounds for i in eachindex (eNew)
475+ E[jOut, i] = eNew[i]
476+ end
468477 end
469478 end
470479
You can’t perform that action at this time.
0 commit comments