# 4.x Release Coming Soon!

**URL:** https://discourse.kitware.com/t/4-x-release-coming-soon/712
**Category:** Pulse Physiology Engine
**Created:** [September 7, 2021, 2:22pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712 "2021-09-07T14:22:06Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [September 7, 2021, 2:22pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/1 "2021-09-07T14:22:06Z")

</div>

Hi Pulse Community,

A new version of Pulse is coming out towards the end of this month.  
We have added a new BVM system and our Mechanical Ventilator has gone through an extensive validation phase and is ready for the community to use. We also are finalizing a few new drugs, and we have also upgraded to using C++17.

We will bump up our Major version to 4 with this release.  
In general, the API is staying the same, but we are really striving to have our C++/C#/Java/Python APIs consistent, so there may be a few odds and ends updated that will require a code change.

The biggest contributing factor to 4.x API changes was in finalizing our architectural support for different physiology engines. We started this move when we began 3.x, and we now have finalized those changes with the implementation of a second engine. There is a bit of reshuffling of include files from the original 3.x design, but overall multiple engine support is working pretty well.

Our new engine is the Ventilation Mechanics engine. This engine is _not_ a whole body physiology engine, but only encapsulates our respiratory and mechanical ventilation systems. Creating this engine helped us to exercise our ability to break up, extend, and group various model implementations into a specific physiology engine. This break up also helped us to validate our improved respiratory and ventilation models.

We don’t anticipate the ventilation mechanics engine being used by applications, but this framework will serve as the foundation for future whole body physiology engines, such as a pediatric engine. All of our supported languages support the ability to specify the back end engine model. You still use Pulse the same way, but now when you instantiate an engine, you can specify the back end physiology models to use.

`PulseEngine pulse = new PulseEngine(eModelType.HumanAdultWholeBody);`  
or  
`PulseEngine pulse = new PulseEngine(eModelType.HumanAdultVentilationMechanics);`

_(default is the HumanAdultWholeBody engine models)_

We are still adding in some namespaces and updating Java and Python interfaces, but if you have the time, [check out our 4.x branch](https://gitlab.kitware.com/physiology/engine/-/tree/4.x) and let us know if you run into any issues or have any suggestions.

Thanks!

---

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [September 8, 2021, 3:29pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/2 "2021-09-08T15:29:18Z")

</div>

This sounds great! I actually came to ask about BVM, and here it is in the new version 🙂

I’m updating my code to give the new version a try. Where has the Java enum `com.kitware.pulse.engine.PulseCompartments.Vascular` ended up? I’m using it to specify the compartment for a hemorrhage action. (I realize I can use a string, but this prevents typos 🙂

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [September 8, 2021, 3:37pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/3 "2021-09-08T15:37:40Z")

</div>

I believe I took out the Vascular class with the compartments  
I noticed that it was waaaay out of date,  
I suppose maybe I should figure out a way to make enums for all Pulse compartment for all our supported languages…

For hemorrhagable compartments though, I think I can add enum for those specific compartments we recommend you bleed at… technically you could bleed at any vascular compartment… but some make more sense than others… let me look at that

Also, I just pushed a Java update to the branch  
[https://gitlab.kitware.com/physiology/engine/-/tree/feature/respiratory\_mechanics/](https://gitlab.kitware.com/physiology/engine/-/tree/feature/respiratory_mechanics/)

I changed up the way DataRequests work in Java to be more similar to Python and C#

I will probably change up a few other function naming patterns to be more consistent here in the next few days.

---

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [September 8, 2021, 4:55pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/4 "2021-09-08T16:55:09Z")

</div>

Ok! An enum would be great. I’m assuming it would more-or-less reflect the list at bottom of the [cardiovascular methodology page](https://pulse.kitware.com/_cardiovascular_methodology.html)?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [September 8, 2021, 5:00pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/5 "2021-09-08T17:00:20Z")

</div>

Probably more like the compartment options offered in the explorer

[https://gitlab.kitware.com/physiology/explorer/-/blob/2.x/src/controls/actions/HemorrhageWidget.cxx#L48](https://gitlab.kitware.com/physiology/explorer/-/blob/2.x/src/controls/actions/HemorrhageWidget.cxx#L48)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [September 9, 2021, 12:53pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/6 "2021-09-09T12:53:11Z")

</div>

Ok 4.x has the latest java updates  
We will keep respiratory\_mechaincs open to do documentation

4.x also has the hemorrhage compartment enum  
Check it out and let me know

Also, big change where I renamed `reset` methods to `clear` to be more consistent with other language API’s

---

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [September 24, 2021, 2:37pm UTC](https://discourse.kitware.com/t/4-x-release-coming-soon/712/7 "2021-09-24T14:37:55Z")

</div>

Sorry for the delayed reply – the new enum works great, and I really like the new way of creating data requests in Java – much cleaner!
