Entity activation time

A place for Ventity software questions & answers
Post Reply
Amistra
Junior Member
Posts: 12
Joined: Mon Jun 18, 2018 10:57 pm
Vensim version: DSS

Entity activation time

Post by Amistra »

Hi, I've attached a small example I'm using to help me understand how to use the time column with tidy data to activate model entities. The issue is with entities passing data to another entity type, where the reference is based on a compound key.

The original issue was showing up as null reference warnings, although I was able to work through most of them by making sure the activation time in the Stage 1 entity type is the same as the activation time in the Stage 2 entity type.

There is one last null reference that has me very puzzled. It doesn't resolve when I make the activation time the same in Stage 1 and Stage 2 (=4 in both entity initialization data). Also, when the activation time is different (=5) in Stage 1, the null reference warning changes the value of half the compound key (from HG D to HG B) for Stage 1 entity Harvester 8|HG D. When I make both Stage 1 and Stage 2 activation times = 4, the correct compound key pair is shown in the warning.

I understand the reference for Stage 1 entity Harvester 8|HG D to Stage 2 entity Maker 2|MG B makes it a many to many reference so I need an intermediate entity type to make it work. The question is why do I get warnings when the Stage 1 entity activation time is later than the referenced Stage 2 entity activation time? I'm concerned that this would occur If the Stage 1 entity was created by a Trigger/Action after the Stage 2 entity activation time.

Hope this makes sense...

cheers, Al
Attachments
Entity Coordination Question.zip
(24.87 KiB) Downloaded 118 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Entity activation time

Post by tomfid »

I'll take a look.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Entity activation time

Post by tomfid »

The HG B/D mixup looks like a bug to me. Checking with the devs.

However, it's not clear to me that compound keys are needed here, at least for S1. Every S1 Factory is unique, so the group isn't needed to find the factory.
Amistra
Junior Member
Posts: 12
Joined: Mon Jun 18, 2018 10:57 pm
Vensim version: DSS

Re: Entity activation time

Post by Amistra »

Thanks Tom. Yes, the problem occurred in my big model with compound keys so I built the example using them in case they were somehow implicated. They weren't :-)
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Entity activation time

Post by tomfid »

Just walked through with the debugger.

The first try fails due to loading sequence and issues the error message too soon. The automatic retry works. The bug is that the error message is wrong -- there is not a real problem.
We can get you a nightly build when the fix is included.
Amistra
Junior Member
Posts: 12
Joined: Mon Jun 18, 2018 10:57 pm
Vensim version: DSS

Re: Entity activation time

Post by Amistra »

Thanks Tom, glad the devs figured it out. No need to send a night build, the issue was a result of dumb behaviour so I stopped doing that.

cheers, Al
Post Reply