XPRMProcedure
- java.lang.Object
-
- com.dashoptimization.XPRMProcedure
-
- All Implemented Interfaces:
- XPRMIdentifier, XPRMTyped
public class XPRMProcedure extends java.lang.ObjectA procedure or function supplied by a module or implemented in a model.
-
-
Field Summary
-
Fields inherited from interface com.dashoptimization.XPRMTyped
GRP_DYN, GRP_GEN, MSK_FIX, MSK_GRP, MSK_STR, MSK_TYP, STR_ARRAY, STR_CONST, STR_CSREF, STR_LIST, STR_MEM, STR_NTYP, STR_PROB, STR_PROC, STR_REC, STR_REF, STR_SET, STR_UTYP, TYP_BOOL, TYP_EXTN, TYP_INT, TYP_LINCTR, TYP_MPVAR, TYP_NOT, TYP_REAL, TYP_STRING
-
-
Method Summary
Modifier and Type Method and Description XPRMLocationfindLocation()Find the location of the procedure in the source.java.lang.StringgetName()Get the identifier name.intgetNbParameters()Get the number of parameters (arguments) expected by the subroutine.java.lang.StringgetParameterTypes()Get the string of parameter types.intgetStructCode()Structure code.java.lang.StringgetStructName()String representation of structure.intgetTypeCode()Type code.java.lang.StringgetTypeName()String representation of type.XPRMProcedurenext()Get the next overloaded version of the subroutine (model routine only).
-
-
-
Method Detail
-
getNbParameters
public int getNbParameters()
Get the number of parameters (arguments) expected by the subroutine.- Returns:
- Number of parameters
-
getParameterTypes
public java.lang.String getParameterTypes()
Get the string of parameter types. This is a text string describing which arguments are expected by the function: it is its signature. This string is composed with the following characters:ian integer;ra real;sa text string;ba Boolean;va decision variable (type mpvar);ca linear constraint (type linctr);Ia range set;aan array (of any kind);ea set (of any type);|xxx|external type named 'xxx';!xxx!the set named 'xxx';Andx.tan array indexed by 'ndx' of the type 't'. 'ndx' is a string describing the type of each indexing set. 'ndx' may be omitted, in which case any array of type 't' is a valid parameter;Eta set of type 't'.
proc(n:integer, tab:array(range, set of real, myset) of string, flag:boolean)
has the signature'iAIr!myset!.sb'.- Returns:
- String describing type of parameters
-
next
public XPRMProcedure next()
Get the next overloaded version of the subroutine (model routine only). A subroutine may be defined several times in a model with different sets of arguments. This function gives access to all the defined overloaded versions of a subroutine.- Returns:
-
The next procedure or
nullif the procedure is not overloaded or comes from a module
-
findLocation
public XPRMLocation findLocation()
Find the location of the procedure in the source.- Returns:
-
The location of the procedure or
nullif no debugging information is available or the procedure comes from a module
-
getStructCode
public final int getStructCode()
Description copied from interface:XPRMTypedStructure code. The code is one of theSTR_*values.- Returns:
- Encoded structure
-
getStructName
public final java.lang.String getStructName()
Description copied from interface:XPRMTypedString representation of structure.- Returns:
- Structure name
-
getTypeName
public final java.lang.String getTypeName()
Description copied from interface:XPRMTypedString representation of type.- Specified by:
-
getTypeNamein interfaceXPRMTyped - Returns:
- Type name
-
getTypeCode
public final int getTypeCode()
Description copied from interface:XPRMTypedType code. The code is one of theTYP_*values.- Specified by:
-
getTypeCodein interfaceXPRMTyped - Returns:
- Encoded type
-
getName
public java.lang.String getName()
Description copied from interface:XPRMIdentifierGet the identifier name.- Specified by:
-
getNamein interfaceXPRMIdentifier - Returns:
- The identifier name
-
-
