Changeset 666042a in observatorio for simulacion/ModuloDinamico
- Timestamp:
- Jan 7, 2015, 4:11:35 PM (9 years ago)
- Branches:
- simulacion
- Children:
- bf76088
- Parents:
- 7e7ebba
- Location:
- simulacion/ModuloDinamico
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
simulacion/ModuloDinamico/io_manager.H
ra3eef50 r666042a 456 456 scode << input.get_id(); 457 457 458 if (input.get_nationality() == "V")458 if (input.get_nationality() != "E") 459 459 scode << input.get_company_rif(); 460 460 else … … 469 469 std::shared_ptr<Good> ptr_good; 470 470 471 if (input.get_nationality() == "V")471 if (input.get_nationality() != "E") 472 472 ptr_good = std::shared_ptr<Good>(new Input(input)); 473 473 else … … 564 564 src = *ptr_src; 565 565 566 Product * ptr_product = 567 static_cast<Product *>(src->get_info().get()); 568 566 569 IP_Relationship ip_relationship; 567 570 … … 573 576 ); 574 577 575 ip_relationship.set_purchase_price(product.get_price()); 578 if (ptr_product->get_price() == 0.0) 579 get_acquisition_price(input.get_nationality(), 580 input.get_id(), year); 581 else 582 ip_relationship.set_purchase_price( 583 ptr_product->get_price() 584 ); 585 586 ip_relationship.set_bought_quantity( 587 get_declared_bought_quantity( 588 ptr_product->get_company_rif(), 589 ptr_product->get_company_name(), 590 input.get_id(), 591 year 592 ) 593 ); 576 594 577 595 src->get_info()->set_level( -
simulacion/ModuloDinamico/queries.C
r6217e66 r666042a 294 294 DB::SUPPLIER_ID), 295 295 concat(DB::SUPPLIER_TABLE_NAME, DB::ID))); 296 str_query.addWhere(op(concat(DB::INPUT_SUPPLIER_TABLE_NAME, DB::YEAR_R),297 year));298 296 299 297 if (not query.exec(str_query)) -
simulacion/ModuloDinamico/simulator.C
r8171889 r666042a 315 315 ip_sim_attr.bought_quantity; 316 316 317 if (possible_production == 0.0) 318 { 319 std::cout << "RQ: " << ip_rel.get_requested_quantity() << " - " 320 << "BQ: " << ip_sim_attr.bought_quantity << '\n'; 321 } 322 317 323 // Se actualiza la máxima producción posible. 318 324 if (possible_production < max_possible_production) … … 422 428 423 429 ip_sim_attr_t.bought_quantity = internal_quantity * proportion; 430 431 I(ip_sim_attr_t.bought_quantity > 0.0); 424 432 } 425 433 }
Note: See TracChangeset
for help on using the changeset viewer.