Search found 7 matches
- 5 years ago
- Forum: Modeling
- Topic: Change of solution without changing code
- Replies: 1
- Views: 1771
Change of solution without changing code
Hi everyone, The attached model determines a maximum power demand depending on velocities of cars. The quicker they drive, the longer must the distance be between them. The cars cannot exceed speed that would make the needed distance between cars larger than the overall track length. I calculate the...
- 5 years ago
- Forum: Syntax
- Topic: Endogenous function in lag operation
- Replies: 1
- Views: 1799
Endogenous function in lag operation
Hi everyone,
I want to use a lag operation in an equation which is dependent on another variable. I am not allowed to do that. Do you know of any workaround?
Many thanks,
supra
I want to use a lag operation in an equation which is dependent on another variable. I am not allowed to do that. Do you know of any workaround?
Code: Select all
[...] .. c(i,lc,t) =l= c(i,lc++step(i,t),t+1)
supra
- 5 years ago
- Forum: Syntax
- Topic: bounds on sum for looping through sets
- Replies: 4
- Views: 3404
Re: bounds on sum for looping through sets
UPDATE 2: Found a working but not satisfying solution by hardcoding the number of lags that represent a minimum that I have to determine in advance. So I get sth like this: minDistance(lc,t) .. sum(i, c(i,lc-dMinlc,t) + c(i,lc-(dMinlc-1),t) + ... + c(i,lc,t) + ... + c(i,lc+dMinlc,t)) =l= 1 So I am s...
- 5 years ago
- Forum: Syntax
- Topic: Summation with variable lower and upper bound
- Replies: 4
- Views: 4429
Re: Summation with variable lower and upper bound
Hi Moritz,
could you find any solution to your question that you'd like to share? It feels like you have a similar problem to solve as I do as specified in my post "bounds on sum for looping through sets".
Best regards
supra
could you find any solution to your question that you'd like to share? It feels like you have a similar problem to solve as I do as specified in my post "bounds on sum for looping through sets".
Best regards
supra
- 5 years ago
- Forum: Syntax
- Topic: bounds on sum for looping through sets
- Replies: 4
- Views: 3404
Re: bounds on sum for looping through sets
UPDATE: I tried further coming up with the following, still not working code (Error 125: Set is under control already): minDistance(lc,t) .. sum(i,sum(lc $ (ord(lc) ge ord(lc-dMinlc) and ord(lc) le ord(lc+dMinlc)),c(i,lc,t))) =l= 1 I replaced set l by set lc, just beacuse it is easier to distinguish...
- 5 years ago
- Forum: Syntax
- Topic: bounds on sum for looping through sets
- Replies: 4
- Views: 3404
bounds on sum for looping through sets
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...
- 5 years ago
- Forum: Syntax
- Topic: Maximizing a maximum
- Replies: 1
- Views: 1960
Maximizing a maximum
Hello everyone, I am developing a model for the purpose of finding out the maximum power needed for an application. The power p needed per timestep t depends on eight different objects i, hence p(i,t). I want to maximize the objective function P, which should be a single instance maximum of all powe...