From a2c498464ff09969bc6a98e475b82d44002fabeb Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 15 Aug 2024 04:00:41 +0200 Subject: cleanup and remove specs dir --- specs/06.Demand.md | 55 ------------------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 specs/06.Demand.md (limited to 'specs/06.Demand.md') diff --git a/specs/06.Demand.md b/specs/06.Demand.md deleted file mode 100644 index b42348a2..00000000 --- a/specs/06.Demand.md +++ /dev/null @@ -1,55 +0,0 @@ - -# Demand - -Every tick(?TODO: specify further), a probability is sampled from [the demand equation](#the-demand-equation), -that number is then multiplied by the [traffic coefficent](#traffic-coefficent), -that number is then multiplied by the [demand bias](#the-demand-bias), -that will give a probability on whether a customer will be spawned on this tick. - -### The Demand Equation -$$\sin\left(3\sin\frac{\left(hour+offset\right)}{2}\right)+1$$ -```c -demand = sin(3*sin((hour+offset)/2))+1 -``` -(always nonnegative below 2) - -every day the `offset` will be offset by `[-1,1]` multiplied by the [sway coefficent](#sway-coefficent). -```c -offset += rand(-1,1) * sway -``` - -### The Demand Bias -Demand scale starts at 0%. -(from -50% to +50%) - -every day the `bias` will be offset by `[-10,10]` multiplied by the [sway coefficent](#sway-coefficent). -(clamped to -50% & 50%). -```c -bias += rand(-10,10) * sway -bias = clamp(bias,-50,50) -``` - -### Traffic Coefficent -Usually 1% -can be changed by the host. - -### Sway Coefficent -Usually 50% -can be changed by the host. - -- cgit v1.2.3-70-g09d2