Commit b97e0998 authored by Max Lyon's avatar Max Lyon

fix UI for new MISolver interface

parent 990b163b
......@@ -70,11 +70,12 @@ get_parameters()
initialFullCB ->setChecked( misolver_.get_inital_full());
iterFullCB ->setChecked( misolver_.get_iter_full());
finalFullCB ->setChecked( misolver_.get_final_full());
directRoundingCB ->setChecked( misolver_.get_direct_rounding());
noRoundingCB ->setChecked( misolver_.get_no_rounding());
multipleRoundingCB->setChecked( misolver_.get_multiple_rounding());
gurobiRoundingCB ->setChecked( misolver_.get_gurobi_rounding());
cplexRoundingCB ->setChecked( misolver_.get_cplex_rounding());
auto rounding_type = misolver_.get_rounding_type();
directRoundingCB ->setChecked( rounding_type == MISolver::RoundingType::DIRECT);
noRoundingCB ->setChecked( rounding_type == MISolver::RoundingType::NONE);
multipleRoundingCB->setChecked( rounding_type == MISolver::RoundingType::MULTIPLE);
gurobiRoundingCB ->setChecked( rounding_type == MISolver::RoundingType::GUROBI);
cplexRoundingCB ->setChecked( rounding_type == MISolver::RoundingType::CPLEX);
localItersSB ->setValue( misolver_.get_local_iters());
localErrorDSB->setValue( log(misolver_.get_local_error())/log(10.0f));
......@@ -84,11 +85,6 @@ get_parameters()
gurobiMaxTimeDSB->setValue(misolver_.get_gurobi_max_time());
multipleRoundingDSB->setValue( misolver_.get_multiple_rounding_threshold());
infoSB->setValue( misolver_.get_noise());
solverStatsCheckBox->setChecked( misolver_.get_stats( ));
use_reordering_cb->setChecked( misolver_.use_constraint_reordering() );
}
......@@ -102,11 +98,16 @@ set_parameters()
misolver_.set_inital_full ( initialFullCB ->isChecked() );
misolver_.set_iter_full ( iterFullCB ->isChecked() );
misolver_.set_final_full ( finalFullCB ->isChecked() );
misolver_.set_direct_rounding( directRoundingCB->isChecked());
misolver_.set_no_rounding( noRoundingCB->isChecked());
misolver_.set_multiple_rounding( multipleRoundingCB->isChecked());
misolver_.set_gurobi_rounding( gurobiRoundingCB->isChecked());
misolver_.set_cplex_rounding ( cplexRoundingCB->isChecked());
if (directRoundingCB->isChecked())
misolver_.set_direct_rounding( );
if (noRoundingCB->isChecked())
misolver_.set_no_rounding();
if ( multipleRoundingCB->isChecked())
misolver_.set_multiple_rounding();
if (gurobiRoundingCB->isChecked())
misolver_.set_gurobi_rounding();
if (cplexRoundingCB->isChecked())
misolver_.set_cplex_rounding();
misolver_.set_local_iters( localItersSB ->value());
misolver_.set_local_error( pow(10, localErrorDSB->value()));
......@@ -117,11 +118,6 @@ set_parameters()
misolver_.set_gurobi_max_time(gurobiMaxTimeDSB->value());
misolver_.set_multiple_rounding_threshold( multipleRoundingDSB->value());
misolver_.set_noise( infoSB->value());
misolver_.set_stats( solverStatsCheckBox->isChecked());
misolver_.use_constraint_reordering() = use_reordering_cb->isChecked();
}
......
......@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>385</width>
<height>273</height>
<height>319</height>
</rect>
</property>
<property name="windowTitle">
......@@ -19,63 +19,17 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="8" column="1">
<widget class="QCheckBox" name="cplexRoundingCB">
<property name="text">
<string>use cplex</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Max Error (1e-x)</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_6">
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Iterations</string>
<string>Constraints</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="6" column="3">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Local</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="localErrorDSB">
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-1000000000.000000000000000</double>
</property>
<property name="maximum">
<double>1000000000.000000000000000</double>
</property>
<property name="value">
<double>6.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="localItersSB">
<property name="maximum">
<number>1000000000</number>
</property>
<property name="value">
<number>10000</number>
<string>s</string>
</property>
</widget>
</item>
......@@ -92,42 +46,10 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="cgErrorDSB">
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-1000000000.000000000000000</double>
</property>
<property name="maximum">
<double>1000000000.000000000000000</double>
</property>
<property name="value">
<double>6.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="cgItersSB">
<property name="maximum">
<number>1000000000</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Full</string>
<string>Rounding</string>
</property>
</widget>
</item>
......@@ -168,10 +90,23 @@
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<item row="7" column="1">
<widget class="QCheckBox" name="cplexRoundingCB">
<property name="text">
<string>Rounding</string>
<string>use cplex</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Local</string>
</property>
</widget>
</item>
......@@ -216,41 +151,28 @@
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="0" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Info Level</string>
<string>Max Error (1e-x)</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QSpinBox" name="infoSB"/>
</item>
<item>
<widget class="QCheckBox" name="solverStatsCheckBox">
<property name="text">
<string>Output solver statistics</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Constraints</string>
<string>GUROBI</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="0" column="2">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Iterations</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="use_reordering_cb">
<property name="text">
<string>reordering</string>
......@@ -260,34 +182,85 @@
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_9">
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="cgErrorDSB">
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-1000000000.000000000000000</double>
</property>
<property name="maximum">
<double>1000000000.000000000000000</double>
</property>
<property name="value">
<double>6.000000000000000</double>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QDoubleSpinBox" name="gurobiMaxTimeDSB">
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
<property name="value">
<double>60.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>GUROBI</string>
<string>Full</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="localErrorDSB">
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-1000000000.000000000000000</double>
</property>
<property name="maximum">
<double>1000000000.000000000000000</double>
</property>
<property name="value">
<double>6.000000000000000</double>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="gurobiRoundingCB">
<property name="text">
<string>use gurobi</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QDoubleSpinBox" name="gurobiMaxTimeDSB">
<item row="2" column="2">
<widget class="QSpinBox" name="cgItersSB">
<property name="maximum">
<double>999999999.000000000000000</double>
<number>1000000000</number>
</property>
<property name="value">
<double>60.000000000000000</double>
<number>20</number>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLabel" name="label_10">
<property name="text">
<string>s</string>
<item row="1" column="2">
<widget class="QSpinBox" name="localItersSB">
<property name="maximum">
<number>1000000000</number>
</property>
<property name="value">
<number>10000</number>
</property>
</widget>
</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment