Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Conversion
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vladislav Kiselev
Conversion
Commits
b69854c2
Commit
b69854c2
authored
May 13, 2019
by
Vladislav Kiselev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлена ошибка с фиксированием операции погрузки.
parent
77589340
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
src/constraints/conversion_2.mzn
src/constraints/conversion_2.mzn
+1
-0
src/constraints/conversion_2_with_partial_cargo_operations.mzn
...onstraints/conversion_2_with_partial_cargo_operations.mzn
+4
-13
src/inport/ConversionUtil.java
src/inport/ConversionUtil.java
+3
-0
No files found.
src/constraints/conversion_2.mzn
View file @
b69854c2
...
...
@@ -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
;
...
...
src/constraints/conversion_2_with_partial_cargo_operations.mzn
View file @
b69854c2
...
...
@@ -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
])
)
);
...
...
src/inport/ConversionUtil.java
View file @
b69854c2
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment