Skip to content

Commit

Permalink
v0.1.0.1 (#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 committed 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 <tobias.thummerer@informatik.uni-augsburg.de>", "LM <lars.mikelsons@informatik.uni-augsburg.de>", "JK <josef.kircher@student.uni-augsburg.de>"]
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

2 comments on commit 6d5913c

@ThummeTo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107560

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.1 -m "<description of version>" 6d5913cb33a5db1c0e5c42e3c8088f81d9c501bb
git push origin v1.0.1

Please sign in to comment.