DemonstrationCampaignScenario
Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/demonstrations.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Scheduled sessions of attempt-and-reset cycles: demonstrations kept per session, the campaign that keeps target_kept of them, and the wear it puts on a gear and a cable.
Notes
Equation: Cycles=floor(active_time/(attempt+reset)); retention=(1-failure_rate)*(1-qa_rate); campaign_attempts=ceil(target/retention).
Assumptions: QA rejects only nonfailed attempts; fixed cycle costs and constant expected rejection rates.
Excludes: A confidence guarantee for retained count, fatigue-dependent rates, and stochastic wear.
References
Derivation: Whole attempt/reset cycles are packed into available session time. Sequential filtering retains the nonfailed share times the QA-surviving share; the expected retained count and nominal cycle consumption then determine the campaign budget.
Examples
The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.LatchDemonstrationCampaign
>>> scenario.attempts_per_session
52Attributes
| Name | Description |
|---|---|
| active | Available attempt-and-reset time in minutes after startup, calibration, and rest are subtracted from the session. |
| attempt | |
| attempt_time | Seconds spent executing all complete attempts, whether retained or rejected. |
| attempts_per_session | Whole attempt/reset cycles fitting the active session, rounded down. |
| cable_cycles | Cable-flex count across the modeled campaign attempts. |
| cable_flexes_opening | |
| cable_flexes_per_attempt | Cable-flex count per attempt, adding opening and return motions. |
| cable_flexes_return | |
| cable_life_used | Campaign flex count as a fraction of the declared rated cable-cycle life. |
| cable_rated_cycles | |
| calibration | |
| campaign_attempts | Attempts required in expectation to retain target_kept, rounding target divided by retention upward; not a confidence guarantee. |
| campaign_time | Scheduled campaign hours using the average attempts-per-session rate; allows a fractional final session. |
| cycle | Duration in seconds of one attempt followed by its reset. |
| failed_episodes | Expected failed attempt count per session. |
| failed_time | Expected seconds of attempt execution lost to failures. |
| failure_rate | |
| gear_cycles | Gear-reversal count across the modeled campaign attempts. |
| gear_life_used | Campaign reversal count as a fraction of the declared rated gear-cycle life; no wear distribution is modeled. |
| gear_rated_cycles | |
| gear_reversals_per_attempt | |
| idle | Unused active-session remainder in seconds after packing whole cycles. |
| kept_motion_time | Hours of motion in exactly target_kept retained demonstrations. |
| kept_per_session | Expected retained demonstrations per session; fractional because retention is probabilistic. |
| kept_share | Fraction of the scheduled session represented by retained demonstration motion. |
| kept_time | Expected retained motion duration in minutes, excluding resets and rejected attempts. |
| overhead_factor | Scheduled campaign hours divided by retained motion hours; includes session overhead and expected rejections. |
| qa_episodes | Expected QA-rejected count among attempts that did not fail. |
| qa_rate | |
| qa_time | Expected seconds rejected by QA after excluding failed attempts. |
| repeat_cable_life_used | Cumulative fraction of rated cable life for the declared number of identical campaigns. |
| repeat_campaigns | |
| reset | |
| reset_time | Seconds spent resetting across all complete attempts in a session. |
| rest | |
| retention | Expected retained fraction (1-failure_rate)*(1-qa_rate); QA rejects only otherwise successful attempts. |
| session | |
| startup | |
| target_kept |
session
Type: Quantity.
Declared default: required.
startup
Type: Quantity.
Declared default: required.
calibration
Type: Quantity.
Declared default: required.
rest
Type: Quantity.
Declared default: required.
attempt
Type: Quantity.
Declared default: required.
reset
Type: Quantity.
Declared default: required.
failure_rate
Type: float.
Declared default: required.
qa_rate
Type: float.
Declared default: required.
target_kept
Type: int.
Declared default: required.
gear_reversals_per_attempt
Type: int.
Declared default: required.
cable_flexes_opening
Type: int.
Declared default: required.
cable_flexes_return
Type: int.
Declared default: required.
gear_rated_cycles
Type: int.
Declared default: required.
cable_rated_cycles
Type: int.
Declared default: required.
repeat_campaigns
Type: int.
Declared default: 1.
active
engine.scenario_types.DemonstrationCampaignScenario.active
Available attempt-and-reset time in minutes after startup, calibration, and rest are subtracted from the session.
Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.
cycle
engine.scenario_types.DemonstrationCampaignScenario.cycle
Duration in seconds of one attempt followed by its reset.
Equation: (self.attempt + self.reset).to(‘second’)
attempts_per_session
engine.scenario_types.DemonstrationCampaignScenario.attempts_per_session
Whole attempt/reset cycles fitting the active session, rounded down.
Equation: int(self.active.to(‘second’).magnitude // self.cycle.to(‘second’).magnitude)
idle
engine.scenario_types.DemonstrationCampaignScenario.idle
Unused active-session remainder in seconds after packing whole cycles.
Equation: (self.active.to(‘second’) - self.attempts_per_session * self.cycle.to(‘second’)).to(‘second’)
retention
engine.scenario_types.DemonstrationCampaignScenario.retention
Expected retained fraction (1-failure_rate)*(1-qa_rate); QA rejects only otherwise successful attempts.
Equation: (1.0 - self.failure_rate) * (1.0 - self.qa_rate)
kept_per_session
engine.scenario_types.DemonstrationCampaignScenario.kept_per_session
Expected retained demonstrations per session; fractional because retention is probabilistic.
Equation: self.attempts_per_session * self.retention
kept_time
engine.scenario_types.DemonstrationCampaignScenario.kept_time
Expected retained motion duration in minutes, excluding resets and rejected attempts.
Equation: (self.kept_per_session * self.attempt).to(‘minute’)
reset_time
engine.scenario_types.DemonstrationCampaignScenario.reset_time
Seconds spent resetting across all complete attempts in a session.
Equation: (self.attempts_per_session * self.reset).to(‘second’)
attempt_time
engine.scenario_types.DemonstrationCampaignScenario.attempt_time
Seconds spent executing all complete attempts, whether retained or rejected.
Equation: (self.attempts_per_session * self.attempt).to(‘second’)
failed_time
engine.scenario_types.DemonstrationCampaignScenario.failed_time
Expected seconds of attempt execution lost to failures.
Equation: (self.failure_rate * self.attempt_time).to(‘second’)
qa_time
engine.scenario_types.DemonstrationCampaignScenario.qa_time
Expected seconds rejected by QA after excluding failed attempts.
Equation: (self.qa_rate * (self.attempt_time - self.failed_time)).to(‘second’)
failed_episodes
engine.scenario_types.DemonstrationCampaignScenario.failed_episodes
Expected failed attempt count per session.
Equation: self.failure_rate * self.attempts_per_session
qa_episodes
engine.scenario_types.DemonstrationCampaignScenario.qa_episodes
Expected QA-rejected count among attempts that did not fail.
Equation: self.qa_rate * (self.attempts_per_session - self.failed_episodes)
campaign_attempts
engine.scenario_types.DemonstrationCampaignScenario.campaign_attempts
Attempts required in expectation to retain target_kept, rounding target divided by retention upward; not a confidence guarantee.
Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.
campaign_time
engine.scenario_types.DemonstrationCampaignScenario.campaign_time
Scheduled campaign hours using the average attempts-per-session rate; allows a fractional final session.
Equation: (self.campaign_attempts / self.attempts_per_session * self.session).to(‘hour’)
kept_motion_time
engine.scenario_types.DemonstrationCampaignScenario.kept_motion_time
Hours of motion in exactly target_kept retained demonstrations.
Equation: (self.target_kept * self.attempt).to(‘hour’)
overhead_factor
engine.scenario_types.DemonstrationCampaignScenario.overhead_factor
Scheduled campaign hours divided by retained motion hours; includes session overhead and expected rejections.
Equation: (self.campaign_time / self.kept_motion_time).to(’’).magnitude
cable_flexes_per_attempt
engine.scenario_types.DemonstrationCampaignScenario.cable_flexes_per_attempt
Cable-flex count per attempt, adding opening and return motions.
Equation: self.cable_flexes_opening + self.cable_flexes_return
gear_cycles
engine.scenario_types.DemonstrationCampaignScenario.gear_cycles
Gear-reversal count across the modeled campaign attempts.
Equation: self.campaign_attempts * self.gear_reversals_per_attempt
cable_cycles
engine.scenario_types.DemonstrationCampaignScenario.cable_cycles
Cable-flex count across the modeled campaign attempts.
Equation: self.campaign_attempts * self.cable_flexes_per_attempt
gear_life_used
engine.scenario_types.DemonstrationCampaignScenario.gear_life_used
Campaign reversal count as a fraction of the declared rated gear-cycle life; no wear distribution is modeled.
Equation: self.gear_cycles / self.gear_rated_cycles
cable_life_used
engine.scenario_types.DemonstrationCampaignScenario.cable_life_used
Campaign flex count as a fraction of the declared rated cable-cycle life.
Equation: self.cable_cycles / self.cable_rated_cycles
repeat_cable_life_used
engine.scenario_types.DemonstrationCampaignScenario.repeat_cable_life_used
Cumulative fraction of rated cable life for the declared number of identical campaigns.
Equation: self.repeat_campaigns * self.cable_life_used