Skip to content

Commit 6d2981d

Browse files
GiggleLiuisPANNclaude
authored
Fix #512: [Model] StaffScheduling (#682)
* Add plan for #512: [Model] StaffScheduling * Implement #512: [Model] StaffScheduling * Fix StaffScheduling CLI validation * chore: remove plan file after implementation * fix: address StaffScheduling review feedback * Restore 4 CLI tests lost during merge conflict resolution The merge-with-main commit accidentally corrupted test_create_biconnectivity_augmentation_json and deleted three other tests (biconnectivity_isolated, balanced_complete_bipartite, and balanced_complete_bipartite_rejects). Restore them from origin/main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix bar(R) rendering as |(R) in Staff Scheduling paper section Replace bar(R) with overline(R) for proper rendering of the requirement vector notation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Xiwei Pan <xiwei.pan@connect.hkust-gz.edu.cn> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8c86ffb commit 6d2981d

11 files changed

Lines changed: 610 additions & 6 deletions

File tree

docs/paper/reductions.typ

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"SubgraphIsomorphism": [Subgraph Isomorphism],
115115
"PartitionIntoTriangles": [Partition Into Triangles],
116116
"FlowShopScheduling": [Flow Shop Scheduling],
117+
"StaffScheduling": [Staff Scheduling],
117118
"MultiprocessorScheduling": [Multiprocessor Scheduling],
118119
"MinimumTardinessSequencing": [Minimum Tardiness Sequencing],
119120
"SequencingWithinIntervals": [Sequencing Within Intervals],
@@ -2378,6 +2379,34 @@ NP-completeness was established by Garey, Johnson, and Stockmeyer @gareyJohnsonS
23782379
) <fig:flowshop>
23792380
]
23802381

2382+
#problem-def("StaffScheduling")[
2383+
Given a collection $C$ of binary schedule patterns of length $m$, where each pattern has exactly $k$ ones, a requirement vector $overline(R) in ZZ_(>= 0)^m$, and a worker budget $n in ZZ_(>= 0)$, determine whether there exists a function $f: C -> ZZ_(>= 0)$ such that $sum_(c in C) f(c) <= n$ and $sum_(c in C) f(c) dot c >= overline(R)$ component-wise.
2384+
][
2385+
Staff Scheduling is problem SS20 in Garey and Johnson's catalog @garey1979. It models workforce planning with reusable shift templates: each pattern describes the periods covered by one worker, and the multiplicity function $f$ chooses how many workers receive each template. The general problem is NP-complete @garey1979, while the circular-ones special case admits a polynomial-time algorithm via network-flow structure @bartholdi1980. In this codebase the registered baseline enumerates all assignments of $0, dots, n$ workers to each pattern, matching the $(n + 1)^(|C|)$ configuration space exposed by the model.
2386+
2387+
*Example.* Consider a 7-day week with $k = 5$ working days per schedule, worker budget $n = 4$, and schedule patterns
2388+
$ c_1 = (1, 1, 1, 1, 1, 0, 0), c_2 = (0, 1, 1, 1, 1, 1, 0), c_3 = (0, 0, 1, 1, 1, 1, 1), c_4 = (1, 0, 0, 1, 1, 1, 1), c_5 = (1, 1, 0, 0, 1, 1, 1) $
2389+
with requirement vector $overline(R) = (2, 2, 2, 3, 3, 2, 1)$. Choosing
2390+
$ f(c_1) = f(c_2) = f(c_3) = f(c_4) = 1 $ and $ f(c_5) = 0 $
2391+
uses exactly 4 workers and yields coverage vector $(2, 2, 3, 4, 4, 3, 2) >= overline(R)$, so the instance is feasible.
2392+
2393+
#figure(
2394+
align(center, table(
2395+
columns: 9,
2396+
align: center,
2397+
table.header([Schedule], [Mon], [Tue], [Wed], [Thu], [Fri], [Sat], [Sun], [Workers]),
2398+
[$c_1$], [1], [1], [1], [1], [1], [0], [0], [1],
2399+
[$c_2$], [0], [1], [1], [1], [1], [1], [0], [1],
2400+
[$c_3$], [0], [0], [1], [1], [1], [1], [1], [1],
2401+
[$c_4$], [1], [0], [0], [1], [1], [1], [1], [1],
2402+
[$c_5$], [1], [1], [0], [0], [1], [1], [1], [0],
2403+
[$overline(R)$], [2], [2], [2], [3], [3], [2], [1], [-],
2404+
[Coverage], [2], [2], [3], [4], [4], [3], [2], [4],
2405+
)),
2406+
caption: [Worked Staff Scheduling instance. The last column shows the chosen multiplicities $f(c_i)$; the final row verifies that daily coverage dominates the requirement vector while using 4 workers.],
2407+
) <fig:staff-scheduling>
2408+
]
2409+
23812410
#{
23822411
let x = load-model-example("MultiprocessorScheduling")
23832412
let lengths = x.instance.lengths

