Get started with Nextmv
Build a decision model in 5 minutes
1Install & configure Nextmv CLI
Execute the following command in your terminal to download and install Nextmv CLI.
After downloading and installing, configure the CLI installation with your account:
You’re now ready to start using the CLI and install Nextmv SDK.
2Install Nextmv SDK
With Nextmv CLI, install Nextmv SDK with:
This will install Go and get the necessary plugins and other supporting files needed to build and run your model locally. Note that Nextmv SDK manages its own Go installation and will not affect your current Go installation if you have one.
You’re now ready to create your first project.
3Initialize a new project using a template
With Nextmv CLI, initialize a new project with the Sudoku template:
This will create a new directory “sudoku” in your current working directory. Change into to this new sudoku directory:
There are several files in this newly created directory. The main.go
file contains all of the code for the Sudoku model and the input.json
contains the sample input for the model (a matrix containing a starting grid for a sudoku problem).
In the next step you’ll run the sudoku model using the input.json
file for the model input.
4Run the model locally
With Nextmv CLI, run your newly created sudoku model:
This command runs the model ( main.go
) specifying input.json
as the model input, and output.json
as where to store the model output. Running this command will create a new file in the current directory called output.json
.
5View the results
Open the output.json
file in your code editor to view the results of your model. Among the solver options and statistics you should see a store
field with an array of arrays. This is your model’s solution to the sudoku problem (see formatted version below).
Try changing the input.json
file and re-running the model to see what kind of result you get. (You can leave off the -runner.output.path
flag if you want to the model output to appear directly in the terminal.)
These steps can also be repeated with any of the other templates (like routing). To see a list of available templates, run: