ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 11 Mar 2019 09:03:57 -0500Using CPLEX via SAGE when it's package installedhttp://ask.sagemath.org/question/45757/using-cplex-via-sage-when-its-package-installed/I would like to use CPLEX via SAGE. I checked the tutorial.
However, my Sage is installed via a package (debian) on a common server. Therefore, in my SAGE_ROOT (/usr/share/sagemath), I don't have local directory. Is there another directory then?
olfMon, 11 Mar 2019 09:03:57 -0500http://ask.sagemath.org/question/45757/Cplex 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 MehdiPernindyTue, 18 Nov 2014 11:17:52 -0600http://ask.sagemath.org/question/24907/Sage 4.6.2: how to use CPLEXhttp://ask.sagemath.org/question/7986/sage-462-how-to-use-cplex/I've just upgraded from 4.6 to 4.6.2. The COIN and CPLEX backends were included (in .../devel/sage-main/sage/numerical/backends), but I can't find a way to import them. The line
lp = MixedIntegerLinearProgram(solver="GLPK");
works, but solver="Coin" and solver="CPLEX" lead to messages that the corresponding _backend module is not found. I tried a few blind guesses to import them but had not luck. The docs seem to be a lap behind (the help for MixedIntegerLinearProgram says the CPLEX interface is not implemented yet, but that COIN's is; on the other hand, asking for help for sage.numerical.backends.xxxx_backend works for xxxx=glpk but not for xxxx=coin or cplex).
Does anybody know the correct incantation?
TIA, PaulprubinSat, 05 Mar 2011 11:37:01 -0600http://ask.sagemath.org/question/7986/