|
22 | 22 | from pyomo.contrib.gdpopt.discrete_problem_initialize import valid_init_strategies
|
23 | 23 | from pyomo.contrib.gdpopt.nlp_initialization import restore_vars_to_original_values
|
24 | 24 | from pyomo.contrib.gdpopt.util import a_logger, _DoNothing
|
| 25 | +from pyomo.util.config_domains import ComponentDataSet |
| 26 | +from pyomo.core.base import LogicalConstraint |
| 27 | +from pyomo.gdp.disjunct import Disjunction |
25 | 28 |
|
26 | 29 | _supported_algorithms = {
|
27 | 30 | 'LOA': ('gdpopt.loa', 'Logic-based Outer Approximation'),
|
@@ -528,3 +531,40 @@ def _add_tolerance_configs(CONFIG):
|
528 | 531 | description="Tolerance for bound convergence.",
|
529 | 532 | ),
|
530 | 533 | )
|
| 534 | + |
| 535 | + |
| 536 | +def _add_ldsda_configs(CONFIG): |
| 537 | + CONFIG.declare( |
| 538 | + "direction_norm", |
| 539 | + ConfigValue( |
| 540 | + default='L2', |
| 541 | + domain=In(['L2', 'Linf']), |
| 542 | + description="The norm to use for the search direction", |
| 543 | + ), |
| 544 | + ) |
| 545 | + CONFIG.declare( |
| 546 | + "starting_point", |
| 547 | + ConfigValue(default=None, description="The value list of external variables."), |
| 548 | + ) |
| 549 | + CONFIG.declare( |
| 550 | + "logical_constraint_list", |
| 551 | + ConfigValue( |
| 552 | + default=None, |
| 553 | + domain=ComponentDataSet(LogicalConstraint), |
| 554 | + description=""" |
| 555 | + The list of logical constraints to be reformulated into external variables. |
| 556 | + The logical constraints should be in the same order of provided starting point. |
| 557 | + The provided logical constraints should be ExactlyExpressions.""", |
| 558 | + ), |
| 559 | + ) |
| 560 | + CONFIG.declare( |
| 561 | + "disjunction_list", |
| 562 | + ConfigValue( |
| 563 | + default=None, |
| 564 | + domain=ComponentDataSet(Disjunction), |
| 565 | + description=""" |
| 566 | + The list of disjunctions to be reformulated into external variables. |
| 567 | + The disjunctions should be in the same order of provided starting point. |
| 568 | + """, |
| 569 | + ), |
| 570 | + ) |
0 commit comments