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

Optimal Control Cleanup/Useablity Part II

    Details

    • Sprint:
      R2019a

      Description

      === General

      • [OWNER] static analysis/memory checker
      • (WCS) Need defaults on optimizer settings.. If you don't set them, an exception is thrown. Additionally error messages for
        optimizer settings don't include the object name: "LowThrust Exception Thrown: Empty Iterations Limit" thePhase.MaxRelativeErrorTolerance = 1e-7 is a valid setting but is rejected and does not throw an specific error message just thePhase.MaxRelativeErrorTolerance = 1e-7
      • (DJC) will move remaining PenUp/Down issue (XYPlot when solverIterations=All draws lines connected) to new ticket?
      • [JJR] The message window font is proportional rather than fixed-width, causing formatting issues for the CSALT data that is printed during and after a run. Copying and pasting this text to a separate text editor shows what the formatting should actually look like.
      • [P1] (WCS) SPAD bugs
        ForceModel_SPAD_SRP_1deg_Bilinear_Moon
        ForceModel_SPAD_Drag_1deg_Bicubic_LEO
        ForceModel_SPAD_Drag_SRP_1deg_Bicubic_LEO

      === Validation/Save Issues

      • (WCS)If the user gives a control vector bounds array that has four elements, and the guess only has three controls, they get a cryptic error message
        about array being out of bounds. Need to clean up the error message -
        • (WCS) NOTE: remaining issue is case where size of bounds vectors does not equal number of guesses. Validate that number of states/controls in guess (.och file) matches sizes of arrays for bounds for states and controls.
      • [JJR] Renaming does not work - RenameRefObject was added to DynamicsConfiguration but at least XyPlot and ReportFile show default 21545 value for A1ModJulian (accessing erroneous GmatState?) instead of correct values, though the correct values are Published

      === Fixed

      • [JJR]Nonsupported function type on OptimalControlFunction does not throw error.
      • [SPH]Fix the issue that requires having unused control variables for coast phases that results in Empty Column in Jacobian
      • [DJC]Crash after run is complete
      • (WCS) When saving a script with a Trajectory, there is an error reported and the script is not written: GmatBase Exception Thrown: Cannot get string parameter with ID 6: "AddBoundaryFunction" on Trajectory named "traj" I believe this is fixed WCS
      • (WCS) When saving a script with an EmtgInterface, this error is reported: Writing of "IntegerArray" type is not handled yet for object "emtgThrustModel" of type "EmtgInterface". * I believe this is fixed WCS
      • (WCS) Cost function lower bound seems to default to -99999.99 and 999999.99.
        It should be +Inf -Inf
      • (WCS) Scale mode on Trajectory should default to canonical and that should be the only allowed value for now
      • (WCS) Rename GmatGuess to OptimalControlGuess
      • (WCS) When a CSALT script is saved, ModJulian epochs on the phase do not load properly, e.g. **** ERROR **** Gregorian date "34508.50042863868" is not valid. in line:
        " 146: GMAT thePhase.EpochLowerBound = '34508.50042863868';"
      • (WCS) SNOPT filename on Trajectory is hard coded "TestOutputDataFile.txt". Should use file manager with user defined function name - NOTE SNOPTOutputFile.txt is just the default name. The code will now use the user-input name and write it using FileManager path order.
      • (WCS) Saving the script named LISATransfer_SingleSat.script results in numerous parse errors
        • The Phase times won't parse because they are surrouned in quotes
        • The epoch format setting is output after the bounds, and so the bounds won't parse because they are not not in the default format
        • The collocate command line is not written out
      • (WCS) Errors in OCH files throw really bad errors. We need to throw useful error messages. write the line where the error was encountered.
        If the line needs more data, indicate how many data elements were expected. OCH files without DATA_STOP tag parse, they should throw an exception - NOTE: Moved to GMT-6899
      • (WCS)When a trajectory does not have a GuessSource, there is a bad error message " Interpreter Exception: Nonexistent
        "" referenced in the Trajectory "traj". This should have a line number and not have empty parentheses.
        Also, I believe the guess source may not be required.
        • (WCS)This appears to be fixed - source is not required on Trajectory if all phases have a source and error message when all are missing is good.
      • (JJR) Missing ".Initial" on PC Launch phase list causes GMAT to crash: PatchedConicLaunchConstraint.PhaseList = {Phase_PatchedConicLaunch}
      • (JJR)Final should not be allowed for PC Launch phase location: PatchedConicLaunchConstraint.PhaseList = {Phase_PatchedConicLaunch.Final}
      • (JJR) Phase list not saved for patch conic launch when saving from GUI
      • (JJR) The PhaseList field on an optimal control function appears to function as an Add field. This script
        Create OptimalControlFunction cometArrivalBound;
        cometArrivalBound.Function = CelestialBodyRendezvous;
        cometArrivalBound.Type = AlgebraicConstraint;
        cometArrivalBound.PhaseList = {thrustToCometArrival.Final}
        cometArrivalBound.PhaseList = {thrustToCometArrival.Final}


        throws this error
        CSALT Interface Exception: Exception from the CSALT core library: The number of phase dependencies assigned does not match the number of points in OptimalControlFunction "cometArrivalBound"
        This is because the phaseNames data member on ScriptedOptimalControlFunction is 2 when it should be 1.

      === EMTG interface

      • If nothing is provided to the EmtgInterface field PropulsionSystem, an empty string is used to search for a propulsion system, causing a subscript out of range error in a debug build but not in a release build (found using Windows) - this caused a crash on Mac as well but I think this goes away as this field is not longer settable
      • Investigate re-run issue when using SetSTAGE in EMTG

      === Other

      • Crash on exit in OptimalControlFunction destructor (Console reports as EXC_BAD_INSTRUCTION) every run on Mac (confirmed this still occurs every time on Mac)
      • Write Optimization summary report to message window and a file. Like how it can be done currently for targeter. Need to add a new Field to Trajectory for this.
      • Write the constraint report to file before and after running. This will help users debug their configuration because they can look at constraint violations before optimization occurs to identify script or problem formulation.
      • Fix path fields to use Gmat path utility so they support absolute and relative path like any other GMAT file input.
        • Limitations for EMTG thrust configuration files
        • Fix path limitations for GmatGuess files
        • Support path for optimal control solution output file
        • Add interfaces for setting smoother time bounds and step size of interpolated data

      ========================================================================
      Minor Enhancements/Usability

      • Clean up warning messages in CSALT and CSALT interface
      • [P2] Clean up OCHTrajectoryData code - reading META DATA and writing the data to a file
      • [P2 on its own ticket] Add parameters to write out phase time info so users can report data on optimal solutions. E.g., currently, there is no access to data from script.
      • (JJR) Add boundary functions to output report, currently only Custom Linkage, Simple Linkage are shown.
      • [P3] The scaling parameters DU, TU, and VU are not canonical. We should consider changing this.
      • [OWNER] [P2] Mesh refinement fails for Trapezoid with this message:
        Mesh refinement iteration 1
        Refining mesh for phase number 1
        CSALT Interface Exception: Exception from the CSALT core library: For BaryLagrangeInterpolator::ChkIndVarVecFeasibility, an indVarVec must have at least two elements!
      • [JJR] [P2] System test - Trajectory_CostLowerUpperBound. When script is run, user-set bounds are ignored. SNOPT DOES NOT USE THIS DATA AND WE MAY NEED TO REMOVE THE FIELD FROM GMAT IN THAT CASE.
        • [JJR] Removed cost bound fields from scripting as temporary fix to avoid confusing users. Original code that sends bound values to the optimizer is still intact for the next time this issue is looked at.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            gmat_wcs Wendy Shoan added a comment -

            Fixed Trajectory costLower/UpperBound (problem with REAL_MAX after saving script) by setting them to this:

            costLowerBound (-GmatRealConstants::REAL_MAX * 0.99),
            costUpperBound (GmatRealConstants::REAL_MAX * 0.99),

            Show
            gmat_wcs Wendy Shoan added a comment - Fixed Trajectory costLower/UpperBound (problem with REAL_MAX after saving script) by setting them to this: costLowerBound (-GmatRealConstants::REAL_MAX * 0.99), costUpperBound (GmatRealConstants::REAL_MAX * 0.99),
            Hide
            gmat_wcs Wendy Shoan added a comment -

            Added a crash to the list of issues. This crash occurs for me every run on exiting GMAT.

            Show
            gmat_wcs Wendy Shoan added a comment - Added a crash to the list of issues. This crash occurs for me every run on exiting GMAT.
            Hide
            gmat_wcs Wendy Shoan added a comment -

            Need defaults for optimizer settings on Phase (see 2nd issue above). Some of them look they have 'no default' listed in the Spec.

            Show
            gmat_wcs Wendy Shoan added a comment - Need defaults for optimizer settings on Phase (see 2nd issue above). Some of them look they have 'no default' listed in the Spec.

              People

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

                Dates

                • Created:
                  Updated: