Skip to content

Commit

Permalink
v0.1.0.1 (ThummeTo#64)
Browse files Browse the repository at this point in the history
* minor adjustments for fmibase.jl

* fixed build-in sensitivities
  • Loading branch information
ThummeTo authored May 24, 2024
1 parent f8b9874 commit 6d5913c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FMICore"
uuid = "8af89139-c281-408e-bce2-3005eb87462f"
authors = ["TT <[email protected]>", "LM <[email protected]>", "JK <[email protected]>"]
version = "1.0.0"
version = "1.0.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
10 changes: 5 additions & 5 deletions src/FMI3/cfunc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function fmi3InstantiateModelExchange(cfunc::Ptr{Nothing},
instanceName, fmuInstantiationToken, fmuResourceLocation,
visible, loggingOn, instanceEnvironment, logMessage)

@debug "fmi3InstantiateModelExchange(instanceName: $(instanceName), fmuType: $(fmuType), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)"
@debug "fmi3InstantiateModelExchange(instanceName: $(instanceName), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)"
return status
end
export fmi3InstantiateModelExchange
Expand Down Expand Up @@ -56,7 +56,7 @@ function fmi3InstantiateCoSimulation(cfunc::Ptr{Nothing},
visible, loggingOn, eventModeUsed, earlyReturnAllowed, requiredIntermediateVariables,
nRequiredIntermediateVariables, instanceEnvironment, logMessage, intermediateUpdate)

@debug "fmi3InstantiateCoSimulation(instanceName: $(instanceName), fmuType: $(fmuType), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)"
@debug "fmi3InstantiateCoSimulation(instanceName: $(instanceName), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)"
return status
end
export fmi3InstantiateCoSimulation
Expand Down Expand Up @@ -88,7 +88,7 @@ function fmi3InstantiateScheduledExecution(cfunc::Ptr{Nothing},
visible, loggingOn, eventModeUsed, earlyReturnAllowed, requiredIntermediateVariables,
nRequiredIntermediateVariables, instanceEnvironment, logMessage, clockUpdate, lockPreemption, unlockPreemption)

@debug "fmi3InstantiateScheduledExecution(instanceName: $(instanceName), fmuType: $(fmuType), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)"
@debug "fmi3InstantiateScheduledExecution(instanceName: $(instanceName), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)"
return status
end
export fmi3InstantiateScheduledExecution
Expand Down Expand Up @@ -989,7 +989,7 @@ function fmi3GetDirectionalDerivative!(cfunc::Ptr{Nothing}, c::fmi3Instance,
nSeed::Csize_t,
sensitivity::AbstractArray{fmi3Float64},
nSensitivity::Csize_t)
@assert fmi3ProvidesDirectionalDerivatives(c.fmu) ["fmi3GetDirectionalDerivative!(...): This FMU does not support build-in directional derivatives!"]

status = ccall(cfunc,
fmi3Status,
(fmi3Instance, Ptr{fmi3ValueReference}, Csize_t, Ptr{fmi3ValueReference}, Csize_t, Ptr{fmi3Float64}, Csize_t, Ptr{fmi3Float64}, Csize_t),
Expand Down Expand Up @@ -1126,7 +1126,7 @@ This function can only be called in Model Exchange.
fmi3GetNumberOfEventIndicators must be called after a structural parameter is changed. As long as no structural parameters changed, the number of states is given in the modelDescription.xml, alleviating the need to call this function.
"""
function fmi3GetNumberOfEventIndicators!(cfunc::Ptr{Nothing}, c::fmi3Instance, nEventIndicators::Ref{Csize_t})
ccall(cfunc,
status = ccall(cfunc,
fmi3Status,
(fmi3Instance, Ptr{Csize_t}),
c, nEventIndicators)
Expand Down

0 comments on commit 6d5913c

Please sign in to comment.