Skip to contents

Build and solve problems

Core workflow to create a planning problem, configure it, and solve it.

create_problem()
Create a planning problem input object
solve()
Solve a planning problem

Actions, effects and profits

Define feasible actions, their effects and optional profits.

add_actions()
Add management actions to a planning problem
add_effects()
Add action effects to a planning problem
add_benefits()
Add benefits
add_losses()
Add losses
add_profit()
Add profit to a planning problem

Constraints

Define target requirements and area-related constraints.

add_constraint_targets_absolute()
Add absolute targets
add_constraint_targets_relative()
Add relative targets
add_constraint_area()
Add area constraint
add_constraint_budget()
Add budget constraint
add_constraint_locked_actions()
Add locked action decisions to a planning problem
add_constraint_locked_pu()
Add locked planning units to a problem

Spatial relations

Register boundary and graph-based spatial relations from tables, polygons, or coordinates.

add_spatial_relations()
Add spatial relations
add_spatial_boundary()
Add spatial boundary-length relations
add_spatial_rook()
Add rook adjacency from polygons
add_spatial_queen()
Add queen adjacency from polygons
add_spatial_knn()
Add k-nearest-neighbours spatial relations
add_spatial_distance()
Add distance-threshold spatial relations

Atomic objectives

Register objectives that can be solved individually or combined in multi-objective workflows.

add_objective_min_cost()
Add objective: minimize cost
add_objective_max_benefit()
Add objective: maximize benefit
add_objective_min_loss()
Add objective: minimize loss
add_objective_max_profit()
Add objective: maximize profit
add_objective_max_net_profit()
Add objective: maximize net profit
add_objective_min_fragmentation_pu()
Add objective: minimize fragmentation
add_objective_min_fragmentation_action()
Add objective: minimize action fragmentation
add_objective_min_intervention_impact()
Add objective: minimize intervention impact

Multi-objective methods

Configure weighted-sum, epsilon-constraint, and AUGMECON workflows.

set_method_weighted_sum()
Set the weighted-sum multi-objective method
set_method_epsilon_constraint()
Set the epsilon-constraint multi-objective method
set_method_augmecon()
Set the AUGMECON multi-objective method

Solver configuration

Store solver and runtime options before calling solve().

set_solver()
Configure solver settings
set_solver_gurobi()
Configure Gurobi solver settings
set_solver_cplex()
Configure CPLEX solver settings
set_solver_cbc()
Configure CPLEX solver settings
set_solver_symphony()
Configure SYMPHONY solver settings

Results and extraction

Extract user-facing summaries and raw solution vectors.

compile_model()
Compile the optimization model stored in a Problem
get_pu()
Get planning-unit results from a solution
get_actions()
Get action results from a solution
get_features()
Get feature summary from a solution
get_targets()
Get target achievement summary from a solution
get_solution_vector()
Get raw solution vector from a solution

Plotting

Visualize spatial outputs and multi-objective trade-offs.

plot_spatial()
Plot spatial outputs from a solution or solution set
plot_spatial_pu()
Plot selected planning units in space
plot_spatial_actions()
Plot selected actions in space
plot_spatial_features()
Plot spatial feature values from a solution
plot_tradeoff()
Plot trade-offs from a multi-objective solution set

Classes

Core classes used across the package.

problem-class Problem
Problem class
solution-class Solution
Solution class
solutionset-class SolutionSet
SolutionSet class

Data

Simulated datasets distributed with the package.

sim_dist_features
Simulated feature distribution
sim_features
Simulated features
sim_pu
Simulated planning units
sim_pu_sf
Simulated planning units
load_sim_features_raster()
Example feature raster