Search found 16 matches

by M.Walde
6 years ago
Forum: Solvers
Topic: Binaries with BONMIN Solver
Replies: 0
Views: 2392

Binaries with BONMIN Solver

Hey Gams Experts, I got a question about the BONMIN Solver. It's my first time working with this Solver and I don't know really much about it. I've tried to find something in the manuel, but couldn't find or didn't understand the solution to my problem. I'm using BONMIN solver with default settings....
by M.Walde
6 years ago
Forum: Syntax
Topic: Inverting sets
Replies: 3
Views: 3220

Re: Inverting sets

Hi cladelpiano, n^-1 should mean, that it is the inverted value. The equation should express, when n is 3: x(1,i+1) = x(3,i) x(2,i+1) = x(2,i) x(3,i+1) = x(1,i) n is not supposed to have 3 members all the time. It represents the number of nodes for a system, so it should be flexible. i represents th...
by M.Walde
6 years ago
Forum: Syntax
Topic: Inverting sets
Replies: 3
Views: 3220

Inverting sets

Hi everyone, I have a question according to sets. Imagine the set n, the set i and the subset x(n,i). Is there an easy way to for the equation x(n,i+1) = x(n^-1,i)? Here is what I mean in a more detailed way: set n /1*3/ i /1*20/ x(n,i); So x got 3 values. Let's say they get some values in the time ...
by M.Walde
6 years ago
Forum: Syntax
Topic: logical equations & binary variables
Replies: 15
Views: 15130

Re: logical equations & binary variables

Hi Manassaldi,

thank you a lot for your answer. Apparently I didn't realize, that you already provided the solution I needed.
I'm sorry for that. Thank you a lot for you help!

Cheers
by M.Walde
6 years ago
Forum: Syntax
Topic: logical equations & binary variables
Replies: 15
Views: 15130

Re: logical equations & binary variables

Hi Manassaldi, thanks again for your answer. I see, that I missunderstood the columen and the equation listing. However I wanted to set the binary variable nrc to prevent the division by zero. e_T_ri(i+1) .. T_ri(i+1) =e= (m_ts_rc(i+1)*T_to(i+1) + m_pb_rc(i+1)*T_po(i+1)) / (m_ts_rc(i+1) + m_pb_rc(i+...
by M.Walde
6 years ago
Forum: Syntax
Topic: logical equations & binary variables
Replies: 15
Views: 15130

Re: logical equations & binary variables

Hi guys, I got another problem, that's based in this here. So coming back to my model, I still want to set the binary variable nrc to 1, when the mass flows m_rc_ts and m_rc_pb both equal to zero. That's why I implemented the following equations: e_nrc_lo(i+1) .. m_rc_ts(i+1)+m_rc_pb(i+1) =g= (1-nrc...
by M.Walde
6 years ago
Forum: Syntax
Topic: logical equations & binary variables
Replies: 15
Views: 15130

Re: logical equations & binary variables

Thanks a lot for your fast reply.
I could have got to this myself. I apologize for not thinking enough, before asking the question.
by M.Walde
6 years ago
Forum: Syntax
Topic: logical equations & binary variables
Replies: 15
Views: 15130

Re: logical equations & binary variables

Thanks for your fast reply again, Manassaldi. You are really helping me with my project. I got another question: I actually explained wrong, what I want to have. I need the binary variable x to equal 1, when the variable m equals zero. So basically the opposite of the problem I stated before. Is the...
by M.Walde
6 years ago
Forum: Syntax
Topic: logical equations & binary variables
Replies: 15
Views: 15130

logical equations & binary variables

Hey guys, I got another question on logical equations or rather binary variables. This is again a beginner question. So right now I'm trying to understand how to set the value of binary variables with conditions. Consider the binary variable x and variable m. If i would write the code in other langu...
by M.Walde
6 years ago
Forum: Syntax
Topic: Synthax of binary variables
Replies: 3
Views: 3408

Re: Synthax of binary variables

First of all thanks again for your fast reply. I was a little bit caught in thinking about the model, so I didn't really explain, what it's for. Sorry for that. The idea is, that the binary variable npb(i) is set to one, when the massflows m_pb_rc and m_pb_ts both equal to zero. I need this for the ...