Skip to content

Commit 4705d28

Browse files
committed
up
1 parent 617be61 commit 4705d28

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/functions/rcsTools.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -285,19 +285,19 @@ function rcsAllocationSimplex!(y, u, My; maxIter=30)
285285
# end
286286

287287
# 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
290290

291291
# 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])
295295
e = zeros(m)
296296

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)
301301
eNew = zeros(n)
302302

303303
# Loop until all gradient components are positive

0 commit comments

Comments
 (0)