run

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 25

README

Run

Package run provides tools for running solvers. When run.Run is called by your application, the runner configured by the environment variable NEXTMV_RUNNER will be used. Valid values are cli (default) and http.

See godocs for package docs.

Documentation

Overview

Package run provides tools for running solvers. When `run.Run` is called by your application, the runner configured by the environment variable `NEXTMV_RUNNER` will be used. Valid values are `cli` (default) and `http`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run[T any](handler func(T, store.Options) (store.Solver, error))

Run a solver via a handler.

func main() {
	handler := func(v int, opt store.Options) (store.Solver, error) {
		s := store.New()
		x := store.NewVar(s, v)
		s = s.Value(...).Format(...).Generate(...) // Modify the Store.

		return s.Maximizer(opt), nil
		// return s.Minimizer(opt), nil
		// return s.Satisfier(opt), nil
	}
	run.Run(handler)
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL