Ramesh singh

Gurobi-versary
Curious
Conversationalist
  • Total activity 21
  • Last activity
  • Member since
  • Following 0 users
  • Followed by 0 users
  • Votes 6
  • Subscriptions 5

Activity overview

Latest activity by Ramesh singh
  • Ramesh singh created a post,

    conditional statement

    Answered

    Hi,    m.addConstr((C==1)>>(D==5))  Where C is the optimized variable variable. D is assigned 5 when C is 1. When C is 0 then D must be zero. It gives garbage value.. Please let me know how it can ...

  • Ramesh singh created a post,

    Using gurobi optimize variable

    Answered

    Please help, In the below code, i want to  optimize the C such that maximum bw_initial[i][k] is selected. This code does not produce the correct value for all i..when i run i got this for i=1, C[1,...

  • Ramesh singh created a post,

    Initializing the auxiliary gurobi variables

    Answered

    Hi,       i am using t3[j,i] as auxiliary variable, i need to initialize it with zero. This variable t3 is updated using constraints when optimized variable C  is set. I am sharing here partial cod...

  • Ramesh singh created a post,

    Using gurobi optimize variable

    Answered

    In the below code, A[i,k] is optimize variable (decision).  This decision variable will change the value of PN.  So i am trying to update the PN for when A[i][k] ==1. For example if M is 5 and P is...

  • Ramesh singh commented,

    okay thank you so much. 

  • Ramesh singh commented,

    Thank you so much for your help and valuable suggestion and correction. It is working fine now.  One more doubt, when i prints optimize binary variable E_decision, it is printing -0, whereas it is ...

  • Ramesh singh commented,

    Thank you for valuable suggestion, i tried to remove optimization variable E from array index. I have added new decision variable E_decision ( E_decision[1][1], E_decision[1][2],....E_decision[1][5...

  • Ramesh singh commented,

    Thank you for you valuable suggestion, i changed array E from addMVar to addVars and initialize the value of E[1]=2, E[2]=5. Then the following code is not giving the eror.  It is optimizing the E ...

  • Ramesh singh commented,

    thank you for your quick reply, yes E is an optimization variable, it has initial values, for example, E array contains E[1]=2,E[2]=5. First problem is how to initialize the optimization variable a...

  • Ramesh singh created a post,

    using gurobi variable as index in 2d array

    Answered

    A=[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5] L Is 2d matrix of size M * M # L[1][1], L[1][2],......L[5][5] E=m.addMVar(3,vtype=GRB.INTEGER,lb=1,ub=5, name="E")  #E[1], E[2], E[0] unused how to model this equa...