execute_model
Purpose
Synopsis
function execute_model(src_file, options=None, exec_params=None, input_data=None) -> tuple[Model, dict]
Arguments
|
src_file
|
Path to the Mosel source file (
.mos)
|
|
options
|
Compiler options string
|
|
exec_params
|
Execution parameters as a dictionary of
str keys and values
|
|
input_data
|
Input data dictionary for the
moselpy: I/O driver
|
Return value
A tuple
(model, output) where
model is the
Model object and
output is a dictionary of data written by the model via
initializations to "moselpy:"
Example
Quick execution:
model, output = mp.execute_model("model.mos")
print(model.exec_status)
Further information
1. This is a convenience function that combines compilation and execution. The model is compiled to an in-memory BIM, loaded, and executed.
2. For production use or repeated execution, prefer
compile_model followed by
load_model to avoid recompilation overhead.
Related topics
Module
moselpy
© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
