Skip to content

Commit 8b5a5dd

Browse files
committed
bugfix
1 parent 3569017 commit 8b5a5dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/functions/rcsTools.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ function rcsAllocationSimplex(u, My, c=ones(size(My, 2)); maxIter=30)
282282
cs = 1e3*maximum(c)*ones(m) # [m x 1] Slack variables cost vector
283283

284284
# Setup the initial solution
285-
E = -diagm(xsign.(u))*My # [m x n]
286-
∇z = c + 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])
287-
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
288-
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])
289-
yb = abs.(u) # [m x 1] Basis vector (i.e., y of the m thrusters that form the basis)
290-
Ymax = [ones(n); 1000*ones(m)] # [n+m x 1] Parameters upper bounds, 0 <= Y <= Ymax, where Y = [y; s]
285+
E = -diagm(xsign.(u))*My # [m x n]
286+
∇z = c + 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])
287+
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
288+
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])
289+
yb = abs.(u) # [m x 1] Basis vector (i.e., y of the m thrusters that form the basis)
290+
Ymax = [ones(n); (maximum(yb) + 1.0)*ones(m)] # [n+m x 1] Parameters upper bounds, 0 <= Y <= Ymax, where Y = [y; s]
291291
eNew = zeros(n)
292292

293293
# Loop until all gradient components are positive

0 commit comments

Comments
 (0)