Jump to content

Please help! Trying to calculate carbon emissions from truck entities


Recommended Posts

Please help,

I am at a loss, I have been trying for hours now and I assume the solution to be very simple and I'm just overlooking it.

I have three entities going through my system; Ship, Truck and Train.

All three entities have different carbon emissions. I want to create a status label that shows the total carbon emissions per entity based on kilometers traveled in the system. The label should show something like 'ShipEntity.Totaldistancetraveled * 0.323 (or whatever co2 output is for that entity)'. However you can't set 'totaldistancetraveled' or record it with any variable for these entities, only the 'ModelEntity' that I didnt create myself but is always there when you start.

Also, I don't want to use vehicles. I just want to use entities through my system. 

Please help me. 

I have attached the model for your reference, I dont know if that is necessary or if it helps.

 

Kind regards,

Jason

Corridor Model 0.05.spfx

Link to comment
Share on other sites

Hi Jason,

If you just want to see the emissions for each Entity traveling through your Model, you could attach a Status Label to each Entity type displaying the TotalDistanceTraveled, or some calculation including it like TotalDistanceTraveled*0.323. To attach it just click on the Entity instance in Interactive mode and then draw the Status Label near it.

Or you could define State Variables like Ship_Dist, Truck_Dist, Train_Dist to keep track of total distance traveled for all Entities of each type. You would then define State Assignments at their final destination (Sink), or some Node along their path, to increment with NewValue of "Ship_Dist + ModelEntity.TotalDistanceTraveled" then compute the total emissions for each type at the end of the run. Note that you would need an Assign If 'Custom Condition' like 'ModelEntity.Is.ShipEntity' for this to work.

Happy modeling,
Adam

Link to comment
Share on other sites

 Share

×
×
  • Create New...