Skip to content

Commit

Permalink
synth data still unfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamstark committed Aug 29, 2024
1 parent f5e8e79 commit 9d829cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/fixup_synth_data_v2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,20 @@ function assign_child_relationships!(pers :: Vector{MiniPers}, stats::NamedTuple
parent.relationships[cn] = relationship_to_parent
end
end
pretty_table( rel_matrix(pers) )

for cn in children
child = pers[cn]
for pn in parents
parent = pers[pn]
for r in 1:n
child.relationships[r] =
one_generation_relationship( ;
relationship_to_parent = parent.relationships[cn],
parents_relationship_to_person = parent.relationships[r])
println( "r=$r pn=$pn")
if r != pn
child.relationships[r] =
one_generation_relationship( ;
relationship_to_parent = reciprocal_relationship(parent.relationships[pn]),
parents_relationship_to_person = parent.relationships[r])
end
end
end
# non 1st bu people. Nearest they can be is sibling, then othen
Expand Down
1 change: 1 addition & 0 deletions src/Definitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1530,6 +1530,7 @@ function one_generation_relationship( ;
relationship_to_parent :: Relationship,
parents_relationship_to_person :: Relationship ) :: Relationship
@argcheck relationship_to_parent in [
# This_Person,
Foster_child,
Step_son_or_daughter,
Son_or_daughter_incl_adopted,
Expand Down

0 comments on commit 9d829cb

Please sign in to comment.