docs/paper/references.bib

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ @article{shang2018
4040
doi = {10.1016/j.cor.2017.10.015}
4141
}
4242

43+
@article{bartholdi1980,
44+
author = {John J. Bartholdi and James B. Orlin and H. Donald Ratliff},
45+
title = {Cyclic Scheduling via Integer Programs with Circular Ones},
46+
journal = {Operations Research},
47+
volume = {28},
48+
number = {5},
49+
pages = {1074--1085},
50+
year = {1980},
51+
doi = {10.1287/opre.28.5.1074}
52+
}
53+
4354
@article{brucker1977,
4455
author = {Peter Brucker and Jan Karel Lenstra and Alexander H. G. Rinnooy Kan},
4556
title = {Complexity of Machine Scheduling Problems},

problemreductions-cli/src/cli.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Flags by problem type:
254254
FVS --arcs [--weights] [--num-vertices]
255255
StrongConnectivityAugmentation --arcs, --candidate-arcs, --bound [--num-vertices]
256256
FlowShopScheduling --task-lengths, --deadline [--num-processors]
257+
StaffScheduling --schedules, --requirements, --num-workers, --k
257258
MinimumTardinessSequencing --n, --deadlines [--precedence-pairs]
258259
SCS --strings, --bound [--alphabet-size]
259260
D2CIF --arcs, --capacities, --source-1, --sink-1, --source-2, --sink-2, --requirement-1, --requirement-2
@@ -482,6 +483,15 @@ pub struct CreateArgs {
482483
/// Number of processors/machines for FlowShopScheduling or MultiprocessorScheduling
483484
#[arg(long)]
484485
pub num_processors: Option<usize>,
486+
/// Binary schedule patterns for StaffScheduling (semicolon-separated rows, e.g., "1,1,0;0,1,1")
487+
#[arg(long)]
488+
pub schedules: Option<String>,
489+
/// Minimum staffing requirements per period for StaffScheduling
490+
#[arg(long)]
491+
pub requirements: Option<String>,
492+
/// Number of available workers for StaffScheduling
493+
#[arg(long)]
494+
pub num_workers: Option<u64>,
485495
/// Alphabet size for SCS (optional; inferred from max symbol + 1 if omitted)
486496
#[arg(long)]
487497
pub alphabet_size: Option<usize>,

problemreductions-cli/src/commands/create.rs

Lines changed: 216 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ fn all_data_flags_empty(args: &CreateArgs) -> bool {
9090
&& args.task_lengths.is_none()
9191
&& args.deadline.is_none()
9292
&& args.num_processors.is_none()
93+
&& args.schedules.is_none()
94+
&& args.requirements.is_none()
95+
&& args.num_workers.is_none()
9396
&& args.alphabet_size.is_none()
9497
}
9598

@@ -235,6 +238,7 @@ fn type_format_hint(type_name: &str, graph_type: Option<&str>) -> &'static str {
235238
}
236239
"Vec<Vec<usize>>" => "semicolon-separated sets: \"0,1;1,2;0,2\"",
237240
"Vec<CNFClause>" => "semicolon-separated clauses: \"1,2;-1,3\"",
241+
"Vec<Vec<bool>>" => "semicolon-separated binary rows: \"1,1,0;0,1,1\"",
238242
"Vec<Vec<W>>" => "semicolon-separated rows: \"1,0.5;0.5,2\"",
239243
"usize" | "W::Sum" => "integer",
240244
"u64" => "integer",
@@ -292,6 +296,9 @@ fn example_for(canonical: &str, graph_type: Option<&str>) -> &'static str {
292296
"MultiprocessorScheduling" => "--lengths 4,5,3,2,6 --num-processors 2 --deadline 10",
293297
"MinimumMultiwayCut" => "--graph 0-1,1-2,2-3 --terminals 0,2 --edge-weights 1,1,1",
294298
"SequencingWithinIntervals" => "--release-times 0,0,5 --deadlines 11,11,6 --lengths 3,1,1",
299+
"StaffScheduling" => {
300+
"--schedules \"1,1,1,1,1,0,0;0,1,1,1,1,1,0;0,0,1,1,1,1,1;1,0,0,1,1,1,1;1,1,0,0,1,1,1\" --requirements 2,2,2,3,3,2,1 --num-workers 4 --k 5"
301+
}
295302
"SteinerTree" => "--graph 0-1,1-2,1-3,3-4 --edge-weights 2,2,1,1 --terminals 0,2,4",
296303
"OptimalLinearArrangement" => "--graph 0-1,1-2,2-3 --bound 5",
297304
"DirectedTwoCommodityIntegralFlow" => {
@@ -323,6 +330,7 @@ fn help_flag_name(canonical: &str, field_name: &str) -> String {
323330
match (canonical, field_name) {
324331
("BoundedComponentSpanningForest", "max_components") => return "k".to_string(),
325332
("BoundedComponentSpanningForest", "max_weight") => return "bound".to_string(),
333+
("StaffScheduling", "shifts_per_schedule") => return "k".to_string(),
326334
_ => {}
327335
}
328336
// General field-name overrides (previously in cli_flag_name)
@@ -442,6 +450,9 @@ fn problem_help_flag_name(
442450
if canonical == "LengthBoundedDisjointPaths" && field_name == "max_length" {
443451
return "bound".to_string();
444452
}
453+
if canonical == "StaffScheduling" && field_name == "shifts_per_schedule" {
454+
return "k".to_string();
455+
}
445456
field_name.replace('_', "-")
446457
}
447458

@@ -1478,6 +1489,36 @@ pub fn create(args: &CreateArgs, out: &OutputConfig) -> Result<()> {
14781489
)
14791490
}
14801491

1492+
// StaffScheduling
1493+
"StaffScheduling" => {
1494+
let usage = "Usage: pred create StaffScheduling --schedules \"1,1,1,1,1,0,0;0,1,1,1,1,1,0;0,0,1,1,1,1,1;1,0,0,1,1,1,1;1,1,0,0,1,1,1\" --requirements 2,2,2,3,3,2,1 --num-workers 4 --k 5";
1495+
let schedules = parse_schedules(args, usage)?;
1496+
let requirements = parse_requirements(args, usage)?;
1497+
let num_workers = args.num_workers.ok_or_else(|| {
1498+
anyhow::anyhow!("StaffScheduling requires --num-workers\n\n{usage}")
1499+
})?;
1500+
let shifts_per_schedule = args
1501+
.k
1502+
.ok_or_else(|| anyhow::anyhow!("StaffScheduling requires --k\n\n{usage}"))?;
1503+
validate_staff_scheduling_args(
1504+
&schedules,
1505+
&requirements,
1506+
shifts_per_schedule,
1507+
num_workers,
1508+
usage,
1509+
)?;
1510+
1511+
(
1512+
ser(problemreductions::models::misc::StaffScheduling::new(
1513+
shifts_per_schedule,
1514+
schedules,
1515+
requirements,
1516+
num_workers,
1517+
))?,
1518+
resolved_variant.clone(),
1519+
)
1520+
}
1521+
14811522
// DirectedTwoCommodityIntegralFlow
14821523
"DirectedTwoCommodityIntegralFlow" => {
14831524
let arcs_str = args.arcs.as_deref().ok_or_else(|| {
@@ -2386,24 +2427,82 @@ fn parse_bool_matrix(args: &CreateArgs) -> Result<Vec<Vec<bool>>> {
23862427
.matrix
23872428
.as_deref()
23882429
.ok_or_else(|| anyhow::anyhow!("This problem requires --matrix (e.g., \"1,0;0,1;1,1\")"))?;
2389-
matrix_str
2430+
parse_bool_rows(matrix_str)
2431+
}
2432+
2433+
fn parse_schedules(args: &CreateArgs, usage: &str) -> Result<Vec<Vec<bool>>> {
2434+
let schedules_str = args
2435+
.schedules
2436+
.as_deref()
2437+
.ok_or_else(|| anyhow::anyhow!("StaffScheduling requires --schedules\n\n{usage}"))?;
2438+
parse_bool_rows(schedules_str)
2439+
}
2440+
2441+
fn parse_bool_rows(rows_str: &str) -> Result<Vec<Vec<bool>>> {
2442+
rows_str
23902443
.split(';')
23912444
.map(|row| {
23922445
row.trim()
23932446
.split(',')
2394-
.map(|s| match s.trim() {
2447+
.map(|entry| match entry.trim() {
23952448
"1" | "true" => Ok(true),
23962449
"0" | "false" => Ok(false),
23972450
other => Err(anyhow::anyhow!(
2398-
"Invalid boolean value '{}': expected 0/1 or true/false",
2399-
other
2451+
"Invalid boolean entry '{other}': expected 0/1 or true/false"
24002452
)),
24012453
})
24022454
.collect()
24032455
})
24042456
.collect()
24052457
}
24062458

2459+
fn parse_requirements(args: &CreateArgs, usage: &str) -> Result<Vec<u64>> {
2460+
let requirements_str = args
2461+
.requirements
2462+
.as_deref()
2463+
.ok_or_else(|| anyhow::anyhow!("StaffScheduling requires --requirements\n\n{usage}"))?;
2464+
util::parse_comma_list(requirements_str)
2465+
}
2466+
2467+
fn validate_staff_scheduling_args(
2468+
schedules: &[Vec<bool>],
2469+
requirements: &[u64],
2470+
shifts_per_schedule: usize,
2471+
num_workers: u64,
2472+
usage: &str,
2473+
) -> Result<()> {
2474+
if num_workers >= usize::MAX as u64 {
2475+
bail!(
2476+
"StaffScheduling requires --num-workers to fit in usize for brute-force enumeration\n\n{usage}"
2477+
);
2478+
}
2479+
2480+
let num_periods = requirements.len();
2481+
for (index, schedule) in schedules.iter().enumerate() {
2482+
if schedule.len() != num_periods {
2483+
bail!(
2484+
"schedule {} has {} periods, expected {}\n\n{}",
2485+
index,
2486+
schedule.len(),
2487+
num_periods,
2488+
usage
2489+
);
2490+
}
2491+
let ones = schedule.iter().filter(|&&active| active).count();
2492+
if ones != shifts_per_schedule {
2493+
bail!(
2494+
"schedule {} has {} active periods, expected {}\n\n{}",
2495+
index,
2496+
ones,
2497+
shifts_per_schedule,
2498+
usage
2499+
);
2500+
}
2501+
}
2502+
2503+
Ok(())
2504+
}
2505+
24072506
/// Parse `--matrix` as semicolon-separated rows of comma-separated f64 values.
24082507
/// E.g., "1,0.5;0.5,2"
24092508
fn parse_matrix(args: &CreateArgs) -> Result<Vec<Vec<f64>>> {
@@ -2858,8 +2957,14 @@ fn create_random(
28582957

28592958
#[cfg(test)]
28602959
mod tests {
2960+
use super::create;
2961+
use super::help_flag_name;
2962+
use super::parse_bool_rows;
28612963
use super::problem_help_flag_name;
28622964
use super::*;
2965+
use crate::cli::{Cli, Commands};
2966+
use clap::Parser;
2967+
use std::time::{SystemTime, UNIX_EPOCH};
28632968

28642969
#[test]
28652970
fn test_problem_help_uses_bound_for_length_bounded_disjoint_paths() {
@@ -2882,6 +2987,110 @@ mod tests {
28822987
);
28832988
}
28842989

2990+
#[test]
2991+
fn test_problem_help_uses_k_for_staff_scheduling() {
2992+
assert_eq!(
2993+
help_flag_name("StaffScheduling", "shifts_per_schedule"),
2994+
"k"
2995+
);
2996+
assert_eq!(
2997+
problem_help_flag_name("StaffScheduling", "shifts_per_schedule", "usize", false),
2998+
"k"
2999+
);
3000+
}
3001+
3002+
#[test]
3003+
fn test_parse_bool_rows_reports_generic_invalid_boolean_entry() {
3004+
let err = parse_bool_rows("1,maybe").unwrap_err().to_string();
3005+
assert_eq!(
3006+
err,
3007+
"Invalid boolean entry 'maybe': expected 0/1 or true/false"
3008+
);
3009+
}
3010+
3011+
#[test]
3012+
fn test_create_staff_scheduling_outputs_problem_json() {
3013+
let cli = Cli::try_parse_from([
3014+
"pred",
3015+
"create",
3016+
"StaffScheduling",
3017+
"--schedules",
3018+
"1,1,1,1,1,0,0;0,1,1,1,1,1,0;0,0,1,1,1,1,1;1,0,0,1,1,1,1;1,1,0,0,1,1,1",
3019+
"--requirements",
3020+
"2,2,2,3,3,2,1",
3021+
"--num-workers",
3022+
"4",
3023+
"--k",
3024+
"5",
3025+
])
3026+
.unwrap();
3027+
3028+
let args = match cli.command {
3029+
Commands::Create(args) => args,
3030+
_ => panic!("expected create command"),
3031+
};
3032+
3033+
let suffix = SystemTime::now()
3034+
.duration_since(UNIX_EPOCH)
3035+
.unwrap()
3036+
.as_nanos();
3037+
let output_path =
3038+
std::env::temp_dir().join(format!("staff-scheduling-create-{suffix}.json"));
3039+
let out = OutputConfig {
3040+
output: Some(output_path.clone()),
3041+
quiet: true,
3042+
json: false,
3043+
auto_json: false,
3044+
};
3045+
3046+
create(&args, &out).unwrap();
3047+
3048+
let json: serde_json::Value =
3049+
serde_json::from_str(&std::fs::read_to_string(&output_path).unwrap()).unwrap();
3050+
assert_eq!(json["type"], "StaffScheduling");
3051+
assert_eq!(json["data"]["num_workers"], 4);
3052+
assert_eq!(
3053+
json["data"]["requirements"],
3054+
serde_json::json!([2, 2, 2, 3, 3, 2, 1])
3055+
);
3056+
std::fs::remove_file(output_path).unwrap();
3057+
}
3058+
3059+
#[test]
3060+
fn test_create_staff_scheduling_reports_invalid_schedule_without_panic() {
3061+
let cli = Cli::try_parse_from([
3062+
"pred",
3063+
"create",
3064+
"StaffScheduling",
3065+
"--schedules",
3066+
"1,1,1,1,1,0,0;0,1,1,1,1,1",
3067+
"--requirements",
3068+
"2,2,2,3,3,2,1",
3069+
"--num-workers",
3070+
"4",
3071+
"--k",
3072+
"5",
3073+
])
3074+
.unwrap();
3075+
3076+
let args = match cli.command {
3077+
Commands::Create(args) => args,
3078+
_ => panic!("expected create command"),
3079+
};
3080+
3081+
let out = OutputConfig {
3082+
output: None,
3083+
quiet: true,
3084+
json: false,
3085+
auto_json: false,
3086+
};
3087+
3088+
let result = std::panic::catch_unwind(|| create(&args, &out));
3089+
assert!(result.is_ok(), "create should return an error, not panic");
3090+
let err = result.unwrap().unwrap_err().to_string();
3091+
assert!(err.contains("schedule 1 has 6 periods, expected 7"));
3092+
}
3093+
28853094
fn empty_args() -> CreateArgs {
28863095
CreateArgs {
28873096
problem: Some("BiconnectivityAugmentation".to_string()),
@@ -2951,6 +3160,9 @@ mod tests {
29513160
deadline: None,
29523161
num_processors: None,
29533162
alphabet_size: None,
3163+
schedules: None,
3164+
requirements: None,
3165+
num_workers: None,
29543166
}
29553167
}
29563168

src/example_db/fixtures/examples.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
{"problem":"SetBasis","variant":{},"instance":{"collection":[[0,1],[1,2],[0,2],[0,1,2]],"k":3,"universe_size":4},"samples":[{"config":[1,0,0,0,0,1,0,0,0,0,1,0],"metric":true}],"optimal":[{"config":[0,0,1,0,0,1,0,0,1,0,0,0],"metric":true},{"config":[0,0,1,0,1,0,0,0,0,1,0,0],"metric":true},{"config":[0,1,0,0,0,0,1,0,1,0,0,0],"metric":true},{"config":[0,1,0,0,1,0,0,0,0,0,1,0],"metric":true},{"config":[0,1,1,0,1,0,1,0,1,1,0,0],"metric":true},{"config":[0,1,1,0,1,1,0,0,1,0,1,0],"metric":true},{"config":[1,0,0,0,0,0,1,0,0,1,0,0],"metric":true},{"config":[1,0,0,0,0,1,0,0,0,0,1,0],"metric":true},{"config":[1,0,1,0,0,1,1,0,1,1,0,0],"metric":true},{"config":[1,0,1,0,1,1,0,0,0,1,1,0],"metric":true},{"config":[1,1,0,0,0,1,1,0,1,0,1,0],"metric":true},{"config":[1,1,0,0,1,0,1,0,0,1,1,0],"metric":true}]},
4242
{"problem":"ShortestCommonSupersequence","variant":{},"instance":{"alphabet_size":3,"bound":4,"strings":[[0,1,2],[1,0,2]]},"samples":[{"config":[1,0,1,2],"metric":true}],"optimal":[{"config":[0,1,0,2],"metric":true},{"config":[1,0,1,2],"metric":true}]},
4343
{"problem":"SpinGlass","variant":{"graph":"SimpleGraph","weight":"i32"},"instance":{"couplings":[1,1,1,1,1,1,1],"fields":[0,0,0,0,0],"graph":{"inner":{"edge_property":"undirected","edges":[[0,1,null],[1,2,null],[3,4,null],[0,3,null],[1,3,null],[1,4,null],[2,4,null]],"node_holes":[],"nodes":[null,null,null,null,null]}}},"samples":[{"config":[1,0,1,1,0],"metric":{"Valid":-3}}],"optimal":[{"config":[0,0,1,1,0],"metric":{"Valid":-3}},{"config":[0,1,0,0,1],"metric":{"Valid":-3}},{"config":[0,1,0,1,0],"metric":{"Valid":-3}},{"config":[0,1,1,1,0],"metric":{"Valid":-3}},{"config":[1,0,0,0,1],"metric":{"Valid":-3}},{"config":[1,0,1,0,1],"metric":{"Valid":-3}},{"config":[1,0,1,1,0],"metric":{"Valid":-3}},{"config":[1,1,0,0,1],"metric":{"Valid":-3}}]},
44+
{"problem":"StaffScheduling","variant":{},"instance":{"num_workers":4,"requirements":[2,2,2,3,3,2,1],"schedules":[[true,true,true,true,true,false,false],[false,true,true,true,true,true,false],[false,false,true,true,true,true,true],[true,false,false,true,true,true,true],[true,true,false,false,true,true,true]],"shifts_per_schedule":5},"samples":[{"config":[1,1,1,1,0],"metric":true}],"optimal":[{"config":[0,1,1,1,1],"metric":true},{"config":[0,2,0,1,1],"metric":true},{"config":[0,2,0,2,0],"metric":true},{"config":[1,0,1,1,1],"metric":true},{"config":[1,0,2,0,1],"metric":true},{"config":[1,1,0,1,0],"metric":true},{"config":[1,1,0,1,1],"metric":true},{"config":[1,1,0,2,0],"metric":true},{"config":[1,1,1,0,1],"metric":true},{"config":[1,1,1,1,0],"metric":true},{"config":[1,2,0,0,1],"metric":true},{"config":[1,2,0,1,0],"metric":true},{"config":[2,0,0,1,1],"metric":true},{"config":[2,0,0,2,0],"metric":true},{"config":[2,0,1,0,1],"metric":true},{"config":[2,0,1,1,0],"metric":true},{"config":[2,0,2,0,0],"metric":true},{"config":[2,1,0,0,1],"metric":true},{"config":[2,1,0,1,0],"metric":true},{"config":[2,1,1,0,0],"metric":true}]},
4445
{"problem":"SteinerTree","variant":{"graph":"SimpleGraph","weight":"i32"},"instance":{"edge_weights":[2,5,2,1,5,6,1],"graph":{"inner":{"edge_property":"undirected","edges":[[0,1,null],[0,3,null],[1,2,null],[1,3,null],[2,3,null],[2,4,null],[3,4,null]],"node_holes":[],"nodes":[null,null,null,null,null]}},"terminals":[0,2,4]},"samples":[{"config":[1,0,1,1,0,0,1],"metric":{"Valid":6}}],"optimal":[{"config":[1,0,1,1,0,0,1],"metric":{"Valid":6}}]},
4546
{"problem":"StrongConnectivityAugmentation","variant":{"weight":"i32"},"instance":{"bound":1,"candidate_arcs":[[3,0,5],[3,1,3],[3,2,4],[4,0,6],[4,1,2],[4,2,7],[5,0,4],[5,1,3],[5,2,1],[0,3,8],[0,4,3],[0,5,2],[1,3,6],[1,4,4],[1,5,5],[2,4,3],[2,5,7],[1,0,2]],"graph":{"inner":{"edge_property":"directed","edges":[[0,1,null],[1,2,null],[2,0,null],[3,4,null],[4,3,null],[2,3,null],[4,5,null],[5,3,null]],"node_holes":[],"nodes":[null,null,null,null,null,null]}}},"samples":[{"config":[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],"metric":true},{"config":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"metric":false}],"optimal":[{"config":[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],"metric":true}]},
4647
{"problem":"TravelingSalesman","variant":{"graph":"SimpleGraph","weight":"i32"},"instance":{"edge_weights":[1,3,2,2,3,1],"graph":{"inner":{"edge_property":"undirected","edges":[[0,1,null],[0,2,null],[0,3,null],[1,2,null],[1,3,null],[2,3,null]],"node_holes":[],"nodes":[null,null,null,null]}}},"samples":[{"config":[1,0,1,1,0,1],"metric":{"Valid":6}}],"optimal":[{"config":[1,0,1,1,0,1],"metric":{"Valid":6}}]},

0 commit comments

Comments
 (0)