Hello guys. I'm having an issue with a Python PulP MILP problem. You can find
the simplified code that reproduces the problem here:
from pulp import *
machines = 2
I = range(machines)
positions = 2
J = range(positions)
years = 10
T = range(years)
age = {0: 5, 1: 7}
IR = 0.06
df = 0.3
costs = {
Hey Peter.
This worked like a charm! I can't believe I did not think of that, after
wasting so many hours on it.
Thank you so much for the help!
--
https://mail.python.org/mailman/listinfo/python-list
I have the results of an optimization run in the form found in the following
pic: https://i.stack.imgur.com/pIA7i.jpg.
How can I multiply the dictionary values of the keys FEq_(i,_j,_k,_l) with
preexisting values of the form A[i,j,k,l]?
For example I want the value of key 'FEq_(0,_0,_2,_2)' mul
Thank you MRAB!
Now I can get the corresponding dictionary value A[i,j,k,l] for each key in the
varsdict dictionary.
However how would I go about multiplying the value of each FEq_(i,_j,_k,_l) key
with the A[i,j,k,l] one? Do you have any insight in that?
--
https://mail.python.org/mailman/list
On Sunday, August 19, 2018 at 3:53:39 AM UTC+2, Steven D'Aprano wrote:
>
> Unless you edit your code with Photoshop, why do you think a JPEG is a
> good idea?
>
> That discriminates against the blind and visually impaired, who can use
> screen-readers with text but can't easily read text insid
> Do you want to modify the varsdict values in place?
>
> varsdict['Feq_(i,_j,_k,_l)'] *= A[i,j,k,l]
>
> which is a short-cut for this slightly longer version:
>
> temp = varsdict['Feq_(i,_j,_k,_l)'] * A[i,j,k,l]
> varsdict['Feq_(i,_j,_k,_l)'] = temp
>
>
>
> If you want to leave the origina
On Sunday, August 19, 2018 at 1:42:29 PM UTC+2, Steven D'Aprano wrote:
> On Sun, 19 Aug 2018 03:15:32 -0700, giannis.dafnomilis wrote:
>
> > Thank you MRAB!
> >
> > Now I can get the corresponding dictionary value A[i,j,k,l] for each key
> > in the varsdict dictionary.
> >
> > However how would