Skip to content

Duplicate generator can be added in Builder #929

Description

@Arthoni

Since generator identity is based on variableName.classUnit, two generators with identical parameters will have shared setting.
Forbid identical generator creation in Builder generator creation dialog ?

Activity

  1. changed the title [-]No limitations for generator identical creation in DevStudio[/-] [+]No limitations for generator identical creation in Builder[/+] on Feb 17, 2020
  2. changed the title [-]No limitations for generator identical creation in Builder[/-] [+]Duplicate generator can be added in Builder[/+] on Feb 17, 2020
  3. Arthoni commented on May 4, 2021

    @Arthoni
    MemberAuthor

    Reproduced bug:

    • Ambigious generator objects can be created: same unit class and same var name (happens even when value produced by generator is different)
    • They will make the simulation unable to run, and graph-related aesthetic information will be the same (appears at reload of the project) :
      • simulator box color
      • position in graphical view
  4. added this to the release-2.2.0 milestone on May 4, 2021
  5. Arthoni commented on May 5, 2021

    @Arthoni
    MemberAuthor

    Fundamental principle: a variable for a unit class can be produced by only one ware therefore two generators with same unit class and variable names should not be accepted.

    Case correctly handled at simulation level in Builder and CLI:

    * Checking consistency... [Error]
    
    OpenFLUID ERROR: var10 variable on unitsA produced by var10.unitsA.genscalar cannot be created 
    because it is already created
    
    • Fix: in Builder, add blocking check in generator creation dialog to forbid twin generator situation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions