Commit b69854c2 authored by Vladislav Kiselev's avatar Vladislav Kiselev

Исправлена ошибка с фиксированием операции погрузки.

parent 77589340
......@@ -366,6 +366,7 @@ array [0..n_operations] of 0..n_locations : operations_destination; % Локац
array [1..n_fixed_op] of set of 1..n_moving_obj : fixed_op_resources;
array [1..n_fixed_op] of 1..n_intervals : fixed_op_start;
array [1..n_fixed_op] of 1..n_intervals : fixed_op_end; % Включительно.
array [1..n_fixed_op] of int : fixed_op_intensity;
array [0..n_operations, 0..n_intervals] of bool : is_fixed;
......
......@@ -367,18 +367,7 @@ array [0..n_operations] of 0..n_locations : operations_destination; % Локац
constraint forall (op in 1..n_operations, t in 0..(n_intervals + 1) where not is_moving_operation[op]) (
op_status[op, t] -> (cargo_op_intensity[op, t] > 0)
);
/*
constraint forall (storage in 1..n_obj_with_storage, cargo in 1..n_cargo_types, t in 1..(n_intervals + 1)) (
storage_used_volume[storage, t, cargo] = (
storage_used_volume[storage, t - 1, cargo] +
cargo_flows[storage, t, cargo] +
sum (inv_op in involved_operations[storage, cargo]) (
loading_op_delta[inv_op] *
op_status[loading_op_n[inv_op], t]
)
)
);
*/
constraint forall (storage in 1..n_obj_with_storage, cargo in 1..n_cargo_types, t in 1..(n_intervals + 1)) (
storage_used_volume[storage, t, cargo] = (
storage_used_volume[storage, t - 1, cargo] +
......@@ -397,6 +386,7 @@ array [0..n_operations] of 0..n_locations : operations_destination; % Локац
array [1..n_fixed_op] of set of 1..n_moving_obj : fixed_op_resources;
array [1..n_fixed_op] of 1..n_intervals : fixed_op_start;
array [1..n_fixed_op] of 1..n_intervals : fixed_op_end; % Включительно.
array [1..n_fixed_op] of int : fixed_op_intensity;
array [0..n_operations, 0..n_intervals] of bool : is_fixed;
......@@ -405,7 +395,8 @@ array [0..n_operations] of 0..n_locations : operations_destination; % Локац
(op_status[op, t]) /\
forall (obj in fixed_op_resources[no]) (
participation_as_resource[obj, t] = op
)
) /\
(cargo_op_intensity[op, t] = fixed_op_intensity[no])
)
);
......
......@@ -1308,6 +1308,7 @@ public class ConversionUtil {
ArrayList<Set<Integer>> fixedOpResources = new ArrayList<>();
ArrayList<Integer> fixedOpStart = new ArrayList<>();
ArrayList<Integer> fixedOpEnd = new ArrayList<>();
ArrayList<Integer> fixedOpIntensity = new ArrayList<>();
class OperationData implements Comparable<OperationData> {
private int opId, executorId;
......@@ -1359,6 +1360,7 @@ public class ConversionUtil {
fixedOpResources.add(resources);
fixedOpStart.add((int)Math.floor(op.getStart()) + 1);
fixedOpEnd.add((int)Math.ceil(op.getDuration() + op.getStart()));
fixedOpIntensity.add((int)Math.ceil(op.getIntensity().orElse(0)));
}
}
......@@ -1367,6 +1369,7 @@ public class ConversionUtil {
writeArray(writer, "fixed_op_resources", fixedOpResources, ConversionUtil::setToString);
writeArray(writer, "fixed_op_start", fixedOpStart);
writeArray(writer, "fixed_op_end", fixedOpEnd);
writeArray(writer, "fixed_op_intensity", fixedOpIntensity);
locWrite2DArray(writer, "is_fixed", getIsFixedArray(), Objects::toString, true);
}
......
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