Solve Linear Optimization Problem
Verb: solveLP
Available from: <Enterprise>
Solve a Linear Optimization problem by minimizing the objective function.
Syntax
solveLP --objective(String) [--constraints(String)] [--bounds(String)] --optimizationmethod(OptimizationMethods) [--overwriteinputvariables(Boolean)] [--tolerance(Numeric)] [--maximumnumberofevaluations(Numeric)] (Numeric)=value
Inputs
| Script | Designer | Required | AcceptedTypes | Description |
|---|---|---|---|---|
| --objective | Objective function | Required | Text | The linear optimization objective function. |
| --constraints | Constraints | Optional | Text | Linear function with the problem's constraints. |
| --bounds | Limits | Optional | Text | Function with the linear optimization's limits. |
| --optimizationmethod | Method | Required | OptimizationMethods | Type of method used to optimize the function. Options:
|
| --overwriteinputvariables | Overwrite Input Variables | Optional | Boolean | When enabled, assigns the obtained results to the input variables. |
| --tolerance | Tolerance | Optional | Number | Tolerance of the solution that determines the minimum error of the optimal point's value. |
| --maximumnumberofevaluations | Max number of ratings | Optional | Number | Maximum number of ratings. |
Outputs
| Script | Designer | AcceptedTypes | Description |
|---|---|---|---|
| value | Value | Number | Optimized value. |
Example
Solves a linear optimization problem.
defVar --name goalNumber1 --type Numeric
defVar --name goalNumber2 --type Numeric
defVar --name optimizedFunction --type Numeric
solveLP --goaltype "Minimize" --objective "${goalNumber1} * ${goalNumber2}" --constraints "${goalNumber1} >=30\r\n${goalNumber2} >=30" --bounds "${goalNumber1} >=100\r\n${goalNumber2} >=100" --optimizationmethod "Simplex" --tolerance 0.00000001 --maximumnumberofevaluations 3000 optimizedFunction=value
logMessage --message "${optimizedFunction}" --type "Info"
// Result obtained: 200