Service/Calc/Compress/Phase2.php
private function compressPhase2($calcIdWriteOff, $calcIdPhase1, $calcIdPhase2, $scheme)
    {
        $pv = $this->rouGetPv->exec($calcIdWriteOff);
        $dwnlPlain = $this->daoBonDwnl->getByCalcId($calcIdWriteOff);
        $dwnlPhase1 = $this->daoBonDwnl->getByCalcId($calcIdPhase1);
        $ctx = new \Praxigento\Core\Data();
        $ctx->set(PCpmrsPhase2::IN_CALC_ID_PHASE2, $calcIdPhase2);
        $ctx->set(PCpmrsPhase2::IN_SCHEME, $scheme);
        $ctx->set(PCpmrsPhase2::IN_DWNL_PLAIN, $dwnlPlain);
        $ctx->set(PCpmrsPhase2::IN_DWNL_PHASE1, $dwnlPhase1);
        $ctx->set(PCpmrsPhase2::IN_MAP_PV, $pv);
        $out = $this->procCmprsPhase2->exec($ctx);
        $dwnlPhase2 = $out->get(PCpmrsPhase2::OUT_DWNL_PHASE2);
        $legs = $out->get(PCpmrsPhase2::OUT_LEGS);
        $result = [$dwnlPhase2, $legs];
        return $result;
    }
private function compressPhase2($calcIdWriteOff, $calcIdPhase1, $calcIdPhase2, $scheme)
    {
        $pv = $this->rouGetPv->exec($calcIdWriteOff);
        $dwnlPlain = $this->daoBonDwnl->getByCalcId($calcIdWriteOff);
        $dwnlPhase1 = $this->daoBonDwnl->getByCalcId($calcIdPhase1);
        $ctx = new \Praxigento\Core\Data();
        $ctx->set(PCpmrsPhase2::IN_CALC_ID_PHASE2, $calcIdPhase2);
        $ctx->set(PCpmrsPhase2::IN_SCHEME, $scheme);
        $ctx->set(PCpmrsPhase2::IN_DWNL_PLAIN, $dwnlPlain);
        $ctx->set(PCpmrsPhase2::IN_DWNL_PHASE1, $dwnlPhase1);
        $ctx->set(PCpmrsPhase2::IN_MAP_PV, $pv);
        $out = $this->procCmprsPhase2->exec($ctx);
        $dwnlPhase2 = $out->get(PCpmrsPhase2::OUT_DWNL_PHASE2);
        $legs = $out->get(PCpmrsPhase2::OUT_LEGS);
        $result = [$dwnlPhase2, $legs];
        return $result;
    }
Collect data for Phase2 compression and call process common for general & forecast calculations.

@param $calcIdWriteOff
@param $calcIdPhase1
@param $calcIdPhase2
@param $scheme
@return array