class LinearOptimizationService method .createEngine()

LinearOptimizationService is the Apps Script service.

.createEngine() is the method name you will see after a dot in your code.

What it does

Creates a solver for a linear optimization problem.

Why it's used

  • Set up a solver for staffing, shipping, or budget problems.
  • Find the best mix under real constraints.

Common errors

  • Forgetting parentheses on createEngine. Write LinearOptimizationService.createEngine(), not LinearOptimizationService.createEngine or createEngine by itself.
  • Skipping dots between chained calls. Each step needs a dot, like LinearOptimizationService.createEngine().
  • Adding spaces where they do not belong. Write LinearOptimizationService.createEngine(), not LinearOptimizationService .createEngine(), LinearOptimizationService.createEngine (), or LinearOptimizationService . createEngine().
  • Wrong capitalization. Use LinearOptimizationService and createEngine, not linearoptimizationservice or createengine.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.