diff --git a/Project.toml b/Project.toml index 8c4529cafc9..f71308cf950 100644 --- a/Project.toml +++ b/Project.toml @@ -20,7 +20,7 @@ DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" JuMPDimensionalDataExt = "DimensionalData" [compat] -DimensionalData = "0.24, 0.25" +DimensionalData = "0.24, 0.25, 0.26.2" LinearAlgebra = "<0.0.1, 1.6" MacroTools = "0.5" MathOptInterface = "1.25.2" diff --git a/docs/Project.toml b/docs/Project.toml index 0d63805ff5e..f96a0980e9f 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -41,7 +41,7 @@ CDDLib = "=0.9.2" CSV = "0.10" Clarabel = "=0.6.0" DataFrames = "1" -DimensionalData = "0.24" +DimensionalData = "0.26.2" Distributions = "0.25" Documenter = "=1.2.1" DocumenterCitations = "1" diff --git a/docs/src/extensions/DimensionalData.md b/docs/src/extensions/DimensionalData.md index a575ba26175..1850b221a39 100644 --- a/docs/src/extensions/DimensionalData.md +++ b/docs/src/extensions/DimensionalData.md @@ -41,13 +41,16 @@ julia> @variable( x[i = 2:4, j = ["a", "b"]] >= i, container = DimensionalData.DimArray, ) -3×2 DimArray{VariableRef,2} with dimensions: - Dim{:i} Sampled{Int64} 2:4 ForwardOrdered Regular Points, - Dim{:j} Categorical{String} String["a", "b"] ForwardOrdered - "a" "b" - 2 x[2,a] x[2,b] - 3 x[3,a] x[3,b] - 4 x[4,a] x[4,b] +╭─────────────────────────────╮ +│ 3×2 DimArray{VariableRef,2} │ +├─────────────────────────────┴─────────────────── dims ┐ + ↓ i Sampled{Int64} 2:4 ForwardOrdered Regular Points, + → j Categorical{String} ["a", "b"] ForwardOrdered +└───────────────────────────────────────────────────────┘ + ↓ → "a" "b" + 2 x[2,a] x[2,b] + 3 x[3,a] x[3,b] + 4 x[4,a] x[4,b] ``` Here `x` is a `DimensionalData.Dim` array object, so indexing uses the @@ -69,8 +72,11 @@ julia> @expression( sum(x[At(i), At(j)] for i in 2:4), container = DimensionalData.DimArray, ) -2-element DimArray{AffExpr,1} with dimensions: - Dim{:j} Categorical{String} String["a", "b"] ForwardOrdered +╭───────────────────────────────╮ +│ 2-element DimArray{AffExpr,1} │ +├───────────────────────────────┴───────────── dims ┐ + ↓ j Categorical{String} ["a", "b"] ForwardOrdered +└───────────────────────────────────────────────────┘ "a" x[2,a] + x[3,a] + x[4,a] "b" x[2,b] + x[3,b] + x[4,b] ``` @@ -82,8 +88,11 @@ julia> @constraint( expr[At(j)] <= 1, container = DimensionalData.DimArray, ) -2-element DimArray{ConstraintRef{Model, MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.LessThan{Float64}}, ScalarShape},1} with dimensions: - Dim{:j} Categorical{String} String["a", "b"] ForwardOrdered +╭──────────────────────────────────────────────────────────────────────────────╮ +│ 2-element DimArray{ConstraintRef{Model, MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.LessThan{Float64}}, ScalarShape},1} │ +├──────────────────────────────────────────────────────────────────────── dims ┤ + ↓ j Categorical{String} ["a", "b"] ForwardOrdered +└──────────────────────────────────────────────────────────────────────────────┘ "a" x[2,a] + x[3,a] + x[4,a] ≤ 1 "b" x[2,b] + x[3,b] + x[4,b] ≤ 1 ```