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
a3e421a5
Commit
a3e421a5
authored
Dec 04, 2018
by
Vladislav Kiselev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Перенёс в другое место.
parent
10add7b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
src/constraints/conversion_0.mzn
src/constraints/conversion_0.mzn
+3
-4
src/constraints/conversion_1.mzn
src/constraints/conversion_1.mzn
+4
-4
No files found.
constraints/conversion_0.mzn
→
src/
constraints/conversion_0.mzn
View file @
a3e421a5
...
@@ -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
])
)
)
);
);
...
...
constraints/conversion_1.mzn
→
src/
constraints/conversion_1.mzn
View file @
a3e421a5
...
@@ -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"
,
...
...
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