Search found 4 matches

by EmreA
4 years ago
Forum: Modeling
Topic: Equation Definition in a Loop Whose Index Maped With Binary Variable
Replies: 0
Views: 1909

Equation Definition in a Loop Whose Index Maped With Binary Variable

I need to write equation in such a loop to calculate arrival time for each vehicle on its route waypoints. For example my model desides the cheapest way with the route Route(1,A,C),Route(1,C,B),Route(1,B,F)all is 1. So I have to calculate the arrival time of vehicle1 to waypoints C,B,and F in such a...
by EmreA
4 years ago
Forum: Modeling
Topic: Binary Variable Value
Replies: 4
Views: 5402

Re: Binary Variable Value

Solvers work with tolerances. A popular tolerance for deciding if a value is "integer" is if abs(x-round(x))<1e-5. Many solvers allow you to change such tolerances. For example, Cplex: epint (see https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXepint). -Michael Thanky you very much for ...
by EmreA
4 years ago
Forum: Modeling
Topic: Binary Variable Value
Replies: 4
Views: 5402

Re: Binary Variable Value

Donaasri wrote: 4 years ago You should write like
Binary variables

X(i,j,k)
Y(i,j) ;


Sevgiler:)
I dont understand what should I do? My binary variable defined over 2 different set. İt is Y(i,j) and Y(i,j) for i=1 j=2 my model returns Y(1,2)=0,0000002. But I need exactly Y(1,2)=0.
by EmreA
4 years ago
Forum: Modeling
Topic: Binary Variable Value
Replies: 4
Views: 5402

Binary Variable Value

Hi;
I am using binary variable at my model. The problem is that the solver gives 0,000002 for the variable instead of exact 0. I need exact 0 or 1 istead of 0,000002. I have to prevent this. How can I get an exact 0 for a binary variable?