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, area limits, budgets, and locking 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_planning_units()
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_planning_units()
Add objective: minimize planning-unit 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 run configuration

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

set_runs_grid()
Define an automatic multi-objective run grid
set_runs_manual()
Define a manual multi-objective run design
set_runs_control()
Control multi-objective run behavior

Results and extraction

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

get_runs()
Get run-level metadata from a solution set
get_objectives()
Get objective values from a solution set
get_planning_units()
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

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
frontier_knee()
Identify knee solutions on an observed Pareto frontier

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_planning_units()
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

Advanced functions

Advanced utilities for inspecting or compiling optimization models.

compile_model()
Compile the optimization model stored in a Problem

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

Deprecated functions

Deprecated functions kept for backwards compatibility.

add_constraint_locked_pu() obsoleta
Add locked planning units to a problem
add_objective_min_fragmentation_pu() obsoleta
Add objective: minimize planning-unit fragmentation
get_pu() obsoleta
Get planning-unit results from a solution set
plot_spatial_pu() obsoleta
Plot selected planning units in space
run_grid() obsoleta
Define an automatic multi-objective run grid
run_manual() obsoleta
Define a manual multi-objective run design
mo_control() obsoleta
Control multi-objective run behavior