|
260 | 260 | "required": ["head"], |
261 | 261 | "oneOf": [{ |
262 | 262 | "description": "The scalar variable `variable`.", |
| 263 | + "example": "{\"head\": \"SingleVariable\", \"variable\": \"x\"}", |
263 | 264 | "required": ["variable"], |
264 | 265 | "properties": { |
265 | 266 | "head": { |
|
271 | 272 | } |
272 | 273 | }, { |
273 | 274 | "description": "The function `a'x + b`, where `a` is a sparse vector specified by a list of `ScalarAffineTerm`s in `terms` and `b` is the scalar in `constant`. Duplicate variables in `terms` are accepted, and the corresponding coefficients are summed together.", |
| 275 | + "example": "{\"head\": \"ScalarAffineFunction\", \"constant\": 1.0, \"terms\": [{\"coefficient\": 2.5, \"variable\": \"x\"}]}", |
274 | 276 | "required": ["constant", "terms"], |
275 | 277 | "properties": { |
276 | 278 | "head": { |
|
288 | 290 | } |
289 | 291 | }, { |
290 | 292 | "description": "The function `0.5x'Qx + a'x + b`, where `a` is a sparse vector of `ScalarAffineTerm`s in `affine_terms`, `b` is the scalar `constant`, and `Q` is a symmetric matrix specified by a list of `ScalarQuadraticTerm`s in `quadratic_terms`. Duplicate indices in `affine_terms` and `quadratic` are accepted, and the corresponding coefficients are summed together. Mirrored indices in `quadratic_terms` (i.e., `(i,j)` and `(j, i)`) are considered duplicates; only one need to be specified.", |
| 293 | + "example": "{\"head\": \"ScalarAffineFunction\", \"constant\": 1.0, \"affine_terms\": [{\"coefficient\": 2.5, \"variable\": \"x\"}], \"quadratic_terms\": [{\"coefficient\": 2.0, \"variable_1\": \"x\", \"variable_2\": \"y\"}]}", |
291 | 294 | "required": ["constant", "affine_terms", "quadratic_terms"], |
292 | 295 | "properties": { |
293 | 296 | "head": { |
|
334 | 337 | "required": ["head"], |
335 | 338 | "oneOf": [{ |
336 | 339 | "description": "An ordered list of variables.", |
| 340 | + "example": "{\"head\": \"VectorOfVariables\", \"variables\": [\"x\", \"y\"]}", |
337 | 341 | "required": ["variables"], |
338 | 342 | "properties": { |
339 | 343 | "head": { |
|
348 | 352 | } |
349 | 353 | }, { |
350 | 354 | "description": "The function `Ax + b`, where `A` is a sparse matrix specified by a list of `VectorAffineTerm`s in `terms` and `b` is a dense vector specified by `constants`.", |
| 355 | + "example": "{\"head\": \"VectorAffineFunction\", \"constants\": [1.0], \"terms\": [{\"output_index\": 1, \"scalar_term\": {\"coefficient\": 2.5, \"variable\": \"x\"}}]}", |
351 | 356 | "required": ["constants", "terms"], |
352 | 357 | "properties": { |
353 | 358 | "head": { |
|
399 | 404 | "type": "object", |
400 | 405 | "required": ["head"], |
401 | 406 | "oneOf": [{ |
402 | | - "description": "The set `(-inf, upper]`.", |
| 407 | + "description": "(-∞, upper]", |
| 408 | + "example": "{\"head\": \"LessThan\", \"upper\": 2.1}", |
403 | 409 | "required": ["upper"], |
404 | 410 | "properties": { |
405 | 411 | "head": { |
|
410 | 416 | } |
411 | 417 | } |
412 | 418 | }, { |
413 | | - "description": "The set `[lower, upper)`.", |
| 419 | + "description": "[lower, ∞)", |
| 420 | + "example": "{\"head\": \"GreaterThan\", \"lower\": 2.1}", |
414 | 421 | "required": ["lower"], |
415 | 422 | "properties": { |
416 | 423 | "head": { |
|
421 | 428 | } |
422 | 429 | } |
423 | 430 | }, { |
424 | | - "description": "The set `{value}`.", |
| 431 | + "description": "{value}", |
| 432 | + "example": "{\"head\": \"EqualTo\", \"value\": 2.1}", |
425 | 433 | "required": ["value"], |
426 | 434 | "properties": { |
427 | 435 | "head": { |
|
432 | 440 | } |
433 | 441 | } |
434 | 442 | }, { |
435 | | - "description": "The set `[lower, upper]`.", |
| 443 | + "description": "[lower, upper]", |
| 444 | + "example": "{\"head\": \"Interval\", \"lower\": 2.1, \"upper\": 3.4}", |
436 | 445 | "required": ["lower", "upper"], |
437 | 446 | "properties": { |
438 | 447 | "head": { |
|
446 | 455 | } |
447 | 456 | } |
448 | 457 | }, { |
449 | | - "description": "The set `{0} ∪ {lower, lower + 1, ..., upper}`.", |
| 458 | + "description": "{0} ∪ {lower, lower + 1, ..., upper}", |
| 459 | + "example": "{\"head\": \"Semiinteger\", \"lower\": 2, \"upper\": 4}", |
450 | 460 | "required": ["lower", "upper"], |
451 | 461 | "properties": { |
452 | 462 | "head": { |
|
460 | 470 | } |
461 | 471 | } |
462 | 472 | }, { |
463 | | - "description": "The set `{0} ∪ [lower, upper]`.", |
| 473 | + "description": "{0} ∪ [lower, upper]", |
| 474 | + "example": "{\"head\": \"Semicontinuous\", \"lower\": 2.1, \"upper\": 3.4}", |
464 | 475 | "required": ["lower", "upper"], |
465 | 476 | "properties": { |
466 | 477 | "head": { |
|
474 | 485 | } |
475 | 486 | } |
476 | 487 | }, { |
477 | | - "description": "The set `{0, 1}`.", |
| 488 | + "description": "{0, 1}", |
| 489 | + "example": "{\"head\": \"ZeroOne\"}", |
478 | 490 | "properties": { |
479 | 491 | "head": { |
480 | 492 | "const": "ZeroOne" |
481 | 493 | } |
482 | 494 | } |
483 | 495 | }, { |
484 | | - "description": "The set `ℤ`.", |
| 496 | + "description": "ℤ", |
| 497 | + "example": "{\"head\": \"Integer\"}", |
485 | 498 | "properties": { |
486 | 499 | "head": { |
487 | 500 | "const": "Integer" |
|
494 | 507 | "type": "object", |
495 | 508 | "required": ["head"], |
496 | 509 | "oneOf": [{ |
497 | | - "description": "The cone `[x, y, z] ∈ {R³: y * exp(x / y) ≤ z, y ≥ 0}`.", |
| 510 | + "description": "[x, y, z] ∈ {R³: y * exp(x / y) ≤ z, y ≥ 0}", |
| 511 | + "example": "{\"head\": \"ExponentialCone\"}", |
498 | 512 | "properties": { |
499 | 513 | "head": { |
500 | 514 | "const": "ExponentialCone" |
501 | 515 | } |
502 | 516 | } |
503 | 517 | }, { |
504 | | - "description": "The cone `[u, v, w] ∈ {R³: -u * exp(v / u) ≤ exp(1) * w, u < 0}`.", |
| 518 | + "description": "[u, v, w] ∈ {R³: -u * exp(v / u) ≤ exp(1) * w, u < 0}", |
| 519 | + "example": "{\"head\": \"DualExponentialCone\"}", |
505 | 520 | "properties": { |
506 | 521 | "head": { |
507 | 522 | "const": "DualExponentialCone" |
508 | 523 | } |
509 | 524 | } |
510 | 525 | }, { |
511 | 526 | "description": "A special ordered set of type I.", |
| 527 | + "example": "{\"head\": \"SOS1\", \"weights\": [1, 3, 2]}", |
512 | 528 | "required": ["weights"], |
513 | 529 | "properties": { |
514 | 530 | "head": { |
|
523 | 539 | } |
524 | 540 | }, { |
525 | 541 | "description": "A special ordered set of type II.", |
| 542 | + "example": "{\"head\": \"SOS2\", \"weights\": [1, 3, 2]}", |
526 | 543 | "required": ["weights"], |
527 | 544 | "properties": { |
528 | 545 | "head": { |
|
536 | 553 | } |
537 | 554 | } |
538 | 555 | }, { |
539 | | - "description": "The cone `[t, x] ∈ {R^{dimension}: t ≤ (Πxᵢ)^{1 / (dimension-1)}}`.", |
| 556 | + "description": "[t, x] ∈ {R^{dimension}: t ≤ (Πxᵢ)^{1 / (dimension-1)}}", |
| 557 | + "example": "{\"head\": \"GeometricMeanCone\", \"dimension\": 3}", |
540 | 558 | "required": ["dimension"], |
541 | 559 | "properties": { |
542 | 560 | "head": { |
|
548 | 566 | } |
549 | 567 | } |
550 | 568 | }, { |
551 | | - "description": "The cone `[t, x] ∈ {R^{dimension} : t ≥ ||x||₂.", |
| 569 | + "description": "[t, x] ∈ {R^{dimension} : t ≥ ||x||₂", |
| 570 | + "example": "{\"head\": \"SecondOrderCone\", \"dimension\": 3}", |
552 | 571 | "required": ["dimension"], |
553 | 572 | "properties": { |
554 | 573 | "head": { |
|
560 | 579 | } |
561 | 580 | } |
562 | 581 | }, { |
563 | | - "description": "The cone `[t, u, x] ∈ {R^{dimension} : 2tu ≥ (||x||₂)²; t, u ≥ 0}.", |
| 582 | + "description": "[t, u, x] ∈ {R^{dimension} : 2tu ≥ (||x||₂)²; t, u ≥ 0}", |
| 583 | + "example": "{\"head\": \"RotatedSecondOrderCone\", \"dimension\": 3}", |
564 | 584 | "required": ["dimension"], |
565 | 585 | "properties": { |
566 | 586 | "head": { |
|
572 | 592 | } |
573 | 593 | } |
574 | 594 | }, { |
575 | | - "description": "The set `{0}^{dimension}`.", |
| 595 | + "description": "{0}^{dimension}", |
| 596 | + "example": "{\"head\": \"Zeros\", \"dimension\": 3}", |
576 | 597 | "required": ["dimension"], |
577 | 598 | "properties": { |
578 | 599 | "head": { |
|
584 | 605 | } |
585 | 606 | } |
586 | 607 | }, { |
587 | | - "description": "The set `R^{dimension}`.", |
| 608 | + "description": "R^{dimension}", |
| 609 | + "example": "{\"head\": \"Reals\", \"dimension\": 3}", |
588 | 610 | "required": ["dimension"], |
589 | 611 | "properties": { |
590 | 612 | "head": { |
|
596 | 618 | } |
597 | 619 | } |
598 | 620 | }, { |
599 | | - "description": "The set `R₋^{dimension}`.", |
| 621 | + "description": "R₋^{dimension}", |
| 622 | + "example": "{\"head\": \"Nonpositives\", \"dimension\": 3}", |
600 | 623 | "required": ["dimension"], |
601 | 624 | "properties": { |
602 | 625 | "head": { |
|
608 | 631 | } |
609 | 632 | } |
610 | 633 | }, { |
611 | | - "description": "The set `R₊^{dimension}`.", |
| 634 | + "description": "R₊^{dimension}", |
| 635 | + "example": "{\"head\": \"Nonnegatives\", \"dimension\": 3}", |
612 | 636 | "required": ["dimension"], |
613 | 637 | "properties": { |
614 | 638 | "head": { |
|
636 | 660 | } |
637 | 661 | } |
638 | 662 | }, { |
639 | | - "description": "The cone `[x, y, z] ∈ {R³: x^{exponent} y^{1-exponent} ≥ |z|; x, y ≥ 0}`.", |
| 663 | + "description": "[x, y, z] ∈ {R³: x^{exponent} y^{1-exponent} ≥ |z|; x, y ≥ 0}", |
| 664 | + "example": "{\"head\": \"PowerCone\", \"exponent\": 2.0}", |
640 | 665 | "required": ["exponent"], |
641 | 666 | "properties": { |
642 | 667 | "head": { |
|
647 | 672 | } |
648 | 673 | } |
649 | 674 | }, { |
650 | | - "description": "The cone `[u, v, w] ∈ {R³: (u / exponent)^{exponent} (v / (1-exponent))^{1-exponent} ≥ |w|; u, v ≥ 0}`.", |
| 675 | + "description": "[u, v, w] ∈ {R³: (u / exponent)^{exponent} (v / (1-exponent))^{1-exponent} ≥ |w|; u, v ≥ 0}", |
| 676 | + "example": "{\"head\": \"DualPowerCone\", \"exponent\": 2.0}", |
651 | 677 | "required": ["exponent"], |
652 | 678 | "properties": { |
653 | 679 | "head": { |
|
0 commit comments