Module: Cbc

Defined in:
lib/cbc.rb,
lib/cbc/ffi.rb,
lib/cbc/model.rb,
lib/cbc/version.rb

Defined Under Namespace

Modules: FFI Classes: Error, Model

Constant Summary collapse

VERSION =
"0.2.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.ffi_libObject

Returns the value of attribute ffi_lib.



12
13
14
# File 'lib/cbc.rb', line 12

def ffi_lib
  @ffi_lib
end

Class Method Details

.lib_versionObject



35
36
37
# File 'lib/cbc.rb', line 35

def self.lib_version
  FFI.Cbc_getVersion.to_s
end

.load_problem(**options) ⇒ Object



51
52
53
54
55
# File 'lib/cbc.rb', line 51

def self.load_problem(**options)
  model = Model.new
  model.load_problem(**options)
  model
end

.read_lp(filename) ⇒ Object



39
40
41
42
43
# File 'lib/cbc.rb', line 39

def self.read_lp(filename)
  model = Model.new
  model.read_lp(filename)
  model
end

.read_mps(filename) ⇒ Object



45
46
47
48
49
# File 'lib/cbc.rb', line 45

def self.read_mps(filename)
  model = Model.new
  model.read_mps(filename)
  model
end