Skip to content

Commit 430c23e

Browse files
committed
fix type inst splx
1 parent 4feaf6f commit 430c23e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/functions/rcsTools.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -266,30 +266,30 @@ end
266266
#
267267
# Author: F. Capolupo
268268
# function rcsAllocationSimplex(u, My, c=ones(size(My, 2)); maxIter=30)
269-
mutable struct RcsAllocator{T}
270-
m::Int # Number of dof
271-
n::Int # Number of RCS
272-
My::Matrix{T}
273-
y::Vector{T}
274-
c::Vector{T}
275-
maxIter::Int
269+
mutable struct RcsAllocator
270+
m::Int64 # Number of DoF
271+
n::Int64 # Number of Thrusters
272+
My::Matrix{Float64}
273+
y::Vector{Float64}
274+
c::Vector{Float64}
275+
maxIter::Int64
276276

277277
# Allocations
278-
E::Matrix{T}
279-
∇z::Vector{T}
280-
e::Vector{T}
281-
iBase::Vector{Int}
282-
Yn::Vector{T}
283-
yb::Vector{T}
284-
Ymax::Vector{T}
285-
eNew::Vector{T}
286-
cs::Vector{T}
278+
E::Matrix{Float64}
279+
∇z::Vector{Float64}
280+
e::Vector{Float64}
281+
iBase::Vector{Int64}
282+
Yn::Vector{Float64}
283+
yb::Vector{Float64}
284+
Ymax::Vector{Float64}
285+
eNew::Vector{Float64}
286+
cs::Vector{Float64}
287287
end
288288

289289
function RcsAllocator(My, c=ones(size(My, 2)); maxIter=30, yMaxSlack=1e8, cSlack=1e3*maximum(c))
290290
m, n = size(My)
291-
Ymax = [ones(n); yMaxSlack*ones(m)]
292-
return RcsAllocator(m, n, My, zeros(n), c, maxIter, zeros(m, n), zeros(n), zeros(m), ones(Int, m), zeros(n + m), zeros(m), Ymax, zeros(n), cSlack*ones(m))
291+
Ymax = vcat(ones(n), fill(yMaxSlack, m))
292+
return RcsAllocator(m, n, My, zeros(n), c, maxIter, zeros(m, n), zeros(n), zeros(m), ones(Int64, m), zeros(n + m), zeros(m), Ymax, zeros(n), cSlack*ones(m))
293293
end
294294

295295
function rcsAllocationSimplex(u, My, c=ones(size(My, 2)); maxIter=30)

0 commit comments

Comments
 (0)