Closed pixelzoom closed 1 year ago
Natural Selection is not currently a publication priority, so unassigning.
I reviewed these IOTypes and my questions with @zepumph on 7/25/2023, resulting in the above commits. Tested in the State wrapper, no errors, and manual inspection looks correct.
Closing.
IOTypes have evolved since 1.4 was published. Before 1.5 is published, we need to review and revise IOTypes for this sim.
The sim-specific IOTypes are:
Reference type serialization:
Data type serialization:
Dynamic element serialization involving a PhetioGroup:
Dynamic element serialization with no PhetioGroup (does that even make sense?):
Questions:
[x] Can I use the default
toStateObject
for BunnyCountsIO and ProportionsCountsIO?[x] Are GenePairIO, GenotypeIO, and PhenotypeIO really "dynamic element serialization"? They do not involved a PhetioGroup. They are values related to a Bunny instance, so should they be "data type serialization"?
[x] Why do GenePairIO, GenotypeIO, and PhenotypeIO use
applyState
instead offromStateObject
? Is it because their tandems also need to be restored? Is this a general pattern for 'Dynamic element serialization' that doesn't involve a PhetioGroup? Is the defaultfromStateObject
getting called, and what is it doing?[x] Is
required
still necessary with TypeScript, like in Phenotype.ts?[ ] Should I create OrganismIO, so that the IOType hierarchy matches the core class hierarchy? I.e.
Bunny extends Organism
andWolf extends Organism
.[ ] BunnyIO problems in #327