1 year ago
#369075
shima torabi
I can't solve two matrix multiple in pulp objective
I am a novice in writing code in programing. I'm having trouble writing a objective code in the Python pulp library and I can't solve its error. I write to python code a logarithm expression that is a multiple of two matrices. The form of my problem and my code are as follows. please help me.
from pulp import *
m = LpVariable('m', lowBound=0, cat='Integer')
n = LpVariable('n', lowBound=0, cat='Integer')
# --------------------------------------- decision variable
x = LpVariable.matrix("x",(range(m),range(n)),0,1,cat = 'Binary')
P = LpVariable.matrix("P",(range(m),range(n)),cat = 'Integer')
G = LpVariable.matrix("G",(range(m),range(n)),cat = 'Integer')
model = pulp.lpDot(P, G)
print(model, type(model))
matrix
optimization
logarithm
pulp
0 Answers
Your Answer