Maybe faster?
This commit is contained in:
parent
ba66ba67ca
commit
8f528dcc20
@ -111,6 +111,13 @@ function nextSetOfScenarios(scenarios, callback){
|
||||
console.log("start", scenarios.length);
|
||||
p.map(scenarios, possibleScenarios, (err, scenarios)=>{
|
||||
scenarios = scenarios.reduce((a, b)=>(a.concat(b)), []);
|
||||
var allscenarios = [];
|
||||
for(var scenarioSet of scenarios){
|
||||
for(var scenario of scenarioSet){
|
||||
allscenarios.push(scenario);
|
||||
}
|
||||
}
|
||||
scenarios = allscenarios;
|
||||
console.log("possibilities", scenarios.length);
|
||||
p.filter(scenarios, scenarioCheckFloors, (err, scenarios)=>{
|
||||
console.log("valid", scenarios.length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user