setentname
Purpose
Associate a name with an entity.
Synopsis
int setentname(XPRMcontext ctx, int type, void *ref, const char *name);
Arguments
|
ctx
|
Mosel's execution context
|
|
type
|
Entity type or
XPRM_STR_ARR for an array
|
|
ref
|
Entity reference
|
|
name
|
New name for the entity or
NULL (it must be a registered string, see
regstring)
|
Return value
0 on success,
-1 if the pointer is
NULL and
-2 if the type does not support this functionality.
Further information
1. This function makes it possible to associate a name with an entity, this identifier is used by
buildnames to generate its output (
e.g. matrix names are produced this way). Only decision variables (
XPRM_TYP_MPVAR), linear constraints (
XPRM_TYP_LINCTR) and native types with the property
XPRM_DTYP_NAMED (like
nlctr) can be used with this function.
2. Both scalars and arrays can be named. In the case of an array the name generation is performed by buildnames such that array cells of a dynamic array created after this call will also be named appropriately.
3. The name association will be removed if the provided name is
NULL (no operation is performed if this association does not exist).
Related topics
© 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.
