Commit 0a48f1a3 authored by Vladislav Kiselev's avatar Vladislav Kiselev

Обновлены комментарии, незначительные изменения в constraint-ах.

parent df783d94
......@@ -207,6 +207,7 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
array [1..n_moving_obj] of set of 1..n_operations : related_cargo_op_using_obj_as_main;
% TODO узнать про where
% Определение is_involved_in_cargo_op.
constraint forall (obj in 1..n_moving_obj, t in 1..n_intervals) (
is_involved_in_cargo_op[obj, t] =
% (exists (op in 1..n_operations where (not is_moving_operation[op]) /\ (main_obj_of_operation[op] = obj)) (
......@@ -244,7 +245,7 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
по идее это не нужно, но на v2-60 без неё гораздо лучше чем с ней.
*/
% Наличие и готовность главных объектов (субъектов).
% Наличие главных объектов (субъектов) на месте.
constraint forall (op in 1..n_operations, t in 1..n_intervals, obj = main_obj_of_operation[op]) (
op_start[op, t] -> ((m_obj_loc[obj, t] == main_obj_start_loc[op]) /\
(not is_m_obj_in_movement_before_start[obj, t])
......@@ -287,7 +288,7 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
% Ограничения на вместимость.
array [1..n_obj_with_storage] of int : max_storage_vol;
% Масимальный объём.
% Максимальный объём.
constraint forall (storage in 1..n_obj_with_storage, t in 0..(n_intervals + 1)) (
sum (cargo in 1..n_cargo_types) (storage_used_volume[storage, t, cargo]) <= max_storage_vol[storage]
);
......@@ -428,9 +429,11 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
);
% Критерий оптимизации
array [0..(n_intervals + 1)] of var bool : is_not_terminated;
constraint (is_not_terminated[0] == false /\ is_not_terminated[n_intervals + 1] == false);
array [1..(n_intervals + 1)] of var bool : is_not_terminated;
% В конце всё остановится.
constraint (is_not_terminated[n_intervals + 1] == false);
% Действия ещё не остановились, если в текущий интервал что-нибудь происходит или они не остановятся в следующий интервал.
constraint forall (t in 1..n_intervals) (
is_not_terminated[t] == (
(exists (op in 1..n_operations) (op_status[op, t]))
......
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