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
df783d94
Commit
df783d94
authored
May 03, 2019
by
Vladislav Kiselev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Упрощение.
parent
c489eecc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
src/constraints/conversion_2.mzn
src/constraints/conversion_2.mzn
+15
-24
No files found.
src/constraints/conversion_2.mzn
View file @
df783d94
...
@@ -152,27 +152,19 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
...
@@ -152,27 +152,19 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
);
);
% Связь с текущими операциями перемещения.
% Связь с текущими операциями перемещения.
% Если объект задействован в операции перемещения, то participation_as_resource и
% Если объект задействован в операции перемещения, которая использует его как ресурс,
% current_moving_operation должны указывать на одну и ту же операцию.
% то participation_as_resource должен указывать на эту операцию.
% { Если объект движется, и движется как ресурс, то participation_as_resource должен отображать этот факт. }
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
n_intervals
)
(
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
n_intervals
)
(
(
current_moving_operation
[
obj
,
t
]
in
operations_that_used_obj_as_resource
[
obj
])
(
current_moving_operation
[
obj
,
t
]
!=
0
)
->
(
(
current_moving_operation
[
obj
,
t
]
in
operations_that_used_obj_as_resource
[
obj
])
->
->
(
participation_as_resource
[
obj
,
t
]
=
current_moving_operation
[
obj
,
t
])
(
participation_as_resource
[
obj
,
t
]
=
current_moving_operation
[
obj
,
t
])
)
);
);
% Если объект участвует как ресурс в операции перемещения, то это согласованно с current_moving_operation.
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
n_intervals
)
(
% Если объект участвует как ресурс в операции перемещения, то это согласованно с current_moving_operation.
((
participation_as_resource
[
obj
,
t
]
!=
0
)
/\
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
n_intervals
)
(
(
is_moving_operation
[
participation_as_resource
[
obj
,
t
]])
(
participation_as_resource
[
obj
,
t
]
!=
0
)
->
(
)
->
(
participation_as_resource
[
obj
,
t
]
=
current_moving_operation
[
obj
,
t
])
(
is_moving_operation
[
participation_as_resource
[
obj
,
t
]])
->
(
);
(
current_moving_operation
[
obj
,
t
]
!=
0
)
/\
(
participation_as_resource
[
obj
,
t
]
=
current_moving_operation
[
obj
,
t
])
)
)
);
% { Объект участвует где-то в качестве ресурса - соответствующая операция обязана быть активной. }
% { Объект участвует где-то в качестве ресурса - соответствующая операция обязана быть активной. }
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
n_intervals
)
(
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
n_intervals
)
(
...
@@ -181,10 +173,9 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
...
@@ -181,10 +173,9 @@ array [1..n_operations] of 1..n_locations : operations_destination; % Локац
% От начала операции и до конца её ресурсы не могут измениться (в том числе и для погрузки).
% От начала операции и до конца её ресурсы не могут измениться (в том числе и для погрузки).
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
(
n_intervals
-
1
))
(
constraint
forall
(
obj
in
1
..
n_moving_obj
,
t
in
1
..
(
n_intervals
-
1
))
(
(
participation_as_resource
[
obj
,
t
]
!=
0
)
->
((
participation_as_resource
[
obj
,
t
]
!=
0
)
/\
(
op_status
[
participation_as_resource
[
obj
,
t
],
t
+
1
]
(
op_status
[
participation_as_resource
[
obj
,
t
],
t
+
1
])
->
participation_as_resource
[
obj
,
t
+
1
]
=
participation_as_resource
[
obj
,
t
]
)
->
(
participation_as_resource
[
obj
,
t
+
1
]
=
participation_as_resource
[
obj
,
t
])
)
);
);
int
:
n_resources_types
;
% Количество различных типов ресурсов.
int
:
n_resources_types
;
% Количество различных типов ресурсов.
...
...
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