[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] [Fwd: constraint to binary variable]
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] [Fwd: constraint to binary variable] |
Date: |
Thu, 20 Jun 2013 23:25:12 +0400 |
-------- Forwarded Message --------
From: dayana <address@hidden>
To: address@hidden
Subject: [Help-glpk] constraint to binary variable
Date: Thu, 20 Jun 2013 12:14:22 -0700 (PDT)
Hi everyone,
I am new in GLPK. I want to fill a two dimensional array of variable with 0
or 1. But I will get all of it zero :-( any idea?
# if start_time[i] <= t ---> Is_runing[i,t] = 1
s.t. check_3_1_1{i in task_no,t in time}:
start_time[i] <= t + Big_M * (1-is_runing[i,t]) ;
# if start_time[i] > t ---> Is_runing[i,t] = 0
s.t. check_3_1_2{i in task_no,t in time}:
start_time[i] <= t + Big_M * (is_runing[i,t]) ;
# if start_time[i]+duration[i] >= t ---> Is_runing[i,t] = 1
s.t. check_3_1_4{i in task_no,t in time}:
start_time[i] + duration[i] >= t + Big_M *(1- is_runing[i,t]);
# if start_time[i]+duration[i] < t ---> Is_runing[i,t] = 0
s.t. check_3_1_3{i in task_no,t in time}:
start_time[i] + duration[i] <= t + Big_M * is_runing[i,t];
--
View this message in context:
http://old.nabble.com/constraint-to-binary-variable-tp35649655p35649655.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] [Fwd: constraint to binary variable],
Andrew Makhorin <=