Synthetic Scenario Simulation (s2sim or syntheticsim) is a framework for studying, exercising, testing,
and evaluating problems and solutions.
S2SIM provides isolation between behavior (events or transitions) and sequencing (or timing) of behavior.
Behavior is through adaptation of EventSuper, which behavior sequencing is accomplished through provisioning
of XML using a schema (syntheticsim.xsd).
Synthetic Scenario Simulation aims to capture the dynamics of object life cycle such as:
States for a ticket could be described as available, sold, and used. Yet not all tickets for all events will
follow that exact sequence of events. Consider the overbooking policy of US airlines. In this business model,
statistical analysis suggests that a certain percentage of tickets for certain flights will not be used. To
maximize resource utilization (plane seats), the number of sold tickets is greater than the number of seats.
However, the goal is to consistently utilize 100% of the seats even when a percentage of the tickets are never
- Event ticket
- Ticket exists
- Point of sale
Often a solution represents one of more aspects of a system of collaborating processes. A vending solution could be
described as four (or more) collaborating processes: point of sale (PoS), PoS inventory (or items), consumers,
and technicians. The PoS might be a vending machine which collects currency for cusumers to purchase available items.
A technician services the vending machine to collect cash and restock items.
Realistically, events occur in somewhat randomly. After study of a system, some
predicability can be derived and the the collaborating processes can be modeled to satisfy (or optimize) the desired
system outcome. For example, consider that the vending system described above is to offer sun shades and rain umbrellas
adjacent the tube stations near Regent's park in London. We might observe:
Given this our optimized system solution could adjust item selection based on weather and servicing based on customer
- Full days of light rain
- Large number of consumers visiting the gardens
- High variations in temperature with late warming in the morning and early cooling in evening
- Many days of dry high temperatures with consistent intense ultraviolet radiation
- Few days with heavy rain fall late in the afternoon and significant temperature drops for only a few hours
- Maximum visitor populations due to numerous summer festivals which typically run between 1000 and 1600
Describe processing using the S2SIM scenario scriping language (syntheticsim.xsd).
Returning to the ticketing example, consider an event ticket sales system:
A set of scenarios in S2SIM could be described as:
- Event tickets
- After 2 hours typically only 20% of tickets are available
- Typically tickets for 10 to 25 new event become are available on Saturday at 1000
- Event tickets are no longer available after 9 days
- After the initial 2 hours of availility event ticket sales are highly sporadic with approximately
1% of tickets sold every 1/2 day
Each ticket life cycle (or event sequence) could be described as:
- Every Saturday at 1000
- Create between 10,000 and 300,000 tickets for each of 8 to 30 new events
Use S2SIM to study and test this system by providing state (or instance)
implementations for a ticket. This might include event idenfication, sold status, availability time, sold time.
Provide an configurable S2SIM creator (factory) implemention to construct and initialize the state objects based
event idenitication and number of tickets, and provide implementations of events such as a sold event which
updates the sold status and time on a ticket.
- 80% probability of being sold in 2 hours
- 20% probability of being sold beween 2 and 214 hours
With Synthetic Scenario Simulation the implementation behavior/events is separated from the scenarios. S2SIM provides
a easy to adapt application programming interface (API) for stateful objects, events, and
factories (creators). Scenarios are expressed in the XML scripting language and run in the S2SIM interpreter/simulator.
Things S2SIM can do:
Learn, use, and contribute to S2SIM. Contact me for any questions, comments, or
- Simulate any number of complex systems with simple API adaptation and scripting
- Produce repeatable test data with nearly any envisioned interface: Web services, RDBMS, XML, API,
shared memory, HTTP, etc.
- Facilitate ad-hoc testing and evolving system usage
- Predict system capacity