Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in error message #115

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/convert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""
getState(solution::FMUSolution, i::fmi2ValueReferenceFormat; isIndex::Bool=false)

Returns the solution state for a given value reference `i` (for `isIndex=false`) or the i-th state (for `isIndex=true`).
Returns the solution state for a given value reference `i` (for `isIndex=false`) or the i-th state (for `isIndex=true`).
"""
function getState(solution::FMUSolution, vrs::fmi2ValueReferenceFormat; isIndex::Bool=false)

Expand All @@ -28,11 +28,11 @@ function getState(solution::FMUSolution, vrs::fmi2ValueReferenceFormat; isIndex:
for i in 1:length(solution.component.fmu.modelDescription.stateValueReferences)
if solution.component.fmu.modelDescription.stateValueReferences[i] == vr
push!(indices, i)
found = true
found = true
break
end
end
@assert found "Couldn't find the index for value reference `$(vr)`! This is probaly because this value reference does not belong to a system state."
@assert found "Couldn't find the index for value reference `$(vr)`! This is probably because this value reference does not belong to a system state."
end
end

Expand All @@ -58,7 +58,7 @@ export getState
"""
getStateDerivative(solution::FMUSolution, i::fmi2ValueReferenceFormat; isIndex::Bool=false)

Returns the solution state derivative for a given value reference `i` (for `isIndex=false`) or the i-th state (for `isIndex=true`).
Returns the solution state derivative for a given value reference `i` (for `isIndex=false`) or the i-th state (for `isIndex=true`).
"""
function getStateDerivative(solution::FMUSolution, vrs::fmi2ValueReferenceFormat; isIndex::Bool=false, order::Integer=1)
indices = []
Expand All @@ -79,11 +79,11 @@ function getStateDerivative(solution::FMUSolution, vrs::fmi2ValueReferenceFormat
for i in 1:length(solution.component.fmu.modelDescription.stateValueReferences)
if solution.component.fmu.modelDescription.stateValueReferences[i] == vr
push!(indices, i)
found = true
found = true
break
end
end
@assert found "Couldn't find the index for value reference `$(vr)`! This is probaly because this value reference does not belong to a system state."
@assert found "Couldn't find the index for value reference `$(vr)`! This is probably because this value reference does not belong to a system state."
end
end

Expand All @@ -108,7 +108,7 @@ export getStateDerivative
"""
getValue(solution::FMU2Solution, i::fmi2ValueReferenceFormat; isIndex::Bool=false)

Returns the values for a given value reference `i` (for `isIndex=false`) or the i-th value (for `isIndex=true`).
Returns the values for a given value reference `i` (for `isIndex=false`) or the i-th value (for `isIndex=true`).
Recording of values must be enabled.
"""
function FMIBase.getValue(solution::FMUSolution, vrs::fmi2ValueReferenceFormat; isIndex::Bool=false)
Expand All @@ -131,11 +131,11 @@ function FMIBase.getValue(solution::FMUSolution, vrs::fmi2ValueReferenceFormat;
for i in 1:length(solution.valueReferences)
if solution.valueReferences[i] == vr
push!(indices, i)
found = true
found = true
break
end
end
@assert found "Couldn't find the index for value reference `$(vr)`! This is probaly because this value reference does not exist for this system."
@assert found "Couldn't find the index for value reference `$(vr)`! This is probably because this value reference does not exist for this system."
end
end

Expand All @@ -161,7 +161,7 @@ export getValue
"""
getTime(solution::FMU2Solution)

Returns the points in time of the solution `solution`.
Returns the points in time of the solution `solution`.
"""
function getTime(solution::FMUSolution)
if !isnothing(solution.states)
Expand All @@ -172,4 +172,4 @@ function getTime(solution::FMUSolution)
return nothing
end
end
export getTime
export getTime