| 7668 | |
| 7669 | |
| 7670 | bool cHardwareCPU::Inst_Sleep(cAvidaContext& ctx) |
| 7671 | { |
| 7672 | m_organism->SetSleeping(false); //this instruction get executed at the end of a sleep cycle |
| 7673 | |
| 7674 | cPhenotype& phenotype = m_organism->GetPhenotype(); |
| 7675 | if (m_world->GetConfig().APPLY_ENERGY_METHOD.Get() == 2) { |
| 7676 | phenotype.RefreshEnergy(); |
| 7677 | phenotype.ApplyToEnergyStore(); |
| 7678 | double newMerit = phenotype.ConvertEnergyToMerit(phenotype.GetStoredEnergy() * phenotype.GetEnergyUsageRatio()); |
| 7679 | m_organism->UpdateMerit(ctx, newMerit); |
| 7680 | } |
| 7681 | |
| 7682 | return true; |
| 7683 | } |
| 7684 | |
| 7685 | bool cHardwareCPU::Inst_GetUpdate(cAvidaContext&) |
| 7686 | { |
nothing calls this directly
no test coverage detected