-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnet1-v2.json
98 lines (97 loc) · 2.92 KB
/
net1-v2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"PROBLEM": {
"NAME": "general_transshipment v2.0",
"REFERENCE": "https://ampl.com/BOOK/EXAMPLES/EXAMPLES2/net1.mod",
"AUTHOR": "Jeremy A. Bloom ([email protected])",
"NOTICES": "Copyright © 2019 Jeremy A. Bloom"
},
"INPUT_DATA_MODEL": {
"cities": {
"*city": "String",
"netSupply": "Double"
},
"links": {
"*origin": "String",
"*destination": "String",
"cost": "Double",
"capacity": "Double"
}
},
"Output_Data_Model": {
"ship": {
"*origin(city)": "String",
"*destination(city)": "String",
"packages": "Double"
}
},
"DATA": {
"cities": [
{"city": "PITT", "netSupply": 450.0},
{"city": "NE", "netSupply": 0.0},
{"city": "SE", "netSupply": 0.0},
{"city": "BOS", "netSupply": -90.0},
{"city": "EWR", "netSupply": -120.0},
{"city": "BWI", "netSupply": -120.0},
{"city": "ATL", "netSupply": -70.0},
{"city": "MCO", "netSupply": -50.0}
],
"links": [
{"origin": "PITT", "destination": "NE", "cost": 2.5, "capacity": 250.0},
{"origin": "PITT", "destination": "SE", "cost": 3.5, "capacity": 250.0},
{"origin": "NE", "destination": "BOS", "cost": 1.7, "capacity": 100.0},
{"origin": "NE", "destination": "EWR", "cost": 0.7, "capacity": 100.0},
{"origin": "NE", "destination": "BWI", "cost": 1.3, "capacity": 100.0},
{"origin": "SE", "destination": "EWR", "cost": 1.3, "capacity": 100.0},
{"origin": "SE", "destination": "BWI", "cost": 0.8, "capacity": 100.0},
{"origin": "SE", "destination": "ATL", "cost": 0.2, "capacity": 100.0},
{"origin": "SE", "destination": "MCO", "cost": 2.1, "capacity": 100.0}
]
},
"VARIABLES": [
{
"NAME": "ship",
"TYPE": "Continuous",
"INDEX": "links",
"BOUNDS": {"LOWER": "0.0", "UPPER": "ship*.capacity"}
}
],
"CONSTRAINTS": [
{
"NAME": "balance",
"TYPE": "CONTINUOUS",
"INDEX": "cities",
"BOUNDS": {"LOWER": "balance*.netSupply", "UPPER": "balance*.netSupply"}
}
],
"DECISION_EXPRESSIONS": [
{
"NAME": "totalCost",
"TYPE": "LINEAR",
"INDEX": "SELF",
"SENSE": "MINIMIZE"
}
],
"COEFFICIENTS": [
{
"NAME": "balance_shipFrom",
"CONSTRAINTS": "balance",
"VARIABLES": "ship",
"CONDITION": "balance*.city == ship*.origin",
"ENTRIES": "1.0"
},
{
"NAME": "balance_shipTo",
"CONSTRAINTS": "balance",
"VARIABLES": "ship",
"CONDITION": "balance*.city == ship*.destination",
"ENTRIES": "-1.0"
},
{
"NAME": "total_ship",
"DECISION_EXPRESSIONS": "totalCost",
"VARIABLES": "ship",
"CONDITION": "ship* MATCHES links",
"ENTRIES": "links.cost"
}
]
}