![]() ![]() Note It is good practice to end the equation declaration with a semicolon, even though it is not mandatory if the next statement starts with a GAMS keyword.įor advice on choosing equation names and phrasing the explanatory text see chapter Good Modeling Practices. The end of the declaration statement is indicated by a semicolon. The equation names have to be separated by commas or by a line break as in the example that follows. One or more equations may be declared in one equation statement. For more on equation attributes see section Equation Attributes. Equation data allows to initialize equation attributes at compile time. Specifying equation data is another optional element in the equation declaration. The optional explanatory text may be used to describe the equation for future reference and to ease readability. In the optional index_list the set or sets are specified over which an indexed equation is declared. Eqn_name is the internal name of the equation, an identifier in GAMS. A block of equations may initiate one or more individual constraints. Equation eqn_name Įquation is the reserved word that indicates that one or more blocks of equations are about to be declared. The declaration of an equation is similar to a set or parameter declaration. A summary and quick reference conclude the chapter.Īn equation must be declared before it can be defined and used in a model. First, we introduce how equations are declared and defined, then we discuss expressions in equation definitions, followed by a section on equation attributes. Most of the example code in this chapter is from the model location. As with variables, one GAMS equation may be defined over a group of sets and in turn map into several individual constraints associated with the elements of those sets. The algebraic relationships are defined by using constants, mathematical operators, functions, sets, parameters and variables. A GAMS equation name is associated with the symbolic algebraic relationships that will be used to generate the constraints in a model. See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.The keyword equation defines GAMS names that may be used in the model statement. In Map Algebra, the equivalent operator symbol for this tool is " <=" ( link). ![]() ![]() If one of the inputs is a multidimensional raster and the other input is a constant, the tool will perform the operation for all slices for all variables using the constant value, and the output will be a multidimensional raster. If both inputs have one variable but different names, uncheck the Match Multidimensional Variable geoprocessing environment (set = False in Python) before running the tool. The variables in the inputs must have at least one common dimension and one common dimensional value for this tool to process otherwise, an error will occur. The output will be a multidimensional raster in CRF format. If both inputs are multidimensional raster data with the same number of variables, the tool will perform the operation for all slices with the same dimension value. If one of the inputs is a multiband raster and the other input is a constant, the tool will perform the operation using the constant value for each band in the multiband input, and the output will be a multiband raster. The number of bands in each multiband input must be the same. If both inputs are multiband rasters, the tool will perform the operation on each band from one input, and the output will be a multiband raster. If both inputs are single-band rasters or one of the inputs is a constant, the output will be a single-band raster. The order of inputs is relevant for this tool. Two inputs are necessary for this relational evaluation to take place. ![]()
0 Comments
Leave a Reply. |