'calculating all the the values of a flow in anylogic

I am writing an economic project in anylogic. I want to sum all the money that flows between two stocks, in fact I need to sum all the values that a flow get during simulation, till a specific condition, how can I do that?

Thanks



Solution 1:[1]

Well, you need to be careful to understand how system dynamics works: it is a continuous process!

If you want to track your flows, the easiest option is to use a dataset object which tracks the flow at specific points in time.

Below, a flow "AdoptionRate" is tracked by dataset "AdoptersDS" every 0.1 minutes: enter image description here

However, be aware that this tracks the flow at specific points in time. You can set up similar datasets for your stocks as well.

Alternatively, you could write a recurring event which stores the values at specific points in time into your build-in database.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Benjamin