0

I am using the pyomo for my thesis project and working on MILP model. I have an objective function which is to minimise the late arrival of certain goods to the warehouse and hence I came with an objective function as follows,

Here, I am unable to program the condition for the "t" as it kept saying pyomo conflict error. I also tried to change the objective function as Sum W[itkr]*q[it]*s[kr] where s[kr] is a decsion variable that is equal to 1 if the vehicle gets back to the depot within a particular time of 180 minutes.

hence, I tried to come write a constratint as follows, for r in model.R:

expression = sum(model.s[k,r] for k in model.K if model.v[k,r]-180>=0) == 1

but it still responds with a pyomo conflict error. Can someone please help me ? I am unable to complete my thesis and fear not passing.

Thanks a ton

Ram Narasimhan
  • 22,341
  • 5
  • 49
  • 55
  • 1
    Hello Vignesh, welcome to SO. Before people can help you, you have to share a bit more. Try to simplify the problem to the smallest possible extent. If you are still getting the error, please post a "reproducible" example, with the error and someone could help you. I find this very helpful for myself: https://stackoverflow.com/help/how-to-ask – Ram Narasimhan Jun 12 '22 at 14:39
  • 1
    There are unbalanced parentheses in your formula. I.e. it is wrong. – Erwin Kalvelagen Jun 13 '22 at 02:02
  • @RamNarasimhan : Sir, Thank you for the comment, found it useful. I am pretty new to the subject and unable to solve due to the pyomo conflict error. I solved the parenthesis and still face the issue. – Vignesh Jun 23 '22 at 18:01

0 Answers0