As an expert user, you can create a HANA Optimization Function. The function can be
thought of as a powerful calculator that enables you to solve complex optimization
functions. Using the functionality, you create an objective function with linear constraints
to calculate how best to optimize an aspect of your business. An optimization example is to
maximize profits on a product or store location. You can also save the optimization function
for future use. Currently, the function is unavailable for use in predictive modelling
chains.
To configure the HANA Optimization Function, ensure first that you are connected to an
SAP HANA data source.
- In the Predict room, you open a new optimization function in the
list of components in the right-hand panel by selecting
Optimization Function. Note To edit an existing function, go to Predict - Optimizations - + (plus sign) -
Functions - [Function Name].
- On the Objective Function tabbed page of the HANA Optimization
Function, enter the following information:
- Enter a unique Function Name.
- Optionally, enter a Function Description.
- Select a Function Optimization Type, which can be
Maximize or Minimize.
For example, your function might be used to maximize profits or minimize
costs.
- In the Function text box, enter an objective, linear optimization
function in the format, 5x + 8y + (-4)z. Note that you must
include plus (+) signs as separators between monomes (e.g.
5x). Monomes consist of coefficients and variables.
Note To maximize the screen, click the Expand icon

.
- Click Validate Function. The validation ensures that your function
is a mathematical expression that is supported by the underlying
Optimization Function Library (OFL). If the function passes validation,
you are allowed to configure its variables. If not reenter the function
following the formatting rules outlined in the previous step.
- Configure the optimization function variables. Choose a variable type of
Nominal (integers),
Continuous (the resulting values for the
variable do not need to be integers) or Binary
(one or zero); Select a positive or negative range (+/-), or both;
optionally, enter an alias that more accurately identifies your
variable, such as Product or Store Location.
Note Optionally, you can click Save to store the function in the
Optimization section of the component list in the Predict room.
- Click Next to move to the next screen.
- On the Function Constraints tabbed page, enter the following
information:
- In the Function Constraints text box, enter any amount of linear constraints. The
constraints are enforced to maximise (or minimize) your objective
functions.
Note Enter linear constraints in the format, 5x + 8y >= 400; 16y +(-4)z >=
200. Note that you must include semicolon (;) signs as
separators between constraints, except for the final constraint.
Each constraints must include monomes (e.g. 5x+8y), a
constraint type (e.g. >=) and a constraint value (e.g.
400). Otherwise, the application returns an error.
- Click Validate Constraints. If your constraint(s) throw an error,
consult the rules outlined in the previous step and re-enter your
constraints.
- Click Solve.
Note Optionally, you can click Save to store the function in the
Optimization section of the component list in the Predict room. You
can edit the function to try when you reopen.
- Click Results to open the Results page.
In the Results page, you view the optimization result. For example, consider a result of
x:130.0 and y:20.0. In this case, to maximize or minimize your
function, the output for x (or its alias) should be 130.0. And for y
(or its alias), the output should be 20.0. The results also display an overview of
the function and constraints that you entered.
Optionally, you can do the following:
-
Select the Use Alias checkbox to list your function
variables by their chosen aliases.
-
Copy and paste the results using the standard short cut keys, Ctrl A and Ctrl
C, into a text editor or report tool.
-
Click Save to store the function in the Optimization
section of the component list in the Predict room.
You can now configure the HANA Sentiment Analysis component and use it as a preprocessing
step in a complex analysis.