Skip to content

Commit 3a04fd3

Browse files
committed
add mock testing constraints that equal boundary min/max
N.B. this mock renders fine on master, but failed during one attempt at fixing contour+constraint bug
1 parent 40c354a commit 3a04fd3

File tree

2 files changed

+175
-0
lines changed

2 files changed

+175
-0
lines changed
Loading
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"data": [
3+
{
4+
"type": "contour",
5+
"z": [[1, 1, 1], [1, 0, 2], [2, 2, 2]],
6+
"contours": {
7+
"type": "constraint",
8+
"operation": "[]",
9+
"value": [0, 0.9999],
10+
"showlabels": true
11+
}
12+
},
13+
{
14+
"mode": "text",
15+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
16+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
17+
"text": [1, 1, 1, 1, 0, 2, 2, 2, 2]
18+
},
19+
{
20+
"type": "contour",
21+
"z": [[1, 1, 1], [1, 0, 2], [2, 2, 2]],
22+
"contours": {
23+
"type": "constraint",
24+
"operation": "[]",
25+
"value": [0, 1],
26+
"showlabels": true
27+
},
28+
"xaxis": "x2",
29+
"yaxis": "y2"
30+
},
31+
{
32+
"mode": "text",
33+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
34+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
35+
"text": [1, 1, 1, 1, 0, 2, 2, 2, 2],
36+
"xaxis": "x2",
37+
"yaxis": "y2"
38+
},
39+
{
40+
"type": "contour",
41+
"z": [[1, 1, 1], [1, 5, 2], [2, 2, 2]],
42+
"contours": {
43+
"type": "constraint",
44+
"operation": "[]",
45+
"value": [0, 0.9999],
46+
"showlabels": true
47+
},
48+
"xaxis": "x3",
49+
"yaxis": "y3"
50+
},
51+
{
52+
"mode": "text",
53+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
54+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
55+
"text": [1, 1, 1, 1, 5, 2, 2, 2, 2],
56+
"xaxis": "x3",
57+
"yaxis": "y3"
58+
},
59+
{
60+
"type": "contour",
61+
"z": [[1, 1, 1], [1, 5, 2], [2, 2, 2]],
62+
"contours": {
63+
"type": "constraint",
64+
"operation": "[]",
65+
"value": [0, 1],
66+
"showlabels": true
67+
},
68+
"xaxis": "x4",
69+
"yaxis": "y4"
70+
},
71+
{
72+
"mode": "text",
73+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
74+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
75+
"text": [1, 1, 1, 1, 5, 2, 2, 2, 2],
76+
"xaxis": "x4",
77+
"yaxis": "y4"
78+
},
79+
{
80+
"type": "contour",
81+
"z": [[1, 1, 1], [1, 0, 2], [2, 2, 2]],
82+
"contours": {
83+
"type": "constraint",
84+
"operation": "][",
85+
"value": [1, 2],
86+
"showlabels": true
87+
},
88+
"xaxis": "x5",
89+
"yaxis": "y5"
90+
},
91+
{
92+
"mode": "text",
93+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
94+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
95+
"text": [1, 1, 1, 1, 0, 2, 2, 2, 2],
96+
"xaxis": "x5",
97+
"yaxis": "y5"
98+
},
99+
{
100+
"type": "contour",
101+
"z": [[1, 1, 1], [1, 0, 2], [2, 2, 2]],
102+
"contours": {
103+
"type": "constraint",
104+
"operation": "][",
105+
"value": [0.999, 2.001],
106+
"showlabels": true
107+
},
108+
"xaxis": "x6",
109+
"yaxis": "y6"
110+
},
111+
{
112+
"mode": "text",
113+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
114+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
115+
"text": [1, 1, 1, 1, 0, 2, 2, 2, 2],
116+
"xaxis": "x6",
117+
"yaxis": "y6"
118+
},
119+
{
120+
"type": "contour",
121+
"z": [[1, 1, 1], [1, 5, 2], [2, 2, 2]],
122+
"contours": {
123+
"type": "constraint",
124+
"operation": "][",
125+
"value": [1, 2],
126+
"showlabels": true
127+
},
128+
"xaxis": "x7",
129+
"yaxis": "y7"
130+
},
131+
{
132+
"mode": "text",
133+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
134+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
135+
"text": [1, 1, 1, 1, 5, 2, 2, 2, 2],
136+
"xaxis": "x7",
137+
"yaxis": "y7"
138+
},
139+
{
140+
"type": "contour",
141+
"z": [[1, 1, 1], [1, 5, 2], [2, 2, 2]],
142+
"contours": {
143+
"type": "constraint",
144+
"operation": "][",
145+
"value": [0.999, 2.001],
146+
"showlabels": true
147+
},
148+
"xaxis": "x8",
149+
"yaxis": "y8"
150+
},
151+
{
152+
"mode": "text",
153+
"x": [0, 1, 2, 0, 1, 2, 0, 1, 2],
154+
"y": [0, 0, 0, 1, 1, 1, 2, 2, 2],
155+
"text": [1, 1, 1, 1, 5, 2, 2, 2, 2],
156+
"xaxis": "x8",
157+
"yaxis": "y8"
158+
}
159+
],
160+
"layout": {
161+
"grid": {"rows": 4, "columns": 2, "pattern": "independent"},
162+
"width": 600,
163+
"height": 800,
164+
"showlegend": false,
165+
"title": {"text": "Constraints that (almost) equal boundary min/max"},
166+
"yaxis": {"title": {"text": "[0, 0.9999]"}},
167+
"yaxis2": {"title": {"text": "[0, 1]"}, "side": "right"},
168+
"yaxis3": {"title": {"text": "[0, 0.9999]"}},
169+
"yaxis4": {"title": {"text": "[0, 1]"}, "side": "right"},
170+
"yaxis5": {"title": {"text": "]1, 2["}},
171+
"yaxis6": {"title": {"text": "[0.999, 2.001]"}, "side": "right"},
172+
"yaxis7": {"title": {"text": "]1, 2["}},
173+
"yaxis8": {"title": {"text": "[0.999, 2.001]"}, "side": "right"}
174+
}
175+
}

0 commit comments

Comments
 (0)