ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 18 Nov 2014 11:38:18 -0600Cplex to solve discouted cash flowhttp://ask.sagemath.org/question/24907/cplex-to-solve-discouted-cash-flow/ Hi,
We are working on a project to consider discounted cashflow in MRCPSP problems. We are having trouble implementing discounted cash flow concept in our cost objective function.
The actual code, not considering discouted cash flow is:
minimize(sum(m in Modes)m.cost*presenceOf(mode[m]))*100
which minimizes the cost of the project .this function adds up all the cost related to each mode of activity.what we need is for each mode the function consider the cost and the finish schedule of each activity.
rate = annual interest rate
discounted cash flow= cost x (1-scheduled finish time of activity x rate)
What we have tried is:
minimize(sum(m in mode))m.cost*(1-rate*(m.Duration))*presenceOf(mode[m]))*100
which is not correct , and it considers the duration of activity what we need is finish time of activity to be calculated.
Thank you very much for your help,
Pernelle and MehdiTue, 18 Nov 2014 11:17:52 -0600http://ask.sagemath.org/question/24907/cplex-to-solve-discouted-cash-flow/Comment by kcrisman for <p>Hi, </p>
<p>We are working on a project to consider discounted cashflow in MRCPSP problems. We are having trouble implementing discounted cash flow concept in our cost objective function.</p>
<p>The actual code, not considering discouted cash flow is:</p>
<p>minimize(sum(m in Modes)m.cost<em>presenceOf(mode[m]))</em>100</p>
<p>which minimizes the cost of the project .this function adds up all the cost related to each mode of activity.what we need is for each mode the function consider the cost and the finish schedule of each activity.</p>
<p>rate = annual interest rate
discounted cash flow= cost x (1-scheduled finish time of activity x rate)</p>
<p>What we have tried is:</p>
<p>minimize(sum(m in mode))m.cost<em>(1-rate</em>(m.Duration))<em>presenceOf(mode[m]))</em>100</p>
<p>which is not correct , and it considers the duration of activity what we need is finish time of activity to be calculated.</p>
<p>Thank you very much for your help,</p>
<p>Pernelle and Mehdi</p>
http://ask.sagemath.org/question/24907/cplex-to-solve-discouted-cash-flow/?comment=24908#post-id-24908Hi! Can you point out how this is related to Sage? Sage does have an interface with CPLEX but I don't know if we can help too much with code for that straight up, as it is not a part of Sage, only something our MILP solver can use as a backend. Do you have some Python/Sage code that is causing problems you can update the question with? Thanks!Tue, 18 Nov 2014 11:38:18 -0600http://ask.sagemath.org/question/24907/cplex-to-solve-discouted-cash-flow/?comment=24908#post-id-24908