Skip to content

Commit

Permalink
Merge pull request #76 from nextmv-io/feature/update-nextmv-py
Browse files Browse the repository at this point in the history
Update to nextmv-py v0.11.0
  • Loading branch information
sebastian-quintero authored Sep 13, 2024
2 parents 3ebfca0 + 09ed314 commit 652ea2c
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .nextmv/release/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
boto3>=1.34.33
pyyaml>=6.0.1
ruff>=0.1.7
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ampl-facilitylocation/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ampl-module-open==20240121
ampl-module-scip==20240121
ampl-module-xpress==20240115

nextmv==v0.10.3
nextmv==v0.11.0
pandas==2.2.2
2 changes: 1 addition & 1 deletion python-ampl-knapsack/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ampl-module-open==20240121
ampl-module-scip==20240121
ampl-module-xpress==20240115

nextmv==v0.10.3
nextmv==v0.11.0

2 changes: 1 addition & 1 deletion python-ampl-priceoptimization/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ampl-module-open==20240121
ampl-module-scip==20240121
ampl-module-xpress==20240115

nextmv==v0.10.3
nextmv==v0.11.0

2 changes: 1 addition & 1 deletion python-gurobi-knapsack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gurobipy==11.0.0
nextmv==v0.10.3
nextmv==v0.11.0

2 changes: 1 addition & 1 deletion python-hello-world/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Define the packages required by your project here.
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-highs-knapsack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
highspy==1.7.2
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ortools-costflow/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ortools-demandforecasting/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
24 changes: 12 additions & 12 deletions python-ortools-knapsack-multicsv/input/items.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"id","value","weight"
"cat",100,20
"dog",20,45
"water",40,2
"phone",6,1
"book",63,10
"rx",81,1
"tablet",28,8
"coat",44,9
"laptop",51,13
"keys",92,1
"nuts",18,4
id,value,weight
cat,100,20
dog,20,45
water,40,2
phone,6,1
book,63,10
rx,81,1
tablet,28,8
coat,44,9
laptop,51,13
keys,92,1
nuts,18,4
2 changes: 1 addition & 1 deletion python-ortools-knapsack-multicsv/input/weight_capacity.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"weight_capacity"
weight_capacity
50
6 changes: 3 additions & 3 deletions python-ortools-knapsack-multicsv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def solve(input: nextmv.Input, options: nextmv.Options) -> nextmv.Output:
for item in input.data["items"]:
item_variable = solver.IntVar(0, 1, item["id"])
items.append({"item": item, "variable": item_variable})
weights += item_variable * item["weight"]
values += item_variable * item["value"]
weights += item_variable * int(item["weight"])
values += item_variable * int(item["value"])

# This constraint ensures the weight capacity of the knapsack will not be
# exceeded.
capacity = input.data["weight_capacity"][0]["weight_capacity"] # Read as a CSV.
capacity = int(input.data["weight_capacity"][0]["weight_capacity"]) # Read as a CSV.
solver.Add(weights <= capacity)

# Sets the objective function: maximize the value of the chosen items.
Expand Down
2 changes: 1 addition & 1 deletion python-ortools-knapsack-multicsv/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ortools-knapsack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ortools-routing/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ortools-shiftassignment/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-ortools-shiftplanning/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ortools==9.8.3296
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-pyomo-knapsack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyomo==6.7.2
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-pyomo-shiftassignment/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyomo==6.7.2
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-pyomo-shiftplanning/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyomo==6.7.2
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-pyoptinterface-knapsack/requirements-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ highsbox==1.7.2.post2
https://merschformann.github.io/random/content/wheels/pyoptinterface/pyoptinterface-0.2.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

# Other packages.
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-pyoptinterface-knapsack/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pyoptinterface[highs]==0.2.8

# Other packages.
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-pyvroom-routing/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyvroom==1.13.6
nextmv==v0.10.3
nextmv==v0.11.0
2 changes: 1 addition & 1 deletion python-xpress-knapsack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
xpress==9.4.2; platform_system != 'Darwin' or (platform_system == 'Darwin' and platform_machine != 'arm64')
nextmv==v0.10.3
nextmv==v0.11.0

0 comments on commit 652ea2c

Please sign in to comment.