You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimize total cost (cost is only determined by task-asset assignment):
24
+
24
25
$$
25
26
\min \sum c_{t,a} x
26
27
$$
28
+
27
29
The $c$ vector also contains 'cost' penalties for later start times $(X_{t,s})$ to prioritize tasks starting as early as they can (used to be Constraint 7)
28
30
29
31
## Constraints
@@ -33,6 +35,7 @@ When added together, these are the upperbound constraint, the lower bound constr
33
35
attempts to solve the object objective function subject to:
Loops through all tasks, assets, periods, and start times and assigns constraint coefficients $(A)$ to ensure the right number of periods are selected.
ensures that $ X_{t,p}[0,0] $ is equal to 1 when the first task-asset pair is set to start in period 1, as well as the second period, given a task-asset duration of 2:
For example, $X_{t,a}[0,0] + X_{t,s}[0,0] - X_{t,p}[0,0] <= 1$
98
+
ensures that $X_{t,p}[0,0]$ is equal to 1 when the first task-asset pair is set to start in period 1, as well as the second period, given a task-asset duration of 2:
99
+
$X_{t,a}[0,0] + X_{t,s}[0,0] - X_{t,p}[0,1] <= 1$
95
100
96
101
This ensures that based on the task-asset pair selected and a given start time, the corresponding Xtp values are selected. However, this constraint represents a 'lower_bound', as these constraints don't have any control over the other Xtp values that it doesn't specify. Constraint 16 sets the 'upper bound'.
97
102
98
103
### 16. Each task is active for exactly its duration
99
104
100
105
This constraint ensures that the number of Xtp variables is EXACTLY equal to the task-asset duration, as 14b has some edge cases where some other Xtp values have the option to be turned on.
However, this created a problem that when $X_{t,a}[0,0] = 1$, this constraint could set $X_{t,p}[0,p] = X_{a,p}[0,p]$, but if Asset 0 was used in another task at a different time, it may not occur in that same period.
140
+
However, this created a problem that when $X_{t,a}[0,0] = 1$, this constraint could set $X_{t,p}[0,p] = X_{a,p}[0,p]$, but if Asset 0 was used in another task at a different time, it may not occur in that same period.
132
141
133
142
Therefore, we have decided to eliminate the need for the Xap variable since they seem redundant after this investigation.
134
143
135
144
136
145
### 4. Asset Cannot Be Assigned to Multiple Tasks in Same Period
137
146
Ensures that if multiple tasks are assigned to the same asset, then only one can be active in any period p (not using any Xap variables)
For two tasks, the right hand side will always be 3, which ensures that if the same asset is used for multiple tasks $(X_{t,a}[0,0]=1, X_{t,a}[1,0]=1)$, then only one $X_{t,p}[t,p]$ variable is turned on.
142
153
@@ -160,9 +171,9 @@ We have a set of different dependency type options:
160
171
- Finish-Finish: the dependent task finishes when the prerequisite task finishes
161
172
- Same-Asset: the dependent task must use the same asset as the prerequisite task
162
173
163
-
For all valid start times s for task t, if $X_{t,s}[t,s]=1$, then there is some other start time $s_d$ for task d so that $X_{t,s}[d,s_d]=1$ and $s_d + duration <= s$
174
+
For all valid start times s for task t, if $X_{t,s}[t,s]=1$, then there is some other start time $s_d$ for task d so that $X_{t,s}[d,s_d]=1$ and $s_d + duration <= s$
164
175
165
-
$X_{t,s}[t,s] <= \sum X_{t,s}[d,s_d]$ from $s$ to $sd+duration$
176
+
$X_{t,s}[t,s] <= \sum X_{t,s}[d,s_d]$ from $s$ to $sd+duration$
166
177
167
178
---
168
179
@@ -172,4 +183,4 @@ $ X_{t,s}[t,s] <= \sum X_{t,s}[d,s_d] $ from $s$ to $sd+duration$
172
183
173
184
- Constraints can be extended for parallel tasks, multiple assets per task, or other requirements as needed.
174
185
- One of the better references to understand this approach is `Irwan et al. 2017 <http://dx.doi.org/10.1016/j.cor.2015.09.010>`_
175
-
- The `scheduler.py` file also has some TODO's, which are focused on software development.
186
+
- The `scheduler.py` file also has some TODO's, which are focused on software development.
0 commit comments