45 #include <basic/Tracer.hh>
47 #include <utility/vector1.hh>
48 #include <basic/options/keys/OptionKeys.hh>
58 namespace topology_broker {
80 PcsGridSearchParameterManager::get_instance()->incremente_n_multi_data();
87 n_m_d = PcsGridSearchParameterManager::get_instance()->get_n_multi_data();
89 PcsGridSearchParameter & g = PcsGridSearchParameterManager::get_instance()->get_grid_search_parameters(n_m_d);
93 if ( tag ==
"PCS_WEIGHT" ) {
95 g.pcs_weight_stage1_ >>
96 g.pcs_weight_stage2_ >>
97 g.pcs_weight_stage3_ >>
98 g.pcs_weight_stage4_).fail()){
99 std::cerr <<
"problem while parsing the tag '" << tag <<
"' . Expecting 4 numbers (integer or float)" << std::endl;
106 if ( tag ==
"INCLUDE_ONLY" ) {
108 g.include_only_start_stage1_ >>
109 g.include_only_end_stage1_
111 std::cerr <<
"problem while parsing the tag '" << tag <<
"' . Expecting 2 positive integer" << std::endl;
114 g.include_only_start_stage2_ = g.include_only_start_stage1_;
115 g.include_only_start_stage3_ = g.include_only_start_stage1_;
116 g.include_only_start_stage4_ = g.include_only_start_stage1_;
118 g.include_only_end_stage2_ = g.include_only_end_stage1_;
119 g.include_only_end_stage3_ = g.include_only_end_stage1_;
120 g.include_only_end_stage4_ = g.include_only_end_stage1_;
125 if ( tag ==
"INDIVIDUAL_SCALE" ) {
127 g.individual_scale_stage1_
129 std::cerr <<
"problem while parsing the tag '" << tag <<
"' . Expecting 1 positive number" << std::endl;
132 g.individual_scale_stage2_ = g.individual_scale_stage1_;
133 g.individual_scale_stage3_ = g.individual_scale_stage1_;
134 g.individual_scale_stage4_ = g.individual_scale_stage1_;
139 if ( tag ==
"N_TRIALS_MINIMIZATION" ) {
141 g.n_trial_min_stage1_
143 std::cerr <<
"problem while parsing the tag '" << tag <<
"' . Expecting 1 positive integer" << std::endl;
146 g.n_trial_min_stage2_ = g.n_trial_min_stage1_;
147 g.n_trial_min_stage3_ = g.n_trial_min_stage1_;
148 g.n_trial_min_stage4_ = g.n_trial_min_stage1_;
153 if ( tag ==
"PCS_INPUT_FILE" ) {
160 std::cerr <<
"problem while parsing the tag '" << tag <<
"' . Expecting 1 string followed by 1 number (integer or float)" << std::endl;
165 std::cerr <<
"problem while parsing the tag '" << tag <<
"' . Expecting 1 string followed by one POSITIVE weight" << std::endl;
168 g.filenames_.push_back(filename);
169 g.individual_weights_.push_back(weight);
173 std::cerr <<
"The following tag is unknown " << tag << std::endl;
190 using namespace basic::options;
191 using namespace basic::options::OptionKeys;
204 n_m_d = pcs_g_s_p_m->get_n_multi_data();
208 for (i_multi_data = 1; i_multi_data <= n_m_d; ++i_multi_data){
223 TR_PcsEnergyController <<
"Switching STAGE_1; Grid parameters of center " << i_multi_data <<
" / " << n_m_d << std::endl;
237 TR_PcsEnergyController <<
"Switching STAGE_2; Grid parameters of center " << i_multi_data <<
" / " << n_m_d << std::endl;
251 TR_PcsEnergyController <<
"Switching STAGE_3a; Grid parameters of center " << i_multi_data <<
" / " << n_m_d << std::endl;
265 TR_PcsEnergyController <<
"Switching STAGE_3b; Grid parameters of center " << i_multi_data <<
" / " << n_m_d << std::endl;
278 TR_PcsEnergyController <<
"Switching STAGE_4; Grid parameters of center " << i_multi_data <<
" / " << n_m_d << std::endl;
294 n_m_d = PcsGridSearchParameterManager::get_instance()->get_n_multi_data();
296 PcsGridSearchParameter & g = PcsGridSearchParameterManager::get_instance()->get_grid_search_parameters(n_m_d);
300 using namespace basic::options;
301 using namespace basic::options::OptionKeys;
308 pcs_e_p_m->incremente_n_multi_data();
310 pcs_e_p_m->get_PcsEnergyParameter_for(n_m_d).set_grid_param(
311 g.include_only_start_stage4_,
312 g.include_only_end_stage4_,
313 g.n_trial_min_stage4_,
314 g.pcs_weight_stage4_,
315 g.individual_scale_stage4_
318 pcs_e_p_m->get_PcsEnergyParameter_for(n_m_d).set_vector_name_and_weight(g.filenames_, g.individual_weights_);