You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/functions/rcsTools.jl
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -285,19 +285,19 @@ function rcsAllocationSimplex!(y, u, My; maxIter=30)
285
285
# end
286
286
287
287
# maxIter = 30#3m + 1 # was 3m + 10, but needed to heuristically increase a bit
288
-
# cs = 1e3*maximum(c)*ones(m) # [OLD with c] [m x 1] Slack variables cost vector
289
-
cs =1e3*ones(m) # [m x 1] Slack variables cost vector
288
+
# cs = 1e3*maximum(c)*ones(m) # [OLD with c] [m x 1] Slack variables cost vector
289
+
cs =1e3*ones(m) # [m x 1] Slack variables cost vector
290
290
291
291
# Setup the initial solution
292
-
E =-diagm(xsign.(u))*My # [m x n]
293
-
# ∇z = c + E'*cs # [OLD with c] [n x 1] Cost change when bringing in the base a thruster which is out of the basis (i.e., increasing Yn[i])
294
-
∇z =1.0.+ E'*cs # [n x 1] Cost change when bringing in the base a thruster which is out of the basis (i.e., increasing Yn[i])
292
+
E =-diagm(xsign.(u))*My # [m x n]
293
+
# ∇z = c + E'*cs # [OLD with c] [n x 1] Cost change when bringing in the base a thruster which is out of the basis (i.e., increasing Yn[i])
294
+
∇z =1.0.+ E'*cs # [n x 1] Cost change when bringing in the base a thruster which is out of the basis (i.e., increasing Yn[i])
295
295
e =zeros(m)
296
296
297
-
iBase =Integer.(n+1:n+m) # [m x 1] Global indices (i.e., within the vector Y) of thrusters in the basis. Initial solution is y = s
298
-
Yn =zeros(n + m) # [n+m x 1] Thrusters out of the basis, either at zero (Yn[i] = 0) or at max (Yn[i] = Ymax[i])
299
-
yb =abs.(u) # [m x 1] Basis vector (i.e., y of the m thrusters that form the basis)
300
-
Ymax = [ones(n); 1e3*maximum(yb)*ones(m)] # [n+m x 1] Parameters upper bounds, 0 <= Y <= Ymax, where Y = [y; s] TODO: Caution, this was creating problems when it was (maximum(yb) + 1.0)
297
+
iBase =Integer.(n+1:n+m) # [m x 1] Global indices (i.e., within the vector Y) of thrusters in the basis. Initial solution is y = s
298
+
Yn =zeros(n + m) # [n+m x 1] Thrusters out of the basis, either at zero (Yn[i] = 0) or at max (Yn[i] = Ymax[i])
299
+
yb =abs.(u) # [m x 1] Basis vector (i.e., y of the m thrusters that form the basis)
300
+
Ymax = [ones(n); 1e8*ones(m)] # [n+m x 1] Parameters upper bounds, 0 <= Y <= Ymax, where Y = [y; s] TODO: Caution, this was creating problems when it was (maximum(yb) + 1.0)
0 commit comments