2 Replies Latest reply: Jun 25, 2011 1:03 PM by A.Non RSS

    Cash Flow Calculations


      Hello All,


      I am currently working on a project, and would like to graphically show the cash flow for the project over its lifetime (N years) on the x-axis. I have calculated the capital costs, annual costs and revenues, and a one off cost which happens in K-years time. I would like to be able to vary the various parameters (K,N, etc.) and the graph to update automatically. I imagine I need a matrix of N numbers, but am lost as to how to implement this.


      Any help would be greatly appreciated.



        • Re: Cash Flow Calculations
          A.Non PTC Community Champion

          The underlying cause of your problem is that you are doing things in what I would call the "spreadsheet way". You start with a vector of numbers, and at every step of the calculation you calculate a new set of numbers. That's usually not the best way to do things in Mathcad. It's better to start by defining variables that really will be constant (i.e. they have one value, and you will never want to change that value). Then make every expression a function of the variable(s) you may want to change. Then you can evaluate the functions at any point in the sheet, and you can do so for different values at different points in the sheet.


          To solve your immediate problem, make everything functions of N and K. So the definition of PVFmp becomes




          The definition of PVmp becomes




          and so on. Similarly for functions that depend on N, such as ACcap. Eventually you will have a function that depends on K and N, and then you can vary them at will.

            • Re: Cash Flow Calculations

              Hi Richard,


              I have made a new version of the worksheet, following your suggestion. I agree it's much tidier. I am not sure how to generate the plots at the end whilst varying a function of interest (eg delta_h). Is this to do with range variables? Sorry for the ignorance, only week 3 of mathcad for me! Also, is it possible to use mathcad to pick values of variables (within boundaries) that maximise a function (NPV)? Is this done using solve blocks?