Commit eb810f63 authored by Vladislav Kiselev's avatar Vladislav Kiselev

Fixed bug with mainn constraint on useful operations.

parent 5520bb48
......@@ -209,12 +209,12 @@ array [1..n_moving_obj, 0..(n_intervals + 1)] of var bool : is_interval_useful;
endif
);
constraint forall (obj in 1..n_moving_obj, t in 0..n_intervals) ( % Само ограничение.
(( m_obj_loc[obj, t] != 0) /\
(prev_m_obj_loc[obj, t] != 0) /\
( m_obj_loc[obj, t + 1] == 0) /\
constraint forall (obj in 1..n_moving_obj, t in 1..n_intervals) ( % Само ограничение.
(( m_obj_loc[obj, t] != 0) /\
(prev_m_obj_loc[obj, t] != 0) /\
(next_m_obj_loc[obj, t + 1] != m_obj_loc[obj, t]) /\
(next_m_obj_loc[obj, t + 1] == prev_m_obj_loc[obj, t])
) -> is_interval_useful[obj, t]
) -> is_interval_useful[obj, t - 1]
);
solve minimize sum(is_not_terminated);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment