Skip to content

Using copy_person creates duplicate IDs #880

@reneSchm

Description

@reneSchm

Bug description

Person::copy_person currently also copies the ID of the person.
Currently, this is fine, as the function is used exclusively to copy an entire population in the World copy ctor.

However, using this function to duplicate a person in the same populitaion leads to non-unique IDs, which could cause issues elsewhere.

Version

Any

To reproduce

  1. Create an instance of Person.
  2. Call copy_person and obtain a different instance sharing the same ID

Relevant log output

No response

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Assignees

Labels

class::bugBugs found in the softwareloc::backendThis issue concerns the C++ backend implementation.model::abmThis issue concerns any kind of agent-based model.prio::lowThe priority of this task is low. It is an interesting item but with low priority.

Type

No type

Projects

Status

Done (Total) 💯

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions