Commit a3e421a5 authored by Vladislav Kiselev's avatar Vladislav Kiselev

Перенёс в другое место.

parent 10add7b3
...@@ -72,12 +72,11 @@ constraint forall (i in 1..n_operations where is_continuous_operation[i]) ( ...@@ -72,12 +72,11 @@ constraint forall (i in 1..n_operations where is_continuous_operation[i]) (
int : operations_resources_max_size; int : operations_resources_max_size;
array [1..n_operations] of 0..operations_resources_max_size : operations_resources_sizes; array [1..n_operations] of 0..operations_resources_max_size : operations_resources_sizes;
array [1..n_operations, 1..operations_resources_max_size] of 1..n_moving_obj : operations_resources; array [1..n_operations, 1..operations_resources_max_size] of 1..n_moving_obj : operations_resources;
array [1..n_operations, 1..operations_resources_max_size] of 0..n_locations : operations_resources_start_loc; % Положения ресурсов в момент начала операции.
array [1..n_operations] of 0..n_locations : operations_start_loc; constraint forall (op in 1..n_operations, t in 1..n_intervals) (
constraint forall (op in 1..n_operations, j in 1..n_intervals) (
forall (op_res_id in 1..operations_resources_sizes[op]) ( forall (op_res_id in 1..operations_resources_sizes[op]) (
(op_start[op, j]) -> (m_obj_loc[operations_resources[op, op_res_id], j] == operations_start_loc[op]) (op_start[op, t]) -> (m_obj_loc[operations_resources[op, op_res_id], t] == operations_resources_start_loc[op, op_res_id])
) )
); );
......
...@@ -104,12 +104,11 @@ constraint forall (i in 1..n_operations where is_continuous_operation[i]) ( ...@@ -104,12 +104,11 @@ constraint forall (i in 1..n_operations where is_continuous_operation[i]) (
int : operations_resources_max_size; int : operations_resources_max_size;
array [1..n_operations] of 0..operations_resources_max_size : operations_resources_sizes; array [1..n_operations] of 0..operations_resources_max_size : operations_resources_sizes;
array [1..n_operations, 1..operations_resources_max_size] of 1..n_moving_obj : operations_resources; array [1..n_operations, 1..operations_resources_max_size] of 1..n_moving_obj : operations_resources;
array [1..n_operations, 1..operations_resources_max_size] of 0..n_locations : operations_resources_start_loc; % Положения ресурсов в момент начала операции.
array [1..n_operations] of 0..n_locations : operations_start_loc;
constraint forall (op in 1..n_operations, t in 1..n_intervals) ( constraint forall (op in 1..n_operations, t in 1..n_intervals) (
forall (op_res_id in 1..operations_resources_sizes[op]) ( forall (op_res_id in 1..operations_resources_sizes[op]) (
(op_start[op, t]) -> ((m_obj_loc[operations_resources[op, op_res_id], t] == operations_start_loc[op]) /\ (op_start[op, t]) -> ((m_obj_loc[operations_resources[op, op_res_id], t] == operations_resources_start_loc[op, op_res_id]) /\
(not is_m_obj_in_movement_before_start[operations_resources[op, op_res_id], t])) (not is_m_obj_in_movement_before_start[operations_resources[op, op_res_id], t]))
) )
); );
...@@ -211,6 +210,7 @@ constraint forall (t in 1..n_intervals) ( ...@@ -211,6 +210,7 @@ constraint forall (t in 1..n_intervals) (
) )
); );
/* Сломано...
% Ограничение на совершение полезной операции при движении назад (окончание отшвартовки - "полезная операция"). % Ограничение на совершение полезной операции при движении назад (окончание отшвартовки - "полезная операция").
array [1..n_moving_obj, 0..(n_intervals + 1)] of var 0..n_locations : next_m_obj_loc; % Позиция движущегося объекта на ближайшей остановке. array [1..n_moving_obj, 0..(n_intervals + 1)] of var 0..n_locations : next_m_obj_loc; % Позиция движущегося объекта на ближайшей остановке.
...@@ -275,7 +275,7 @@ constraint forall (obj in 1..n_moving_obj, t in 1..n_intervals) ( % Само о ...@@ -275,7 +275,7 @@ constraint forall (obj in 1..n_moving_obj, t in 1..n_intervals) ( % Само о
(next_m_obj_loc[obj, t + 1] == prev_m_obj_loc[obj, t]) (next_m_obj_loc[obj, t + 1] == prev_m_obj_loc[obj, t])
) -> is_interval_useful[obj, t - 1] ) -> is_interval_useful[obj, t - 1]
); );
*/
solve minimize sum(is_not_terminated); solve minimize sum(is_not_terminated);
output [show(sum(is_not_terminated)), "\n", output [show(sum(is_not_terminated)), "\n",
......
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