shce  
                
                  
                    October 1, 2021,  2:37pm
                   
                  1 
               
             
            
              Hello,
I am trying to solve a linear problem using GLPK. I have already found a solution but I would like to know which method is being used by GLPK to solve the LP problem.
My call is:
model = Model(GLPK.Optimizer)
# Set variables and constraints
JuMP.optimize!(model)
Does JuMP tell GLPK to solve the problem using Simplex method by default? Does GLPK decide which method it will use?
Thanks in advance,
             
            
              1 Like 
            
            
           
          
            
              
                odow  
              
                  
                    October 2, 2021,  6:23am
                   
                  2 
               
             
            
            
              1 Like 
            
            
           
          
            
              
                shce  
              
                  
                    October 4, 2021,  8:01am
                   
                  3 
               
             
            
              Thank you very much! So if I would like to use another method, I would have to specify it manually, right?
             
            
              1 Like 
            
            
           
          
            
              
                shce  
              
                  
                    December 29, 2022, 11:00am
                   
                  7 
               
             
            
              Hello nico,
As far as I know, there are only three possible methods: GLPK.jl/MOI_wrapper.jl at dee196eabbc87da2a3bfcf210e3ebe17b302a178 · jump-dev/GLPK.jl · GitHub 
I haven’t used them myself but I guess you can specify them as:
model = GLPK.Optimizer(method = GLPK.XXX)
See the following function:
  
  
    
    
      
          
           
function test_infeasible_bounds() 
              model = GLPK.Optimizer() 
              x = MOI.add_variable(model) 
              MOI.add_constraint(model, x, MOI.Interval(1.0, -1.0)) 
              MOI.optimize!(model) 
              @test MOI.get(model, MOI.TerminationStatus()) == MOI.INVALID_MODEL 
              return 
          end 
          
           
function test_RawOptimizerAttribute() 
              model = GLPK.Optimizer(method = GLPK.SIMPLEX) 
              exception = ErrorException( 
                  "Invalid option: cb_func. Use the MOI attribute `GLPK.CallbackFunction` instead.", 
              ) 
              @test_throws exception MOI.set( 
                  model, 
                  MOI.RawOptimizerAttribute("cb_func"), 
                  (cb) -> nothing, 
              ) 
              MOI.set(model, MOI.RawOptimizerAttribute("tm_lim"), 100) 
       
     
  
    
    
  
  
 
Regards,
shce
             
            
              2 Likes