Simulation Optimization
Running multiple parameterized simulations, and examining the results has given us a good deal of information about the behavior of this simulation model.
However, if we take just a few more steps we can answer the question, "How many tickets should we sell to realize the maximum expected net revenue?"
Open the third example, UGYieldManagement3.json or follow the steps below to create UGYieldManagement3.json from UGYieldManagement1.json.
- Change the modelType property to "optimization". If left at "modelType":"simulation", only a simulation will be performed, not a simulation optimization.
- Replace parameters with variables and define sold as an integer variable (since we can't sell fractional tickets) with a lower bound of 0 (since we can't sell a negative number of tickets). We are interested in the value of this variable in the solution, so we must ask for the finalValue to be returned in the result.
sold: {
dimensions: [1],
lower: 0,
finalValue: []
},
- Replace uncertainFunctions with objective and maximize the expected value of the formula.
objective: {
revenue: {
formula: "price*(sold - refund_no_shows*Round(no_shows, 0) - refund_overbook*overbook)",
chanceType: "ExpVal", type: "maximize", finalValue: [}
}
- Replace numSimulations: 51 with simulationOptimization: True in modelSettings.
modelSettings: { simulationOptimization: True, numTrials: 1000, randomSeed: 1 },
Here is the complete model.
{
modelName: "UGYieldManagement3",
modelType: "optimization",
modelSettings: {
simulationOptimization: true,
numTrials: 1000,
randomSeed: 1
},
variables: {
sold: {
lower: 0,
upper: 500,
type: "integer",
finalValue: []
}
},
data: {
price: {
value: 200
},
capacity: {
value: 100
},
refund_no_shows: {
value: 0.5
},
refund_overbook: {
value: 1.25
}
},
uncertainVariables: {
no_shows: {
formula: "PsiLogNormal(0.1*sold, 0.06*sold)"
}
},
formulas: {
show_ups: {
formula: "sold - Round(no_shows, 0)"
},
overbook: {
formula: "Max(0, show_ups - capacity)"
}
},
objective: {
revenue: {
formula: "price*(sold - refund_no_shows*Round(no_shows, 0) - refund_overbook*overbook)",
chanceType: "ExpVal",
type: "maximize",
finalValue: []
}
}
}
Solve once again either by clicking Optimize in the Desktop IDE Editor, if using the RASON Web IDE, first post the model using
POST rason.net/api/model then run a simulation optimization using POST rason.net/api/model/{nameorid}/optimize in the WEB IDE.
{
"status": {
"code": 2,
"id": "2590+UGYieldManagement3+2020-03-20-14-19-27-538120",
"codeText": "Solver cannot improve the current solution. All
constraints are satisfied."
},
"variables": {
"sold": {
"finalValue": 117
}
},
"objective": {
"revenue": {
"finalValue": 20620.2
}
}
}
As shown on the right in the above screenshot, the decision variable, sold, has a final value of 117 and the expected value of net
revenue for this number of tickets sold is little over $20,000. We now have an answer to our question "How many tickets should we sell to realize the
maximum expected net revenue?"
|