engine issueshttps://gitlab.kitware.com/physiology/engine/-/issues2019-06-03T09:24:16-04:00https://gitlab.kitware.com/physiology/engine/-/issues/15SEScalar, SEUnitScalar hierarchy issues2019-06-03T09:24:16-04:00Harald ScheirichSEScalar, SEUnitScalar hierarchy issuesThe systems `GetScalar()` function returns a `SeScalar`, but there is a mix of instances derived from `SEUnitScalar` and instances that are derived from `SEScalar`, but there isn't a way to check. `SEScalar` on the other hand doesn't hav...The systems `GetScalar()` function returns a `SeScalar`, but there is a mix of instances derived from `SEUnitScalar` and instances that are derived from `SEScalar`, but there isn't a way to check. `SEScalar` on the other hand doesn't have access to the unit of the scalar. This means there really doesn't seem to be a good way to determine what type the returned scalar has.
Introducing "unitless" as a unit and unifying the hierarchy or would make programatic access to scalars easier.https://gitlab.kitware.com/physiology/engine/-/issues/16`const` issues when calling `GetScalar()`2019-06-03T09:11:13-04:00Harald Scheirich`const` issues when calling `GetScalar()`when trying attach other software to Pulse the scalars look like a good generic ways to get information out of pule. `GetScalar()` is defined on `SESystem`, but the preferred way to get to systems seems to be the `GetSystem...` calls on ...when trying attach other software to Pulse the scalars look like a good generic ways to get information out of pule. `GetScalar()` is defined on `SESystem`, but the preferred way to get to systems seems to be the `GetSystem...` calls on the engine. e.g. `GetCardioVascularSystem()`. This call returns a `const *`, `GetScalar()` is not const so to use it the const has to be cast away which is usually not a thing that seems like a good ideahttps://gitlab.kitware.com/physiology/engine/-/issues/26maven support for java pulse2021-01-17T13:26:21-05:00Bob Mariniermaven support for java pulseMost modern Java applications use a dependency manager like maven or gradle to pull in direct and transitive dependencies automatically (making the effort in #25 much easier). This means (ideally) users don't even need to download and bu...Most modern Java applications use a dependency manager like maven or gradle to pull in direct and transitive dependencies automatically (making the effort in #25 much easier). This means (ideally) users don't even need to download and build pulse -- they just add it as a dependency in their application, and everything needed is automatically pulled down from a public maven repo (like maven central). Indeed, I have wrapped pulse as a maven artifact for use in my application, which is what enabled me to (more) easily track down all the transitive dependencies in #25. (Note that nearly all dependency managers are compatible with maven artifacts, so the choice of maven is not forcing anything on applications.)
I'm using two files to do this:
* [pom.xml](/uploads/75dbff5619586b4eb912d1308da8a088/pom.xml): this is the actual maven configuration that defines the pulse version and direct dependencies
* [setup-pulse.bat](/uploads/2fb70fc5d5a3873dc3b3d16d6836005e/setup-pulse.bat): a windows .bat file that executes the needed maven commands to install pulse in a local repo (this is a stand-in for a remote repo, like maven-central).
Note that not only does this package up the pulse jar, it also creates source and javadoc jars, which is super nice when using an IDE, as you can jump directly into the pulse java code without having to manually attach source (or even have the source separately at all).
Some additional work would be needed to make this usable in a more general environment:
* To put it on maven central (I can help with this):
* Get a maven central account -- this is actually something that someone on their end needs to do manually, but they can usually turn it around in a couple days.
* Maven central has certain requirements: the pom needs author information, the jars need to be signed, deployment repos need to be defined, etc. This is one of those things that is a pain to setup the first time, but then doesn't need to be touched after that.
* First upload to maven central: There are automatic checks that take place for the things above -- once you pass the checks, someone on their end will manually approve the jar and post it. Future updates are completely automatic.
* The native libs:
* I'm currently building those using the standard cmake process, and just making sure that they end up in the right place on my machine for pulse to to find them when I run my application (hence the `xcopy` line in setup.bat). We could require that people do this themselves. This also makes it easy to switch between release and debug versions of pulse, because you just have to make sure that the right shared libraries are in the right place.
* This is not a very friendly way to deploy the pulse jar and is not in the spirit of maven (it's technically against maven central's requirements, but they have no way to enforce). The expectation is that the jar should "just work" when added as a dependency.
* The better way to do this is to package the required shared libs for all supported platforms in the pulse jar file, and at runtime the platform is detected and the correct shared libs are extracted from the jar and placed where they can be found by the jar. There's also a question of release vs. debug versions, so either you could have two different pulse jars (each deployed separately on maven central), maybe pulse and pulse-debug, or else you put both versions in the jar and allow the user to specify which one they want (e.g., `jniBridge.initialize()` could be modified to take an argument).
* An example of a java library that does this is [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc), which is a java wrapper for the sqlite C library. If you download the sqlite-jdbc-3.31.1.jar file (available [here](https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.31.1/)) and unzip it, you can see they've put native shared libraries in the `org/sqlite/native` directory. I think the main code they use to extract the libraries is [here](https://github.com/xerial/sqlite-jdbc/blob/0c47e5d7ef62dec692523cbde138b9054c9cee91/src/main/java/org/sqlite/SQLiteJDBCLoader.java) -- it looks like the primary methods of interest are `loadSQLiteNativeLibrary()` and `extractAndLoadLibraryFile()`.
* Note that sqlite-jdbc includes support for a LOT of different platforms, and even has a pure java version in case the native versions fail to load. I think that's way overkill for you -- you could just include the 3 major platforms, all 64-bit, and if someone wants to run on something else, they can build pulse manually like is currently required.https://gitlab.kitware.com/physiology/engine/-/issues/37CMake Build Issues with Protobuf while Cross Compiling2022-06-06T09:30:41-04:00Jeremy MartinCMake Build Issues with Protobuf while Cross CompilingHello,
I am attempting to crosscompile Pulse for Android. I followed the instructions using Dockcross for arm-64 and x86 and received issues in the build step while generating the protobuf classes.
I am building on centos-7.
For the arm-...Hello,
I am attempting to crosscompile Pulse for Android. I followed the instructions using Dockcross for arm-64 and x86 and received issues in the build step while generating the protobuf classes.
I am building on centos-7.
For the arm-64 I receive an error saying there is a syntax error in the proto file.
/work/pulse_build/External/protobuf/install/bin/protoc-3.18.0.0: 1: Syntax error: ";" unexpected
For the x86 build I receive no error initially until I add in the return value in the CMakeLists. I then get this error:
rv='No such file or directory'
In both cases, I can see and confirm that protobuf built correctly from the superbuild. These builds then fail unable to locate the generated protobuf classes for compiling.
When I build locally following the readme instructions, I have no problem building.
Any advice on how to get the build for android working correctly?https://gitlab.kitware.com/physiology/engine/-/issues/38[DOC] Add unit test instructions2023-03-10T13:22:23-05:00Alex Rockhill[DOC] Add unit test instructionsPer @aaron.bray 's comment, unit test documentation should be added under `How to perform verification and validation`
Related to https://github.com/openjournals/joss-reviews/issues/4929Per @aaron.bray 's comment, unit test documentation should be added under `How to perform verification and validation`
Related to https://github.com/openjournals/joss-reviews/issues/4929https://gitlab.kitware.com/physiology/engine/-/issues/39[DOC] Add information about classes2023-06-25T08:55:05-04:00Alex Rockhill[DOC] Add information about classesIt would be helpful to know what each class does and spell out acronyms and abbreviations of the class name so that the function of the class is readily understandable. It seems like most of the information for how to actually use the cl...It would be helpful to know what each class does and spell out acronyms and abbreviations of the class name so that the function of the class is readily understandable. It seems like most of the information for how to actually use the classes is here for instance https://gitlab.kitware.com/physiology/engine/-/wikis/Creating%20an%20Action, so that's very helpful and covers a lot of what you'd need to add a merge/pull request. However, an exhaustive list of the API entries and what they are used for would be very helpful for extending beyond the boilerplate solutions in the wiki to more advanced use cases.
https://github.com/openjournals/joss-reviews/issues/4929https://gitlab.kitware.com/physiology/engine/-/issues/44Pulse bad state2023-06-20T11:02:55-04:00marinierPulse bad stateGenerally when something in pulse gets into a bad state, it seems to correct it (e.g., if something goes negative it will often change it to 0). I recently did a very long run (>2 days of sim time), and the run ended with this error:
``...Generally when something in pulse gets into a bad state, it seems to correct it (e.g., if something goes negative it will often change it to 0). I recently did a very long run (>2 days of sim time), and the run ended with this error:
```
[ERROR] [198207(s)] SEScalar0To1 must be between [0,1]
```
Unfortunately, it doesn't indicate which scalar this happened to.
For this run I build from the latest on the integration branch (commit b4118c79d) using the `Soldier@0s.json` model with no injuries or anything. The only thing that happens is that every time the urine volume reaches 200 mL, the urinate action takes place. (We're trying to model dehydration.) I then let it run for a long time until it eventually stopped itself with the above error.
Long before that happens, these errors happen repeatedly, but don't cause the run to fail:
```
[WARN] [198207(s)] GeneralMath::CalculateConcentration: Volume is negative:-1223.6 mL. Setting it to 0.
[ERROR] [198207(s)] Compartment : SkinTissueExtracellular, Substance : Oxygen
[WARN] [198207(s)] GeneralMath::CalculateConcentration: Volume is negative:-1223.6 mL. Setting it to 0.
[ERROR] [198207(s)] Compartment : SkinTissueExtracellular, Substance : CarbonDioxide
[WARN] [198207(s)] GeneralMath::CalculateConcentration: Volume is negative:-1223.6 mL. Setting it to 0.
[ERROR] [198207(s)] Compartment : SkinTissueExtracellular, Substance : Nitrogen
```
Here's the complete log (compressed because uncompressed it's > 1 GB due to the above warnings/errors being repeated so much).
[pulse.7z](/uploads/121ee8765287c5ad444eb036af3541cf/pulse.7z)
This is by no means blocking me or anything, it's just for you guys if you wanted to track down what was causing this.