add new task       

Task ID:  393  "Plant::Stage is registered twice"    
Created by admin on 2007-12-05 6:55 AM, 4091 days ago
Project:  Module Code
Category:  Bug
Priority:  medium
Assigned to:  hol353  
Status:  closed
Apsim Version:
Your Name:
Contact Details:

show inline images      show change history

 comment 31008 posted by hol353 on 2009-09-23 3:35 PM, 3432 days ago 
I couldn't reproduce this in Apsim 7.1 beta and I'm pretty sure I fixed this during the PLANT refactoring.
 comment 384 posted by admin on 2007-12-05 6:55 AM, 4091 days ago 
"Plant::Stage is registered twiceFrom Peter deVoil:(new line);(new line);He's complaining that "stage" is registered twice - once as a readable(new line);property, and once as a writeable property. Of course, he has a(new line);specialisation for just this case..(new line);(new line);-----Original Message-----
From: Moore, Andrew (PI, Black Mountain)
Sent: Monday, 3 September 2007 3:56 PM
To: Hargreaves, John (CSE, Toowoomba)
Cc: Holzworth, Dean (CSE, Toowoomba); Herrmann, Neville (PI, Black
Subject: RE: APSIM v5.4 beta 3

Thanks John, I'll give this a go.

What Pete de Voil suggests amounts to a re-definition of the protocol;
the specification is clear that each property in a component has a
single integer ID. It's OK to suggest such changes, but until and unless
a change to the spec. is agreed, the separate registrations are
non-compliant. The order of proceeding needs to be
suggest->agree->implement, not the other way around.

Dean, when you see this message would you please advise what can/should
be done to make the APSRU implementation comply with the protocol in
this respect?


-----Original Message-----
From: Hargreaves, John (CSE, Toowoomba)
Sent: Monday, 3 September 2007 3:20 PM
To: Moore, Andrew (PI, Black Mountain)
Subject: RE: APSIM v5.4 beta 3

Hi Andrew,

Dean has fled the country. Talked to Pete de Voil, the only other person
here who gets into the protocol stuff and he would prefer to have
separate registrations for read and write. He sees no need for a
read/write registration(4) and apparently APSIM protocol manager handles
the two separate registrations ok. We don't currently have in our C++
stuff a capability for plant to handle read/write. I will leave this
matter for you and Dean to sort out.

In the interim, I have changed the settable variable name in Plant to
"phase" (which is technically correct). So just set "phase" for now
instead of "stage", using the attached bootleg plant.dll. Let me know if
this works for you or not.


-----Original Message-----
From: Moore, Andrew (PI, Black Mountain)
Sent: Monday, 3 September 2007 12:57 PM
To: Hargreaves, John (CSE, Toowoomba)
Subject: RE: APSIM v5.4 beta 3

G'day John,

I've found a problem with APSIM v5.4 beta 3: the "stage" property of the
Plant component is registering itself twice under different IDs.
Property names are supposed to be unique within components.  

Perhaps one of the registrations is readable and the other writeable? If
so there needs to be a single "register" message sent instead, with the
"kind" field set to 4. The soilwat2.sw_dep property has this kind of

Would you look into this please?


Message trace file

Sim structure:

ungrazed  (paddock)
 .wheat  (aptrans)
   .model (plant)

ungrazed: Driver connections

== Driver OwnerID: ungrazed.wheat
         Name:    ungrazed.wheat.model.stage
         RegID:  32
         DestID:  0
         Type:    single
         AutoCon: 1
         #Con:    2
                   Connect:1]Version: Found By:Dean"