| # Optimization of a Water Tank GP > Posynomials | Standard Forms > Example: Water Tank Optimization | Applications This is a simple example of a geometric programming problem, involving the construction and operating costs of a cylindrical liquid (say, oil, or water) storage tank. The parameters are the diameter of the tank, and its height, . As seen here, the cost function of this problem is of the form where , , , and positive constants. The constraints involve upper and lower bounds on the variables: We might also have an upper bound on the aspect ratio of the tank (the aspect ratio constraint is useful to take into account structural resistance to wind): Our GP takes the standard form A CVX syntax for this problem is as follows. CVX syntax
    cvx_begin gp
          variables h d
          % objective function is cost
          minimize( c1/(h*d^2) + c2*d^2 + c3*d*h )
          subject to
            d <= dmax;
            h <= hmax;
            h/d <= alphamax;
    cvx_end
| The (non-convex) cost function of the problem, corresponding to the values The optimum variables are , (optimal point shown in green on the plot). The optimal cost is . The design constraints of the problem are pictured as a forbidden region, in white. The problem is effectively unconstrained, as the bounds on variables and aspect ratio are not active at optimum.
See also: Construction and operating costs for a water tank. Convex form of the water tank optimization problem.