Skip to content

Commit

Permalink
fix #59
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyhanson committed Feb 8, 2018
1 parent 667656e commit b5f016e
Show file tree
Hide file tree
Showing 42 changed files with 188 additions and 144 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,6 +1,6 @@
Package: prioritizr
Type: Package
Version: 3.0.3.4
Version: 3.0.3.5
Title: Systematic Conservation Prioritization in R
Description: Conservation prioritization using integer
programming techniques. To solve large-scale problems, users
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
@@ -1,3 +1,10 @@
# prioritizr 3.0.3.5 (unreleased)

- Fix bug where `add_locked_in_constraints` and `add_locked_out_constraints`
throw an exception when used with semi-continuous-type decisions (#59).
- Exception in `compile` thrown when the same planning unit is locked in and
locked out now prints the planning unit indices in a readable format.

# prioritizr 3.0.3.4 (unreleased)

- Fix bug where `add_locked_in_constraints` and `add_locked_out_constraints`
Expand Down
2 changes: 1 addition & 1 deletion R/compile.R
Expand Up @@ -95,7 +95,7 @@ compile.ConservationProblem <- function(x, compressed_formulation = NA, ...) {
invalid_pu <- which(op$lb()[seq_len(x$number_of_planning_units())] > pu_ub)
if (length(invalid_pu)) {
stop("the following planning units have been locked in and locked out:\n",
invalid_pu)
paste(invalid_pu, collapse = ","))
}
# check that all planning units have not been locked out
if (all(pu_ub == 0))
Expand Down
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -42,7 +42,7 @@ Citation

To cite package '*prioritizr*' in publications please use:

Hanson JO, Schuster R, Morrell N, Strimas-Mackey M, Watts ME, Arcese P, Bennett J, Possingham HP (2017). prioritizr: Systematic Conservation Prioritization in R. R package version 3.0.3.4. https://github.com/prioritizr/prioritizr.
Hanson JO, Schuster R, Morrell N, Strimas-Mackey M, Watts ME, Arcese P, Bennett J, Possingham HP (2017). prioritizr: Systematic Conservation Prioritization in R. R package version 3.0.3.5. https://github.com/prioritizr/prioritizr.

Additionally, we keep a [record of publications](https://prioritizr.github.io/prioritizr/articles/publication_record.html) that use *prioritizr*, so please [file an issue on GitHub](https://github.com/prioritizr/prioritizr/issues/new) so we can add it to the list.

Expand Down Expand Up @@ -167,7 +167,7 @@ print(attr(s1, "runtime"))
```

## solution_1
## 0.005816936
## 0.005696058

``` r
# extract message returned from solver
Expand Down Expand Up @@ -204,7 +204,7 @@ s2 <- solve(p2)
## RHS range [6e+00, 1e+01]
## Found heuristic solution: objective 4020.2
## Presolve removed 0 rows and 10 columns
## Presolve time: 0.00s
## Presolve time: 0.02s
## Presolved: 5 rows, 80 columns, 400 nonzeros
## Variable types: 0 continuous, 80 integer (80 binary)
## Presolved: 5 rows, 80 columns, 400 nonzeros
Expand All @@ -217,7 +217,7 @@ s2 <- solve(p2)
##
## 0 0 3620.46082 0 3 4020.20382 3620.46082 9.94% - 0s
##
## Explored 1 nodes (11 simplex iterations) in 0.01 seconds
## Explored 1 nodes (11 simplex iterations) in 0.03 seconds
## Thread count was 1 (of 4 available processors)
##
## Solution count 1: 4020.2
Expand Down Expand Up @@ -259,7 +259,7 @@ s3 <- solve(p3)
## Presolved: 221 rows, 188 columns, 832 nonzeros
##
##
## Root relaxation: objective 5.477092e+03, 124 iterations, 0.00 seconds
## Root relaxation: objective 5.477092e+03, 124 iterations, 0.01 seconds
##
## Nodes | Current Node | Objective Bounds | Work
## Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
Expand All @@ -268,7 +268,7 @@ s3 <- solve(p3)
## H 0 0 6154.1018384 5477.09167 11.0% - 0s
## H 0 0 5944.9791739 5477.09167 7.87% - 0s
##
## Explored 1 nodes (124 simplex iterations) in 0.03 seconds
## Explored 1 nodes (124 simplex iterations) in 0.05 seconds
## Thread count was 1 (of 4 available processors)
##
## Solution count 4: 5944.98 6154.1 6420.2 20287.2
Expand Down Expand Up @@ -308,7 +308,7 @@ s4 <- solve(p4)
## Presolved: 468 rows, 377 columns, 1688 nonzeros
##
##
## Root relaxation: objective 5.647064e+03, 348 iterations, 0.01 seconds
## Root relaxation: objective 5.647064e+03, 348 iterations, 0.02 seconds
##
## Nodes | Current Node | Objective Bounds | Work
## Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
Expand Down Expand Up @@ -343,7 +343,7 @@ s4 <- solve(p4)
## MIR: 2
## Zero half: 23
##
## Explored 27 nodes (1243 simplex iterations) in 0.28 seconds
## Explored 27 nodes (1243 simplex iterations) in 0.42 seconds
## Thread count was 1 (of 4 available processors)
##
## Solution count 2: 6482.4 12281.1
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/gurobi_installation.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/favicon.ico
Binary file not shown.
20 changes: 10 additions & 10 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/add_boundary_penalties.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/reference/add_connected_constraints.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b5f016e

Please sign in to comment.