Search found 4 matches
- 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...
- 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 ...
- 4 years ago
- Forum: Modeling
- Topic: Binary Variable Value
- Replies: 4
- Views: 5402
- 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?
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?