COIN-OR::LEMON - Graph Library

Ticket #640: 640-86a5b114a066.patch

File 640-86a5b114a066.patch, 988 bytes (added by Alpar Juttner, 4 years ago)
  • lemon/clp.cc

    # HG changeset patch
    # User Alpar Juttner <alpar@cs.elte.hu>
    # Date 1611156689 -3600
    #      Wed Jan 20 16:31:29 2021 +0100
    # Node ID 86a5b114a0662ff7857949add3f38c1053b2c02a
    # Parent  57abff252556e0ffd928de63314904bd531974c1
    Implement CplLp::write() for LP format (#640)
    
    diff --git a/lemon/clp.cc b/lemon/clp.cc
    a b  
    461461    }
    462462  }
    463463
     464   void ClpLp::_write(std::string file, std::string format) const
     465  {
     466    if(format == "LP")
     467      _prob->writeLp(file.c_str(), "", 1e-5, 10, 5,
     468                     sense()==ClpLp::MIN?1:-1,
     469                     true
     470                     );
     471    else throw UnsupportedFormatError(format);
     472  }
     473 
    464474} //END OF NAMESPACE LEMON
  • lemon/clp.h

    diff --git a/lemon/clp.h b/lemon/clp.h
    a b  
    139139
    140140    virtual void _messageLevel(MessageLevel);
    141141
     142    void _write(std::string file, std::string format) const;
     143
    142144  public:
    143145
    144146    ///Solves LP with primal simplex method.