Initializing help system before first use

# Model.find_identifier

Purpose
Retrieve the value of a public Mosel entity from the model's dictionary.
Synopsis
`function model.find_identifier(identifier, use_pandas=None) -> object`
Arguments

identifier | Name of the Mosel entity (variable, array, set, etc.)
use_pandas | If True, return arrays as pandas Series/DataFrame. If False or None (default), return as Python dict.

Return value
The value of the entity, converted to an appropriate Python type
Example
Read entities after execution:

    model.run()
    n = model.find_identifier("n")              # Scalar (integer)
    result = model.find_identifier("result")     # Array as dict
    series = model.find_identifier("result", True) # Array as pandas Series

Further information
1. The entity must be declared with the explicit public keyword in the Mosel source (either via a public declarations block or an individual public qualifier). A RuntimeError is raised if the entity is not found.
2. Can retrieve scalars ( integer, real, boolean, string, text), arrays, sets, and lists. When the model is compiled with debug information (flags -g or -G), both public and private symbols can be accessed.
3. Type conversion follows standard Mosel-to-Python mappings: integer to int, real to float, string to str, boolean to bool, mpvar and linctr to their solution values, arrays to dict or pandas Series, sets to Python sets. The text type from mmsystem is returned as its string representation. Other external types from Mosel modules (including date and time from mmsystem) are not supported and raise a RuntimeError.
4. Procedures and functions in the model's dictionary cannot be retrieved as Python objects. Union types are also not supported. Attempting to retrieve these raises a RuntimeError.
Related topics
Model.run, Model.get_annotations
Module
moselpy
Parent Topic Model Class

© 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.