-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.mcs
More file actions
35 lines (30 loc) · 1.82 KB
/
Copy pathbackup.mcs
File metadata and controls
35 lines (30 loc) · 1.82 KB
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
local module_sim = AddModule("StartRecover","Start Recover")
local prm_sim = AddParameter(module_sim, nil, "node", "Disruption Parameters")
PORT1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port", 57)
CTIME1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port`s close time", 240)
OTIME1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port`s open time", 240)
PORT2 = AddParameter(module_sim, prm_sim, "value", "First disrupted port", 0)
CTIME1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port`s close time", 0)
OTIME1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port`s open time", 0)
PORT3 = AddParameter(module_sim, prm_sim, "value", "First disrupted port", 0)
CTIME1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port`s close time", 0)
OTIME1 = AddParameter(module_sim, prm_sim, "value", "First disrupted port`s open time", 0)
YEAR = AddParameter(module_sim, prm_sim, "value", "Year", 2018)
MONTH = AddParameter(module_sim, prm_sim, "value", "Month", 2)
DAY = AddParameter(module_sim, prm_sim, "value", "Day", 28)
function StartRecover()
local starttime = os.clock()
package.path = package.path .. ';module/?.lua'
require 'GetData_CG' --load the data get: flights, airports, aircrafts and nodes, crafts
require 'Toposort'
require 'BuildCraftGraphs'
require 'BuildCraftRoutes'
require 'SolveMaster'
--require 'mobdebug'.off()
GetData() ---flights, airports, aircrafts
build_craft_graphs() ---nodes, crafts, fSet
build_craft_routes() ---routes
SolveMaster(true)
--require 'mobdebug'.on()
print(os.clock()-starttime)
end