Nicolas Campbell

  • Gurobi-versary
  • First Comment
  • First Question
  • Total activity 10
  • Last activity
  • Member since
  • Following 0 users
  • Followed by 0 users
  • Votes 2
  • Subscriptions 2

Activity overview

Latest activity by Nicolas Campbell
  • Nicolas Campbell commented,

    Hi Jaromil, The minimal working example won't work without excel files but I will include code for you to see: from gurobipy import *import numpy as npimport pandas as pdimport numpy as npzones = [...

  • Nicolas Campbell created a post,

    if statement in constraint

    Answered

    Hi, I am trying to have a conditional constraint for when x [t-1] = 0. Here is some current code: model.addConstrs(sum(x[time,zone] for zone in zones) >= 0.95*sum(x[times[time_index-1],zone] for zo...

  • Nicolas Campbell commented,

    Thank you so much. This worked perfectly and you explanation was great. I also want to say that from what I have seen on other posts you guys are great help in this community. I am sure everyone ap...

  • Nicolas Campbell commented,

    Small addition: I did test out adding another constraint to x in the code  model.addConstrs(x[time,zone] <=ub[zone] for time in times for zone in zones) This successfully constrains 'x', however, I...

  • Nicolas Campbell commented,

    Hi, Sorry it has taken a while to respond. I was away and it would take me time to make a minimal working example. I have made one now and I hope you can solve my issues. from gurobipy import *impo...

  • Nicolas Campbell created a post,

    Ignored upper bound set on variable

    Answered

    Hi, I have a set of variables that are semi-continuous with an upper and lower bound placed. x = model.addVars(times,zones, name = "x", ub=ub, lb = lb, vtype= 'S') ub and lb are defined in a big li...