Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-3341

Behavior of empty reference arrays is inconsistent

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P1
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Windows 7 Enterprise 64-bit
      2012-11-28 build

      Description

      The syntax "field = {}" behaves differently for each resource:

      • Barycenter.BodyNames: resets to default
      • ForceModel.PointMasses: nothing
      • ForceModel.PrimaryBodies: resets to default
      • Formation.Add: not allowed
      • GroundTrackPlot.Add: empties list
      • ImpulsiveBurn.Tank: not allowed
      • ReportFile.Add: not allowed
      • Spacecraft.Tanks: not allowed
      • Spacecraft.Thrusters: not allowed
      • Thruster.Tank: not allowed
      • XYPlot.YVariables: not allowed

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              jjkparker Joel Parker created issue -
              jjkparker Joel Parker made changes -
              Field Original Value New Value
              Description The behavior of setting arrays of resource and parameter references is inconsistent from resource to resource.

              *Issue 1*:
              The syntax "ForceModel.PointMasses = {Mars, Sun}" _adds_ Mars and Sun to the point masses list. With all other fields of this type, it _replaces_ the contents. There is no way to remove a value from PointMasses through the script.

              *Issue 2*:
              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{GroundTrackPlot.Add}}, all fields in Mission Sequence
              * fails: {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              The behavior of setting arrays of resource and parameter references is inconsistent from resource to resource.

              *Issue 1*:
              The syntax "ForceModel.PointMasses = {Mars, Sun}" _adds_ Mars and Sun to the point masses list. With all other fields of this type, it _replaces_ the contents. There is no way to remove a value from PointMasses through the script.

              *Issue 2*:
              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{ForceModel.PrimaryBodies}}, {{GroundTrackPlot.Add}}, all fields in Mission Sequence
              * fails: {{ForceModel.PointMasses}}, {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              jjkparker Joel Parker made changes -
              Description The behavior of setting arrays of resource and parameter references is inconsistent from resource to resource.

              *Issue 1*:
              The syntax "ForceModel.PointMasses = {Mars, Sun}" _adds_ Mars and Sun to the point masses list. With all other fields of this type, it _replaces_ the contents. There is no way to remove a value from PointMasses through the script.

              *Issue 2*:
              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{ForceModel.PrimaryBodies}}, {{GroundTrackPlot.Add}}, all fields in Mission Sequence
              * fails: {{ForceModel.PointMasses}}, {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              The behavior of setting arrays of resource and parameter references is inconsistent from resource to resource.

              *Issue 1*:
              The syntax "ForceModel.PointMasses = {Mars, Sun}" _adds_ Mars and Sun to the point masses list. With all other fields of this type, it _replaces_ the contents. There is no way to remove a value from PointMasses through the script.

              *Issue 2*:
              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{ForceModel.PrimaryBodies}}, {{GroundTrackPlot.Add}}
              * fails: {{ForceModel.PointMasses}}, {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              * all fields succeed when set in the Mission Sequence (except {{ForceModel}})
              shughes Steven Hughes made changes -
              Description The behavior of setting arrays of resource and parameter references is inconsistent from resource to resource.

              *Issue 1*:
              The syntax "ForceModel.PointMasses = {Mars, Sun}" _adds_ Mars and Sun to the point masses list. With all other fields of this type, it _replaces_ the contents. There is no way to remove a value from PointMasses through the script.

              *Issue 2*:
              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{ForceModel.PrimaryBodies}}, {{GroundTrackPlot.Add}}
              * fails: {{ForceModel.PointMasses}}, {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              * all fields succeed when set in the Mission Sequence (except {{ForceModel}})



              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{ForceModel.PrimaryBodies}}, {{GroundTrackPlot.Add}}
              * fails: {{ForceModel.PointMasses}}, {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              * all fields succeed when set in the Mission Sequence (except {{ForceModel}})
              shughes Steven Hughes made changes -
              Summary Behavior of reference arrays is inconsistent Behavior of empty reference arrays is inconsistent
              shughes Steven Hughes made changes -
              Description


              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              *Issue 3*:
              The syntax:
              {noformat}
              field = {'value1' 'value2'} % notice quotes
              {noformat}
              is inconsistently handled:
              * works: {{Barycenter.BodyNames}}, {{ForceModel.PrimaryBodies}}, {{GroundTrackPlot.Add}}
              * fails: {{ForceModel.PointMasses}}, {{Formation.Add}}, {{ImpulsiveBurn.Tank}}, {{ReportFile.Add}}, {{Spacecraft.Tanks}}, {{Spacecraft.Thrusters}}, {{XYPlot.YVariables}}
              * all fields succeed when set in the Mission Sequence (except {{ForceModel}})

              The syntax "field = {}" behaves differently for each resource:
              * {{_Barycenter_.BodyNames}}: resets to default
              * {{_ForceModel_.PointMasses}}: nothing
              * {{_ForceModel_.PrimaryBodies}}: resets to default
              * {{_Formation_.Add}}: not allowed
              * {{_GroundTrackPlot_.Add}}: empties list
              * {{_ImpulsiveBurn_.Tank}}: not allowed
              * {{_ReportFile_.Add}}: not allowed
              * {{_Spacecraft_.Tanks}}: not allowed
              * {{_Spacecraft_.Thrusters}}: not allowed
              * {{_Thruster_.Tank}}: not allowed
              * {{_XYPlot_.YVariables}}: not allowed

              shughes Steven Hughes made changes -
              Assignee Linda Jun [ gmatloj ] Joel Parker [ jjkparker ]
              shughes Steven Hughes made changes -
              Fix Version/s R2013a [ 10201 ]
              jjkparker Joel Parker made changes -
              Fix Version/s R2013a [ 10201 ]
              jjkparker Joel Parker made changes -
              Link This issue duplicates GMT-2528 [ GMT-2528 ]
              jjkparker Joel Parker made changes -
              Resolution Duplicate [ 3 ]
              Status Open [ 1 ] Resolved [ 5 ]
              jjkparker Joel Parker made changes -
              Status Resolved [ 5 ] Closed [ 6 ]

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: