Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

SimConfig

Struct SimConfig 

Source
pub struct SimConfig {
Show 14 fields pub drive: DriveModel, pub pool_pages: u32, pub lead_radius: u32, pub keep_radius: u32, pub speed_units_per_second: u32, pub max_in_flight: u8, pub tick_micros: u32, pub install_ticks: u32, pub fail_every: u32, pub placement: Placement, pub movable: bool, pub step_budget: u32, pub pinned: Vec<u32>, pub warm_start: bool,
}
Expand description

Simulator knobs.

Fields§

§drive: DriveModel

The drive.

§pool_pages: u32

Pages in the region pool.

§lead_radius: u32

Regions within this walk distance of the player are requested (lead ring), nearest first.

§keep_radius: u32

Unwanted regions within this distance are in the hysteresis band.

§speed_units_per_second: u32

Player speed assumed for lead deadlines, units per second. The default is the design’s v_max of 470, a design estimate, not a measurement.

§max_in_flight: u8

Transport depth.

§tick_micros: u32

Microseconds per simulated tick (16 667: 60 Hz).

§install_ticks: u32

Ticks of install work after a region lands (0: none, the region is resident when read). The design lists the install cost as unmeasured.

§fail_every: u32

Every Nth read fails (0: none).

§placement: Placement

Placement policy of the pool.

§movable: bool

Whether compaction may move regions.

§step_budget: u32

Bookkeeping budget per step, passed on as the step_budget of the [psx_residency::Config].

§pinned: Vec<u32>

Regions pinned for the whole run (the home pin), at demand class.

§warm_start: bool

Load the start region’s needs before the route begins (a loading screen at boot), not counted in the report.

Implementations§

Source§

impl SimConfig

Source

pub fn new(pool_pages: u32, lead_radius: u32) -> Self

Defaults: double-speed nominal drive, queue depth 2, 60 Hz ticks, no install cost, no failures, best-fit, movable, warm start, keep radius one quarter beyond the lead radius.

Trait Implementations§

Source§

impl Clone for SimConfig

Source§

fn clone(&self) -> SimConfig

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SimConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for SimConfig

§

impl RefUnwindSafe for SimConfig

§

impl Send for SimConfig

§

impl Sync for SimConfig

§

impl Unpin for SimConfig

§

impl UnsafeUnpin for SimConfig

§

impl UnwindSafe for SimConfig

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.