Outputs
HtmlOutputConfig
Bases: PrettyModel
Configuration for HTML outputs.
Source code in src/passengersim/config/outputs.py
bid_price_history
class-attribute
instance-attribute
Include bid price history in the HTML report.
bookings_by_timeframe
class-attribute
instance-attribute
Include bookings by timeframe in the HTML report.
If this is a list of strings, include only the specified carriers.
carrier_load_factors
class-attribute
instance-attribute
Include carrier load factors in the HTML report.
carrier_local_share
class-attribute
instance-attribute
Include carrier local share in the HTML report.
carrier_rasm
class-attribute
instance-attribute
Include carrier RASM in the HTML report.
carrier_revenue_distribution
class-attribute
instance-attribute
Include carrier revenue distribution in the HTML report.
carrier_revenues
class-attribute
instance-attribute
Include carrier revenues in the HTML report.
carrier_table
class-attribute
instance-attribute
Include carrier table in the HTML report.
carrier_total_bookings
class-attribute
instance-attribute
Include carrier total bookings in the HTML report.
carrier_yields
class-attribute
instance-attribute
Include carrier yields in the HTML report.
configs
class-attribute
instance-attribute
Include these configuration items in the HTML report.
displacement_history
class-attribute
instance-attribute
Include displacement history in the HTML report.
fare_class_mix
class-attribute
instance-attribute
Include fare class mix in the HTML report.
This figure is always by carrier.
filename
class-attribute
instance-attribute
Write HTML outputs to this file after a run.
If this is None or False, no HTML outputs will be written. If True, HTML outputs will be written to a standard named file after a run, or give the exact filename of the file to be written.
leg_load_factor_distribution
class-attribute
instance-attribute
Include leg load factor distribution in the HTML report.
metadata
class-attribute
instance-attribute
Include simulation run metadata in the HTML report.
segmentation_by_timeframe_table
class-attribute
instance-attribute
Include segmentation by timeframe table in the HTML report.
title
class-attribute
instance-attribute
Title of the HTML report.
If this is None, the title will be the scenario name.
OutputConfig
Bases: PrettyModel
Source code in src/passengersim/config/outputs.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
base_dir
class-attribute
instance-attribute
Base directory for all output files.
Whenever an output file is designated as a simple filename or a relative path, it will be relative to this directory.
If not provided, the current working directory will be used.
disk
class-attribute
instance-attribute
Write the SimulationTables output to this file after a run.
This will use pxsim format, an efficient binary file that allows "lazy" file
loading. If set to True, the file will be named with the same name as
the HTML output file, except with the extension .pxsim, unless there is no
HTML output file, in which case no file will written.
excel
class-attribute
instance-attribute
Write excel outputs to this file after a run.
filename_stem
class-attribute
instance-attribute
Default stem for all output files.
If an output file is designated as True instead of giving an explicit
filename, then this stem will be used with an appropriate file extension.
html
class-attribute
instance-attribute
html: HtmlOutputConfig = HtmlOutputConfig()
Configuration for HTML outputs.
log_reports
class-attribute
instance-attribute
Write basic reports directly to the run log.
pickle
class-attribute
instance-attribute
Write a pickle of the SimulationTables output to this file after a run.
reports
class-attribute
instance-attribute
Reports to include.
Database queries reports can be included here. This is important for multiprocessing runs with in-memory databases, as database results will not be available after the database connection is closed in each subprocess.
If this is a set containing only "*", all reports will be included; this may be computationally expensive.
sim_state
class-attribute
instance-attribute
sim_state: StateOutputConfig = StateOutputConfig()
Configuration for writing simulation dynamic state after each trial.
In contrast with the static state, the dynamic state includes things that are created or change during a trial of the simulation, such as attribute counters, histories, and summaries. The dynamic state is the information needed to recreate the Simulation object (beyond the contents of the Config) to facilitate various debugging and introspection.
get_output_filename
get_output_filename(
which: Literal[
"html", "disk", "pickle", "sim_state", "excel"
],
timestamp: str
| float
| struct_time
| datetime
| None = None,
make_dirs: bool = False,
**kwargs,
) -> Path | None
Source code in src/passengersim/config/outputs.py
serialize_reports
Source code in src/passengersim/config/outputs.py
StateOutputConfig
Bases: PrettyModel
Source code in src/passengersim/config/outputs.py
filename
class-attribute
instance-attribute
Save the state of the simulation to this file after each trial.
Accepts fields basename and trial, use double square brackets to
insert these values.
include_trials
class-attribute
instance-attribute
Include trials when saving dynamic state.
If left empty, all trials will be included.