## ams_version=1.0 Model Main_StructuralOptimization { Comment: { "Structural Optimization Problem type: NLP (small) Description: Design of a vertically corrugated transverse bulkhead of an oil tanker. The objective is to design for minimum weight of the bulkhead while taking stress, moment of inertia and plate thickness constraints into account. References: Bracken, J., and G.P. McCormick, Chapter 6 in: Selected Applications of Nonlinear Programming, John Wiley and Sons, New York, 1968, pp. 50-57." } DeclarationSection Model_Declarations { Set Panels { Index: s, sp; Definition: data { top, middle, bottom }; } Parameter SpecificGravityOfWater { Definition: 0.001; } Parameter MaximumBendingStress { Definition: 1200; } Parameter DetNorskeVeritas { InitialData: 4.25; } Parameter CorrosionAllowance { InitialData: 0.2; Comment: { "This parameter corresponds to K2 in the Bracken and McCormick article. Unfortunately, the article does not contain data for the corrosion allowance. The value used here was also used by others." } } Parameter FlangeEffectiveness { InitialData: 0.8; Comment: { "This parameter corresponds to \'e\' in the Bracken and McCormick article. Unfortunately, the article does not contain data for the flange effectiveness. The value used here was also used by others." } } Parameter HeightAbovePanel { InitialData: 250; } Parameter SpecificWeightOfSteel { Definition: 0.007851; } Parameter WidthOfPanel { InitialData: 500; Comment: { "Unfortunately, the Bracken and McCormick article does not contain data for the width of the panel. The value used here was also used by others." } } Parameter LengthOfPanel { IndexDomain: (s); InitialData: data { top : 495, middle : 385, bottom : 315 }; } Parameter HeightAtTheMiddle { IndexDomain: s; Definition: HeightAbovePanel + sum( sp | sp <= s, LengthOfPanel(sp) ); } Parameter HeightAtTheBase { IndexDomain: (s); Definition: HeightAtTheMiddle(s) - LengthOfPanel(s)/2; Comment: { "The Bracken and McCormick article contains a mistake regarding the calculation of the height at the base. The correct values calculated according to the above definition are: data { top : 497.5, middle : 937.5, bottom : 1287.5 } In the Bracken and McCormick article the following data is used in Figure 6.3: data { top : 497.5, middle : 1037.5, bottom : 1287.5 }" } } Parameter K1 { IndexDomain: (s); Definition: SpecificGravityOfWater * HeightAtTheBase(s) * LengthOfPanel(s) * LengthOfPanel(s) / ( 12 * MaximumBendingStress ); Comment: "This parameter corresponds to K1*h*l^2 in the Bracken and McCormick article."; } Parameter LowerBoundOnThickness1 { InitialData: 1.05; Comment: { "This parameter corresponds to t^min in the Bracken and McCormick article as used in constraint (6.7)." } } Parameter LowerBoundOnThickness2 { IndexDomain: (s); Definition: DetNorskeVeritas * LowerBoundOnThickness1 * sqrt( 0.01 * HeightAtTheBase(s) ); Comment: { "This parameter corresponds to 3.9*b*sqrt(h_1) in the Bracken and McCormick article as used in constraint (6.7)." } } Variable SectionModulus { IndexDomain: (s); Range: nonnegative; Definition: DepthOfCorrugation * PlateThickness(s) * ( LengthOfWeb/3 + WidthOfFlange * FlangeEffectiveness ) / 2; Comment: { "SectionModulus(\'top\') corresponds to the expression 1/6*x2*x3*x4 + e/2*x1*x3*x4 in the Bracken and McCormick article as used in the constraints (6.10) and (6.13)." } } Variable PlateThickness { IndexDomain: (s); Range: nonnegative; Comment: { "This variable corresponds to the variables x4, x5 and x6 in the Bracken and McCormick article." } } Variable WidthOfFlange { Range: nonnegative; Comment: "This variable corresponds to the variable x1 in the Bracken and McCormick article."; } Variable LengthOfWeb { Range: nonnegative; Comment: "This variable corresponds to the variable x2 in the Bracken and McCormick article."; } Variable DepthOfCorrugation { Range: nonnegative; Comment: "This variable corresponds to the variable x3 in the Bracken and McCormick article."; } Variable WidthOfCorrugation { Range: nonnegative; Definition: WidthOfFlange + sqrt( LengthOfWeb^2 - DepthOfCorrugation^2 ); Comment: { "This variable corresponds to the expression x1 + (x2^2 - x3^2) in the Bracken and McCormick article as used in the constraints (6.9) - (6.15)." } } Variable WeightOfStructure { Range: free; Definition: { SpecificWeightOfSteel * WidthOfPanel * ( WidthOfFlange + LengthOfWeb ) * sum( s, PlateThickness(s) * LengthOfPanel(s) ) / ( WidthOfCorrugation * 1000 ) } } Constraint BendingStress { IndexDomain: s; Definition: SectionModulus(s) >= K1(s) * WidthOfCorrugation; } Constraint MomentOfInertia { IndexDomain: s; Definition: SectionModulus(s) * DepthOfCorrugation/2 >= 2.2 * ( K1(s) * WidthOfCorrugation )**(4/3); } Constraint PlateVsWidth { IndexDomain: (s); Definition: 10 * PlateThickness(s) >= LowerBoundOnThickness2(s) * WidthOfFlange * 0.01 + 10 * CorrosionAllowance; } Constraint PlateVsLength { IndexDomain: (s); Definition: 10 * PlateThickness(s) >= LowerBoundOnThickness2(s) * LengthOfWeb * 0.01 + 10 * CorrosionAllowance; } Constraint GeometricConstraint { Definition: LengthOfWeb >= DepthOfCorrugation + 0.001; } MathematicalProgram LeastWeightOfStructure { Objective: WeightOfStructure; Direction: minimize; Constraints: AllConstraints; Variables: AllVariables; Type: NLP; } } Section The_User_Interface { DeclarationSection Interface_Declarations { Parameter NumberOfCorrugations { Definition: Round(WidthOfCorrugation*100/WidthOfPanel); } Set Points { Index: p; Parameter: point; Definition: ElementRange( 1, NumberOfCorrugations*4, prefix: "p-" ); } Parameter Y { IndexDomain: (p); } Parameter X { IndexDomain: (p); } } Procedure CalculateCorrugationShape { Body: { point := first(Points); while (point) do y(point) := 0; y(point+1) := 0; y(point+2) := DepthOfCorrugation ; y(point+3) := DepthOfCorrugation; point += 4; endwhile; point := first(Points); x(point) := 0; point += 1; x(point) := WidthOfFlange; point += 1; while (point) do x(point) := x(point-1) + sqrt(LengthOfWeb^2 - DepthOfCorrugation^2); x(point+1) := x(point) + WidthOfFlange; point += 2; endwhile; } } } Procedure MainInitialization; Procedure MainExecution { Body: { PlateThickness(s).lower := LowerBoundOnThickness1; ! Starting Point PlateThickness('top') := 1.2; PlateThickness('middle') := 1.2; PlateThickness('bottom') := 1.2; WidthOfFlange := 45.8; LengthOfWeb := 43.2; DepthOfCorrugation := 30.5; WidthOfCorrugation := WidthOfFlange + sqrt(LengthOfWeb^2-DepthOfCorrugation^2); SectionModulus(s) := DepthOfCorrugation * PlateThickness(s) * ( LengthOfWeb/3 + WidthOfFlange * FlangeEffectiveness ) / 2; solve LeastWeightOfStructure; CalculateCorrugationShape; } } Procedure MainTermination { Body: { return 1; } } }