Jump to content

Total capsule duration when running during certain period


nurhazx

Recommended Posts

Hi All,

 

I want to calculate total duration of running machine between strainer replacement.

I am trying with formula below but getting error.

$series.setMaximumDuration(500day).aggregate(totalDuration("h"), $capsules.setMaximumDuration(500day), startKey(), 500day).toStep()

 

Note:

Purple capsule is a running condition

Yellow capsule is a time range between strainer replacement

Red capsule is a strainer replacement period

image.thumb.png.14bf1dd87dfe4e58b44e3cac7f9aa0e3.png

Link to comment
Share on other sites

  • Seeq Team

Since you already have identified:

  • When the equipment is running (Purple Condition)
  • Time periods that you want to aggregate within (Yellow Condition)

We should be able to accomplish this with a single Signal from Condition, using the 'Equipment Running' condition as the selected condition, total duration as the statistic, and the 'Time Between Replacement' condition as your bounding condition. The setup should look something like this:

image.png

If you prefer to do it in formula, the equivalent would be:

$equipmentRunning.setMaximumDuration(500day).aggregate(totalDuration("h"), $timeBetweenReplacement.setMaximumDuration(500day), durationKey())

If you still get an error from that let me know what it is.

Link to comment
Share on other sites

  • 2 months later...
  • Seeq Team
On 12/31/2023 at 8:19 AM, Philip said:

Hi,

I have a related question. Instead of the total duration of all the purple capsules within the filter replacement time range, suppose I want to know the % duration of Filter Time Range is does each purple capsule represent?

Hi Phillip, 

In that case you can select percent duration as summary statistic in you Signal from Condition tool. Choose the purple capsule as the first signal, and Filter time range as your bounding condition. 

Link to comment
Share on other sites

  • Seeq Team

You can refer to my screenshot below, as you can see that the brown capsules encloses all the purple capsules but it will calculate the % of time purple capsules within the brown capsules .

image.png

 

My guess is maybe you put the purple capsules as bounding condition. In that case, yes it will give a 100% result as screenshot below:

image.png

 

Let me know if this helps or maybe you can share screenshots of your workbench for me to understand better. Alternatively, you can also join our Office Hour session where you can discuss directly with our Analytics Engineer.

Link to comment
Share on other sites

You are correct. 

 

I'm interested in the proportion of Day condition, that EACH purple capsule consumes.

The way is works currently, is to sum the durations of all purple capsules within the Day and then report that % as a single value.

 

 

 

Link to comment
Share on other sites

  • Seeq Team

Ok, now I understand what you're trying to achieve. For this, you have to calculate the total duration separately and use Formula tool to manually calculate the Percent duration. 

1. calculate total duration for purple capsule

image.png

2. calculate the total duration for daily condition

image.png

3. calculate the percent duration using Formula tool.

image.png

It should generate result like this where you have value for each capsules. 

image.png

 

Let me know if this answer your question.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...