Scenarios
An Elara model can be simulated in one or more scenarios. In this less you will learn how scenarios can be used to produce recommendations in Elara.
Comparing scenarios
A scenario encapsulates everything Elara needs to perform a simulation (and optimization). It includes the structure of the resources and processes in the model, as well as the initial resource values and any initially enqueued processes to execute.
We can create distinct scenarios to simulated related models. For example we might try and predict the future based on business-as-usual operations, and making some change to our business. In this way we can compare the results from the baseline scenario and the modified scenario to predict the impact of a change before you make it.
Setting up scenarios
A scenario is created in Elara by one of three approaches:
- You can create a scenario from scratch, declaring all the resources and processes that make up the model.
- You can copy another scenario, replicating all the processes and resources. You can make modifications like adds more resources and processes, changing the initial resource values, define optimizatin objectives, etc.
- You can continue another scenario, for example continuing a existing simulation of historic events through to another making future predictions.
In this way you can create a series of scenarios that are related to each other. You can create a causal relationship between one scenario and another by continuing the first. You can copy a scenario and modify some initial resource values (for example, a policy setting the processes will follow) to create two scenarios to compare and contrast.
This makes it easy to create "what if?" scenarios for your business. With a small change you could ask a whole variety of questions, for example:
- What if we increased our prices?
- What if one of our suppliers went out of business?
- What if we changed our operating hours?
- What if we changed an internal policy setting (that guides the behavior of operations)?
By comparing scenarios before and after a change, you can see the advantages and disadvantages of making certain decisions. This allows you to make informed decisions to improve your business.
Interactive control
One useful pattern you can use in Elara is to configure one or more scenarios for end-user control. The typical use case is to create an online dashboard where a user can modify the scenario by hand, and view the resulting outcomes. They can "poke and prod" the model interactive and get a feeling how it reacts. Or they can use it to try and guide decisions in their business.
For example, you may create a dashboard where you can configure the shift schedule of your staff members, and see how that impacts your bottom line. Users might set price levels, manually prioritize tasks to perform, or modify policy. The dashboard can contain a mixture of user-editable forms and tables, as well as simulation results and visual reports. Elara will produce the results as quickly as possible whenever input are modified and update the results on the dashboard. For simpler models this will enable near-real-time feedback.
Patch data streams are particularly useful for creating scenarios where some tabular input (initial resource value) is to be controlled by the user. With the patch stream you can identify the precise changes between your interactive scenario and baseline scenario.
Automatic scenario optimization
Elara can employ advanced optimization algorithms to determine the best decisions for your business – meaning those that advance the objectives of your organization the most. To do so, you must set up an objective for the scenario and a set of decision options to explore.
Optimization objective
The optimization objective is a floating-point number measuring the desirability of your outcomes. It is an expression of the simulation results – the state of the resources at the end of the simulation. It gives a mathematical target for the optimizer to maximize.
A simple example might be a business wanting to maximize its profit, or financial position on a certain future date. In an operational scenario, you may want to maximize the throughput or minimize the latency of tasks going through a department (or both).
You can add penalties to your objective function to add guardails for the optimizer to follow. Adding a penalty is as simple as subtracting a (large) number from the objective whenever the undesirable behavior is observed. You can use this to minimize risks, avoid policy violations, or implement "soft" constraints (instead of programming "hard" constraints into the simulation model directly). The optimizer will naturally avoid penalties while attempting to maximize the objective.
One thing to watch out for is rewarding perverse behavior. For example, if your objective is to maximize your cash position on a certain date, the optimize might decide to hold a firesale to maximise cash at all costs. This is a legitimate approach to acquire some cash in the short term (the optimizer isn't wrong per se) but it may bankrupt your company regardless!
To work around this, you may need to perform some financial accounting to include the nominal value of your inventory in the objective as well, for example. Every situation is different and careful consideration should be applied when choosing an objective function.
What are my options?
The second part of defining an optimized scenario is declaring which decisions Elara should optimize.
The optimizer is able to modify the initial resource values for the scenario. That means, the things you want to optimized need to expressed as resources.
Sometimes this falls out naturally. If you had a list of products you sold, and the price you sold them at, you could direct Elara to optimize the sale price. If this has an effect on demand, there will some optimal price that maximizes profit.
Another situation might be optimize a rostering situation. Here you could optimize each shift individually. Alternatively you might optimize the regular schedule that your staff repeat every week. Or you might simply control how many staff are on for a given shift.
As you can see, there are several levels of abstraction you might be working with. Sometimes your decision might relate to policy settings in your organization. For example, how much stock should a retailer target for a given inventory item? At what point do they re-order stock? Restocking is a process that will happen dynamically during the simulation. The policy setting will indirectly control events in the simulation by automatically triggering stock orders according to policy. You may sometimes need to add a resource containing policy settings and refactor your simulation processes to refer to policy settings in order to get this to work.
One reason to prefer policy settings to micro-managing individual events is because the optimizer works fastest when there are few decision points to optimize. No matter what approach you wish to take, Elara's optimizer is incredibly flexible and will generally accommodate your needs.
Next Steps
You now have an understanding of scenarios and simulation models in Elara. In the next module, you will learn how to build a solution including a model.