- Module scope
- (R1.1) The module implementation folder shall be named optimize and the function shall be named according to the GridLAB-D module implementation standards.
- Core scope
- (R1.2) The module core linkage shall conform to the GridLAB-D module implementation standards.
- Class scope
- (R1.3) The class objective shall conform to the GridLAB-D class implementation standards.
- Target property
- (R2.1) The general form of the objective shall be either [max|min](expression) or [object:]property=expression, where expression is a mathematical expression conforming to the GLM syntax.
- Changing properties
- (R2.2) The general form of the decision variables list is [object1:]property1[,[object2:]property2[,...,[objectN:]propertyN]].
- (R2.3) Move this to specs: Constraints are described as comma-separated a list of inequalities of the form [object:]property [<|<=|=|>=|>|<>] (expression).
- Maximum trials
- (R2.4) The default number of trials shall be 100.
- (R2.5) The default precision shall be 3 significant digits.
- (R2.6) The enumeration allows the specification of modeling assumptions such as linear, non-negative, and automatic scaling.
- (R2.7) The Specific method options such as the use of tangent or quadratic estimates, forward or central derivatives, and Newton or conjugate searching.
A prototype module optimize was created in the trunk at R2104 (22 Dec 2010) with a simple single variable optimizer using Newton's method. The optimizer object's class is simple. The following variables are provided
- goal (enumeration)
- The goal for the target variable, i.e., EXTREMUM, MINIMUM, or MAXIMUM. By default the goal is EXTREMUM, meaning that the solver will find the extreme that the second derivative leads to from the initial value. If MINIMUM or MAXIMUM is given, the solver will check that the second derivative leads to the desired goal and stop if it does not.
- objective (char1024)
- The target variable that is to be minimized (or maximized). This is specified in the form objectname.propertyname and must refer to a double.
- variable (char1024)
- The decision variable that is to be modified to minimize (or maximize) the target variable. This is specified in the form objectname.propertyname and must refer to a double.
- constraints (char1024)
- A constraint (optional) given as variable comparisons. The allowed comparisons are <, <=, ==, >=, >, and !=, e.g., objectname.propertyname < 12.2.
- delta (double)
- The value by which the decision variable is altered to estimate the first and second derivatives.
- epsilon (double)
- The value to within which the first derivative must be reduced before stopping the optimization process.
- trials (int32)
- The maximum number of trials allowed before stopping the optimization process.
Two test models are provided to verify the behavior of the simple class.
- This creates a trivial quadratic function which the solver should be able to solve in a single iteration.
- This creates two simultaneous cubic problems which the solver should be able to solve concurrently in no more than 5 iterations.
- This creates a trivial quadratic function with a constraint on the goal.