Variable maximum content reservoir

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Bramvs
Posts: 3
Joined: Monday 16 April, 2012 - 11:24

Variable maximum content reservoir

Post by Bramvs »

Dear ED Community,

The maximum capacity in a silo (reservoir) in my simulation is based on the incoming product e.g.:
- Product 1 = 200 tonnes
- Product 2 = 150 tonnes
- Product 3 = 180 tonnes.

However the maximum content of the silo (reservoir) is not editable 4D script. In which way is it possible to make the capacity variable based on the incoming product?

Thank you in advance.
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Variable maximum content reservoir

Post by marlies »

Hi,

A quick solution could be to influence the attribute capacity of the reservoir: att([capacity], c) := value

Better would be to adjust the measuring unit where you can use 4Dscript. Assume your products have a label weight. Then the measuring unit could be:

Case(
label([producttype], cs),
200/200 * label([weight], cs),
200/150 * label([weight], cs),
200/180 * label([weight], cs)
)

Regards,

Marlies
Post Reply