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

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

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

Multi-objective workflow configuration

Define run designs and execution controls for multi-objective workflows.

run_grid()
Define an automatic multi-objective run grid
run_manual()
Define a manual multi-objective run design
mo_control()
Control multi-objective method behavior

Results and extraction

Extract run metadata, objective values, and solution-level results.

compile_model()
Compile the optimization model stored in a Problem
get_runs()
Get run-level results from a solution set
get_objectives()
Get objective values from a solution set
get_objective_specs()
Get objective specifications from a solution set
get_pu()
Get planning-unit results from a solution set
get_actions()
Get action results from a solution set
get_features()
Get feature summary from a solution set
get_targets()
Get target achievement summary from a solution set
get_solution_vector()
Get raw decision vector from a solution set

Solution-set management

Filter, combine, and remove repeated solutions while preserving SolutionSet consistency.

solution_filter()
Filter solutions in a solution set
solution_append()
Append solutions from another solution set
solution_unique()
Keep unique solutions in a solution set

Frontier analysis

Characterize objective ranges and distances to observed reference points.

frontier_extremes()
Find objective-wise extreme solutions
frontier_distances()
Compute distances to observed ideal or nadir points

Selection analysis

Analyze the recurrence and structural similarity of planning-unit and action assignments.

selection_frequency()
Calculate selection frequency across solutions
selection_similarity()
Calculate structural similarity among solutions

Plotting

Visualize spatial outputs and multi-objective trade-offs.

plot_spatial()
Plot spatial outputs from a 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 set
plot_tradeoff()
Plot trade-offs from a solution set

Classes

Public classes used across the package.

problem-class Problem
Problem 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