EN DE

OnlyOffice NLP Solver

A nonlinear programming (NLP) solver plugin for OnlyOffice Spreadsheet. Define a target cell, set side conditions, and specify parameter cells with optional bounds—then let the solver find optimal values to minimize your target function.

As an OnlyOffice user, I discovered there was no solver plugin available—so I built one.

Demonstration of the NLP Solver in action

This plugin fills that gap with a customized and improved Nelder-Mead (simplex downhill) implementation that excels at nonlinear optimization problems. The values and formulas are collected and sent to a WebAssembly module written in Go, which runs calculations in parallel for maximum performance.

What surprised me most is how powerful this solver turned out to be, even at this early stage. It handles nonlinear problems with nonlinear side conditions as well - turning OnlyOffice's missing feature into an actual plus point.

I have plenty of ideas for future improvements and plan to refine the solver systematically based on real-world use cases.

This manual guides you through installing and using the NLP Solver plugin. With just a few clicks, you can solve complex optimization problems directly in your spreadsheet.

Installation

Getting started is straightforward. Download the plugin package and install it manually in OnlyOffice. A plugin store submission is currently in progress.

  1. Download the plugin using the button above
  2. Open OnlyOffice Spreadsheet
  3. Navigate to Plugins → Plugin Manager → Install from file
  4. Select the downloaded plugin package
  5. The NLP Solver now appears in your Plugins menu

How to Use

Step 1: Select Target Cell

Select the cell containing the formula you want to minimize. This is your objective function—the value the solver will try to make as small as possible.

Selecting the target cell in NLP Solver

Select your target cell—the formula to minimize

Step 2: Define Parameters

Select your parameter cells—these are the values the solver will adjust to find the optimum.

Note: The solver does not use the current values in your parameter cells. Whatever values are there when you press Start will be ignored.

You can set bounds for each parameter, which the solver uses to form the starting simplex. This is how you help guide the solver toward the correct minimum. If left unset, bounds default to -1.0 to 1.0, without beeing strict. Hence the simplex may move out of those.

Configuring parameters with bounds

Configure parameters with optional min/max bounds.

StrictMin / StrictMax

When checked, the parameter will never exceed these boundaries. For example, enable StrictMin and set it to 0 to ensure only positive values.

Step 3: Add Side Conditions (Optional)

Need constraints? Add side conditions to restrict your solution space. Each condition has Min and Max values with corresponding checkboxes.

Setting side conditions in NLP Solver

Define your side conditions to restrict the solution space.

DefineMin / DefineMax

When checked, the condition's minimum or maximum value is enforced. Leave unchecked if your condition doesn't require a bound on that side. For example, you might need a minimum but not care if the value goes higher. Behind the scenes, undefined bounds are set to ±MaxFloat64.

Both options are enabled by default for convenience.

Step 4: Set Iterations & Start

Choose the number of iterations. More iterations may yield better results for complex, highly nonlinear problems—but will also take longer. Click Start to run the optimization.

Iterations and Start

Help Improve This Plugin

I'm actively developing this solver, and your feedback is invaluable. Here's how you can contribute:

  • Something unclear? Feel free to ask!
  • Found a bug? Send me your spreadsheet file so I can reproduce and fix the issue.
  • Have a tricky optimization problem? Share it—I'm always looking for edge cases to test.
  • Benchmarked against Excel or LibreOffice? I'd love to hear your comparison feedback.