-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (33 loc) · 904 Bytes
/
index.js
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
import { getProcessData } from './util/process.js';
import { simulate } from './heuristic/index.js';
import { cliHandler } from './cli/handler.js';
const simulationProcess = Object.values(simulate())[0];
const cliOptions = cliHandler();
let epochs = 1;
let epochData;
const initSimulationData = () => {
let iterations = [];
let simulation = {
factible: [true],
methods: [],
schema: [],
limitVolume: 0,
volume: [0],
cost: [0],
};
return [simulation, iterations];
};
while (epochs <= getProcessData().EPOCHS) {
if (getProcessData().LOGGER === '1') {
console.log(
`\n
---------------------------------------------------\n
\t\t\tRunning epoch ${epochs}\n
---------------------------------------------------\n
`
);
}
epochData = initSimulationData();
simulationProcess(epochData[0], epochData[1], epochs, cliOptions);
epochs += 1;
}