go.mod
file:go get
command will create a go.sum
file (if not already present) that contains hashes of each module to ensure the same files are being retrieved upon each build. At this point, you should have all of the necessary packages needed to build our executable binary../cmd/<model-name>
package (replace <model-name>
with your model package name). This is the directory that holds a main.go
file../cmd/<model-name>
:./<model-name>
binary should have been created../data/input.json
file, set the solver duration to 10 seconds, and write it to a ./data/output.json
file. The CLI runner will print JSON to standard out. We recommend saving this code snippet in cmd.sh
file. It can then be run via:go run main.go
command, but we recommend building the binary and working with it. Binaries make the deployment process easier. You can read more about binaries in this short blog.Feasible
and Next
methods.Value
methods.