// Reproducible generous-feed throughput and settled pile angles for t42. const { load, flatWorld } = require(process.env.DG_HARNESS || '../../test/harness'); const { run } = load(); const assert = require('node:assert/strict'); for (const material of ['SAND','GRAVEL','CUORE','COAL']) { const rates=[]; for (const grade of [0,-1]) { flatWorld(run,256,224,208); run(`RS=7;money=1e6;AMB.fill(20);temp.fill(20);hot.fill(0); for(let k=0;k<10;k++)placeBlock(${grade?'BP_BELT_UP':'BP_BELT'},1,16+k,${grade?32:24}+k*${grade},true); for(let x=10;x<16;x++)placeBlock(BP_BELT,1,x,${grade?33:24},true); for(let x=26;x<32;x++)placeBlock(BP_BELT,1,x,${grade?23:24},true);`); const result=run(`(()=>{let out=0;for(let k=0;k<1420;k++){ for(let l=1;l<=4;l++){const i=(${grade?132:96}-l)*W+44;if(mat[i]===EMPTY)setCell(i,${material},20,0);} simTick(); for(let i=0;i=128){if(k>=220)out++;setCell(i,EMPTY,20,0);} for(let j=flyers.length-1;j>=0;j--)if(flyers[j].m===${material} && flyers[j].x>=128){if(k>=220)out++;flyers.splice(j,1);} }return out/20;})()`); rates.push(result); } flatWorld(run,256,224,208); run(`RS=7;AMB.fill(20);temp.fill(20);hot.fill(0); for(let y=120;y<160;y++)for(let x=118;x<138;x++)setCell(y*W+x,${material},20,0); for(let k=0;k<1200;k++)simTick();`); // Apparent settled angle: heap height divided by half its footprint width. const angle=run(`(()=>{let top=H,left=W,right=0;for(let i=0;i=60 && rates[1]<=rates[0]*1.1, `${material} slope rate outside the target`); console.log(`${material}: flat ${rates[0].toFixed(1)}, uphill ${rates[1].toFixed(1)} grains/s; pile angle ${angle.toFixed(1)} degrees`); }