I'm trying to solve an RCPSPDc model (maximizing the net present value instead of a makespan). The objective function is: $\sum\limits_{j \in \text{Tasks}} e^{-\theta\cdot s_{j}}\cdot p_{j}$, where $s_{j}$ is a decision variable that for each job $j$ we save the time that it begins (an integer), $p_{j}$ is the profit of the job $j$ and $\theta_{j}$ is a discount factor.
# Define objective
model.Maximize(sum(np.exp(-delta*s[j])*pro[j] for j in range(n)))
So, when I run my model I get this error:
Traceback (most recent call last):
File "example_python.py", line 199, in <module>
rcpsp_solver()
File "example_python.py", line 191, in rcpsp_solver
model.Maximize(sum(np.exp(-delta*s[j])*pro[j] for j in range(n)))
File "example_python.py", line 191, in <genexpr>
model.Maximize(sum(np.exp(-delta*s[j])*pro[j] for j in range(n)))
File "/home/diego/.local/lib/python2.7/site-packages/ortools/sat/python/cp_model.py", line 229, in __rmul__
cp_model_helper.AssertIsInt64(arg)
File "/home/diego/.local/lib/python2.7/site-packages/ortools/sat/python/cp_model_helper.py", line 30, in AssertIsInt64
raise TypeError('Not an integer: %s' % x)
TypeError: Not an integer: -0.09
and 0.09 is my discount rate. So I've been switching from other solvers to this one because the same problem (Gecode, Chuffed, etc), hoping that ORtools could work. Is there a way to compute the real value (float) and solve? Actually i'm thinking that most of the Constraint programming solvers have the same issue (in addition, all mazimize makespan that has an integer objective in their examples). I'm using the python API.