Update stages, planning script
This commit is contained in:
rodič
debe16aaee
revize
1783415f2f
Rozdílový obsah nebyl zobrazen, protože je příliš veliký
Načíst rozdílové porovnání
|
@ -16,8 +16,8 @@
|
|||
- '2/10:00-13:00'
|
||||
- '2/13:30-18:30'
|
||||
|
||||
- id: sloupcovy-sal
|
||||
name: Sloupcový sál
|
||||
- id: klenbovy-sal
|
||||
name: Klenbový sál
|
||||
types: [ talk, lightning-series ]
|
||||
times:
|
||||
- '1/09:30-13:00'
|
||||
|
@ -57,7 +57,7 @@
|
|||
types: [ campfire ]
|
||||
times:
|
||||
- '1/09:30-12:00'
|
||||
- '1/12:30-22:00'
|
||||
- '1/12:30-20:00'
|
||||
- '2/10:00-12:00'
|
||||
- '2/12:30-18:30'
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
types: [ campfire ]
|
||||
times:
|
||||
- '1/09:30-12:00'
|
||||
- '1/12:30-21:00'
|
||||
- '1/12:30-20:00'
|
||||
- '2/10:00-12:00'
|
||||
- '2/12:30-18:30'
|
||||
|
||||
|
|
|
@ -488,9 +488,21 @@ async function main() {
|
|||
}
|
||||
}
|
||||
|
||||
function bestScore() {
|
||||
return Math.round(
|
||||
plans.reduce((prev, cur) => {
|
||||
if (cur.metrics.score > prev) {
|
||||
return cur.metrics.score;
|
||||
}
|
||||
return prev;
|
||||
}, 0) * 10000,
|
||||
) / 10000;
|
||||
}
|
||||
|
||||
if (plans.length >= numResults) {
|
||||
console.log(
|
||||
"---------------------\n" + infoStats(startTime, plans.length),
|
||||
"---------------------\n" + infoStats(startTime, plans.length) +
|
||||
`, best score: ${bestScore()}`,
|
||||
);
|
||||
const outputFn = "./dist/22/schedule-candidates.json";
|
||||
console.log(`Writing result: ${outputFn}`);
|
||||
|
@ -503,9 +515,9 @@ async function main() {
|
|||
|
||||
if (i % 1000 === 0) {
|
||||
console.log(
|
||||
`${i}/${limit} - solutions: ${plans.length}, ${
|
||||
`${i}/${limit || "∞"} - solutions: ${plans.length}, ${
|
||||
infoStats(startTime, plans.length)
|
||||
}`,
|
||||
}, best score: ${bestScore()}`,
|
||||
);
|
||||
}
|
||||
i++;
|
||||
|
|
Načítá se…
Odkázat v novém úkolu