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
02688907
Commit
02688907
authored
Apr 01, 2019
by
Vladislav Kiselev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Нетепизированный формат возвращён к жизни.
parent
0e9f1054
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
src/constraints/conversion_1.mzn
src/constraints/conversion_1.mzn
+1
-1
src/inport/ConversionUtil.java
src/inport/ConversionUtil.java
+10
-6
src/inport/Main.java
src/inport/Main.java
+1
-0
No files found.
src/constraints/conversion_1.mzn
View file @
02688907
...
@@ -279,7 +279,7 @@ constraint forall (obj in 1..n_moving_obj, t in 1..n_intervals) ( % Само о
...
@@ -279,7 +279,7 @@ constraint forall (obj in 1..n_moving_obj, t in 1..n_intervals) ( % Само о
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"
,
show
(
op_status
),
"\n\n"
,
"op_status = "
,
show
(
op_status
),
"\n\n"
,
"m_obj_loc = "
,
show
(
m_obj_loc
),
"\n\n"
,
"m_obj_loc = "
,
show
(
m_obj_loc
),
"\n\n"
,
"op_fin = "
,
show
(
op_fin
),
"\n\n"
,
"op_fin = "
,
show
(
op_fin
),
"\n\n"
,
"op_start = "
,
show
(
op_start
),
"\n\n"
,
"op_start = "
,
show
(
op_start
),
"\n\n"
,
...
...
src/inport/ConversionUtil.java
View file @
02688907
...
@@ -875,10 +875,14 @@ public class ConversionUtil {
...
@@ -875,10 +875,14 @@ public class ConversionUtil {
}
}
}
}
private
void
movingObjectLocationDefinition
()
throws
IOException
{
private
void
movingObjectLocationDefinition
(
boolean
isV1
)
throws
IOException
{
writeArray
(
writer
,
"is_mooring_op"
,
isMooringOp
);
if
(!
isV1
)
{
writeArray
(
writer
,
"main_obj_of_operation"
,
mainObjOfOperation
,
(
Integer
val
)
->
val
+
1
);
writeArray
(
writer
,
"is_mooring_op"
,
isMooringOp
);
writeArrayOfSetAs2DArray
(
writer
,
"moving_op_of_obj"
,
movingOpOfObj
,
true
,
true
);
writeArray
(
writer
,
"main_obj_of_operation"
,
mainObjOfOperation
,
(
Integer
val
)
->
val
+
1
);
writeArrayOfSetAs2DArray
(
writer
,
"moving_op_of_obj"
,
movingOpOfObj
,
true
,
true
);
}
else
{
writeArrayOfSetAs2DArray
(
writer
,
"moving_op_of_obj"
,
movingOpOfObj
,
true
,
false
);
}
writeArray
(
writer
,
"operations_destination"
,
operationsDestination
,
(
Integer
val
)
->
val
+
1
);
writeArray
(
writer
,
"operations_destination"
,
operationsDestination
,
(
Integer
val
)
->
val
+
1
);
writer
.
write
(
"\n"
);
writer
.
write
(
"\n"
);
}
}
...
@@ -935,7 +939,7 @@ public class ConversionUtil {
...
@@ -935,7 +939,7 @@ public class ConversionUtil {
writer
.
write
(
"n_moving_obj = "
+
movingObjects
.
size
()
+
";\n"
);
writer
.
write
(
"n_moving_obj = "
+
movingObjects
.
size
()
+
";\n"
);
writer
.
write
(
"\n"
);
writer
.
write
(
"\n"
);
movingObjectLocationDefinition
();
movingObjectLocationDefinition
(
true
);
initialLocations
();
initialLocations
();
weatherWindows
();
weatherWindows
();
operationsContinuity
();
operationsContinuity
();
...
@@ -1150,7 +1154,7 @@ public class ConversionUtil {
...
@@ -1150,7 +1154,7 @@ public class ConversionUtil {
writer
.
write
(
"n_moving_obj = "
+
movingObjects
.
size
()
+
";\n"
);
writer
.
write
(
"n_moving_obj = "
+
movingObjects
.
size
()
+
";\n"
);
writer
.
write
(
"\n"
);
writer
.
write
(
"\n"
);
movingObjectLocationDefinition
();
movingObjectLocationDefinition
(
false
);
initialLocations
();
initialLocations
();
finalLocations
();
finalLocations
();
weatherWindowsNewFormat
();
weatherWindowsNewFormat
();
...
...
src/inport/Main.java
View file @
02688907
...
@@ -116,6 +116,7 @@ public class Main {
...
@@ -116,6 +116,7 @@ public class Main {
}
}
case
"testing"
:
case
"testing"
:
test_2
();
test_2
();
test_1
();
break
;
break
;
case
"testing_2"
:
case
"testing_2"
:
test_2_0
();
test_2_0
();
...
...
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