bounds on sum for looping through sets
Posted: Tue Mar 26, 2019 10:01 am
Hello everyone, it is me again,
I have a second issue when modeling my application for the purpose of finding out the maximum power needed. My objects i are moving in a circle and need to keep a minimum distance dMin between each other at all timesteps t. I store if an object i is at a location l at a specific timestep t in a binary variable c(i,l,t). Hence, the sum over all c(i,l,t) should be 1 for a sequence of locations defined by the minimum distance dMin. So for all specific locations l*, the lower bound should be l*-dMin/2 and the upper bound should be l*+dMin/2.
1. I can't figure out how to implement lower and upper bounds. It feels like I need to use sth like
2. I am trying to have dMin/2 expressed as a number of locations in positive and negative direction. But how can I go from the starting point of my circle, location 1, backwards to the ending point, location N? Does sth like location 1-4 give location N-3?
I am looking forward to any suggestions, ideas and answers!
Best regards
supra
I have a second issue when modeling my application for the purpose of finding out the maximum power needed. My objects i are moving in a circle and need to keep a minimum distance dMin between each other at all timesteps t. I store if an object i is at a location l at a specific timestep t in a binary variable c(i,l,t). Hence, the sum over all c(i,l,t) should be 1 for a sequence of locations defined by the minimum distance dMin. So for all specific locations l*, the lower bound should be l*-dMin/2 and the upper bound should be l*+dMin/2.
1. I can't figure out how to implement lower and upper bounds. It feels like I need to use sth like
Code: Select all
minDistance(l,t).. sum(i,(sum(l $ ord(l-dMin/2) to ord(l+dMin/2), c(i,l,t))) =l= 1
I am looking forward to any suggestions, ideas and answers!
Best regards
supra