Test Procedures

advertisement
Minimize Command
Feature Spec and Test Procedures
Lead: Steve C
Developer: Darrel
STE/GUI Tester: Tom
Explore
Failing Tests
Other Findings
Requirements
Interface/Functional Spec
Overview
Script Syntax
Description
Fields
GUI
Remarks
Examples
Test Procedures
Assumptions
Existing Tests
Recommended Additional Tests
Appendix A - Miscellaneous Data
NOTES
Explore
No known bugs/issues committed in JIRA against this feature:
JIRA ID
Summary
Comment
Note that GMT-2643 is the Minimize QA task (not a bug).
Failing Tests
Run Identification: [Gmat-buildtest] Test results: 2012-11-13 (Win7-64/GMAT-32/M2010a/VS)
No failed tests.
Other Findings
1
Submitted bug, GMT-3281, Minimize command through the GUI creates incorrect
syntax. Bug closed 1/9/2013.
2
Requirements
These are working requirements. They are included here for review and convenience purposes.
After review, requirements are maintained in the formal SRS located at SourceForge in
/trunk/doc/SystemDocs/Requirements.
ID
Requirement
FRC-6.1
The system shall
have a command
named Minimize that
allows the user to
define the cost
function in an
optimization
sequence.
FRC-6.2.0
The system shall
support the following
variables in the
Minimize command:
FRC-6.2.1
1)
Any scalar
parameter defined in
FRR-38
FRC-6.2.2
2)
Any userdefined variable
FRC-6.2.3
3)
Any userdefined array
element
Interface/Functional Spec
Overview
Defines the cost function used in optimization.
Script Syntax
Minimize OptimizerName (ObjectiveFunction)
Description
The Minimize command is used within an Optimize/EndOptimize Optimization sequence
to define the objective function that the user wishes to minimize.
See Also: Vary, NonlinearConstraint , and Optimize.
Fields
See the User Interface Spec spreadsheet for reference information for fields.
GUI
You use a Minimize command, within an Optimize/EndOptimize Optimization sequence
as shown below, to define a cost function that you wish to minimize.
Double click on Minimize1 to bring up the Minimize command dialog box shown below.
You must provide two inputs for the Minimize command dialog box above:
1 Choice of optimizer.
2 Object (and associated variable) to be minimized. You can input an object directly
or you can click the Edit button to the right of this field to select the type of object
from three possible choices, Spacecraft, Variable, or Array.
Remarks
Number of Vary, NonlinearConstraint, and Minimize commands within an Optimization
Sequence
An Optimization sequence must contain one or more Vary commands. Vary commands must
occur before any Minimize or NonlinearConstraint commands.
At most, a single Minimize command is allowed within an optimization sequence.
It is possible for an Optimize/EndOptimize optimization sequence to contain no Minimize
commands. In this case, since every optimization sequence must contain (a) one or more
NonlinearConstraint commands and/or (b) a single Minimize command, the optimization
sequence must contain at least one NonlinearConstraint command.
Command Interactions
The Minimize command is only used within an Optimize/EndOptimize Optimization
sequence. See the Optimize command documentation for a complete worked example
using the Minimize command.
Vary command
Every Optimization sequence must contain at least one
Vary command. Vary commands are used to define the
control variables associated with an Optimization
sequence.
NonlinearConstraint command
NonlinearConstraint commands are used to define the
constraints (i.e., goals) associated with an Optimization
sequence. Note that multiple NonlinearConstraint
commands are allowed within an Optimization sequence.
Optimize command
A Minimize command can only occur within an
Optimize/EndOptimize command sequence.
Examples
% Minimize the eccentricity of Sat, using SQP1
Minimize SQP1(Sat.ECC);
% Minimize the Variable DeltaV, using SQP1
Minimize SQP1(DeltaV);
% Minimize the first component of MyArray, using VF13ad1
Minimize VF13ad1(MyArray(1,1));
Test Procedures
Assumptions
None.
Existing Tests
There are 3 files of the form *.tc.
Test Name
Description
scalar_in_minimize_com
mand
user_defined_array_ele
ment_in_minimize_com
mand
user_defined_Variable_i
n_minimize_command
Recommended Additional Tests
1
Added tests Optimize_fmincon_Two_Minimize_commands and
Optimize_vd13ad_Two_Minimize_commands. See Optimize Feature spec. The second error
message, when you have two Minimize commands, is a bit confusing but hopefully users know to
look at the first error message. Any relation to GMT-3281, Minimize command through the
GUI creates incorrect syntax.?
1: **** ERROR **** Command Exception: Optimization control sequences are only allowed one Minimize command in line:
" 21: Minimize VF13ad1(ApogeeRadius);"
2: **** ERROR **** Interpreter Exception: The Solver "" in the Minimize command does not match the Solver "VF13ad1" that starts its
Solver Control Sequence on the line
Minimize (9.999999e300);
Unique Validation
Test Name
Summary
Appendix A - Miscellaneous Data
Note that this data is primarily for the internal use of the feature lead. It does not need to be
reviewed by the SDE and STE.
NOTES
1
Download