GLPK for C#/CLI  1.10.0
Static Public Member Functions | Static Public Attributes | List of all members
org.gnu.glpk.GLPK Class Reference
Collaboration diagram for org.gnu.glpk.GLPK:
Collaboration graph

Static Public Member Functions

static SWIGTYPE_p_double new_doubleArray (int nelements)
 Creates a new array of double. More...
 
static void delete_doubleArray (SWIGTYPE_p_double ary)
 Deletes an array of double. More...
 
static double doubleArray_getitem (SWIGTYPE_p_double ary, int index)
 Retrieves an element of an array of double. More...
 
static void doubleArray_setitem (SWIGTYPE_p_double ary, int index, double value)
 Sets the value of an element of an array of double. More...
 
static SWIGTYPE_p_int new_intArray (int nelements)
 Creates a new array of int. More...
 
static void delete_intArray (SWIGTYPE_p_int ary)
 Deletes an array of int. More...
 
static int intArray_getitem (SWIGTYPE_p_int ary, int index)
 Retrieves an element of an array of int. More...
 
static void intArray_setitem (SWIGTYPE_p_int ary, int index, int value)
 Sets the value of an element of an array of int. More...
 
static void glp_cli_error (string message)
 Abort GLPK library with error message. More...
 
static void glp_cli_set_msg_lvl (int msg_lvl)
 Sets the message level. More...
 
static void glp_cli_set_numeric_locale (string locale)
 
static glp_cli_arc_data glp_cli_arc_get_data (glp_arc arc)
 Get arc data. More...
 
static glp_cli_vertex_data glp_cli_vertex_data_get (glp_graph G, int i)
 Get vertex data. More...
 
static glp_cli_vertex_data glp_cli_vertex_get_data (glp_vertex v)
 Get vertex data. More...
 
static glp_vertex glp_cli_vertex_get (glp_graph G, int i)
 Get vertex. More...
 
static glp_prob glp_create_prob ()
 
static void glp_set_prob_name (glp_prob P, string name)
 glp_set_prob_name - assign (change) problem name . More...
 
static void glp_set_obj_name (glp_prob P, string name)
 glp_set_obj_name - assign (change) objective function name . More...
 
static void glp_set_obj_dir (glp_prob P, int dir)
 glp_set_obj_dir - set (change) optimization direction flag . More...
 
static int glp_add_rows (glp_prob P, int nrs)
 glp_add_rows - add new rows to problem object . More...
 
static int glp_add_cols (glp_prob P, int ncs)
 glp_add_cols - add new columns to problem object . More...
 
static void glp_set_row_name (glp_prob P, int i, string name)
 glp_set_row_name - assign (change) row name . More...
 
static void glp_set_col_name (glp_prob P, int j, string name)
 glp_set_col_name - assign (change) column name . More...
 
static void glp_set_row_bnds (glp_prob P, int i, int type, double lb, double ub)
 glp_set_row_bnds - set (change) row bounds . More...
 
static void glp_set_col_bnds (glp_prob P, int j, int type, double lb, double ub)
 glp_set_col_bnds - set (change) column bounds . More...
 
static void glp_set_obj_coef (glp_prob P, int j, double coef)
 glp_set_obj_coef - set (change) obj. More...
 
static void glp_set_mat_row (glp_prob P, int i, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_set_mat_row - set (replace) row of the constraint matrix . More...
 
static void glp_set_mat_col (glp_prob P, int j, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_set_mat_col - set (replace) column of the constraint matrix . More...
 
static void glp_load_matrix (glp_prob P, int ne, SWIGTYPE_p_int ia, SWIGTYPE_p_int ja, SWIGTYPE_p_double ar)
 glp_load_matrix - load (replace) the whole constraint matrix . More...
 
static int glp_check_dup (int m, int n, int ne, SWIGTYPE_p_int ia, SWIGTYPE_p_int ja)
 glp_check_dup - check for duplicate elements in sparse matrix . More...
 
static void glp_sort_matrix (glp_prob P)
 glp_sort_matrix - sort elements of the constraint matrix . More...
 
static void glp_del_rows (glp_prob P, int nrs, SWIGTYPE_p_int num)
 glp_del_rows - delete rows from problem object . More...
 
static void glp_del_cols (glp_prob P, int ncs, SWIGTYPE_p_int num)
 glp_del_cols - delete columns from problem object . More...
 
static void glp_copy_prob (glp_prob dest, glp_prob prob, int names)
 glp_copy_prob - copy problem object content . More...
 
static void glp_erase_prob (glp_prob P)
 
static void glp_delete_prob (glp_prob P)
 
static string glp_get_prob_name (glp_prob P)
 glp_get_prob_name - retrieve problem name . More...
 
static string glp_get_obj_name (glp_prob P)
 glp_get_obj_name - retrieve objective function name . More...
 
static int glp_get_obj_dir (glp_prob P)
 glp_get_obj_dir - retrieve optimization direction flag . More...
 
static int glp_get_num_rows (glp_prob P)
 glp_get_num_rows - retrieve number of rows . More...
 
static int glp_get_num_cols (glp_prob P)
 glp_get_num_cols - retrieve number of columns . More...
 
static string glp_get_row_name (glp_prob P, int i)
 glp_get_row_name - retrieve row name . More...
 
static string glp_get_col_name (glp_prob P, int j)
 glp_get_col_name - retrieve column name . More...
 
static int glp_get_row_type (glp_prob P, int i)
 glp_get_row_type - retrieve row type . More...
 
static double glp_get_row_lb (glp_prob P, int i)
 glp_get_row_lb - retrieve row lower bound . More...
 
static double glp_get_row_ub (glp_prob P, int i)
 glp_get_row_ub - retrieve row upper bound . More...
 
static int glp_get_col_type (glp_prob P, int j)
 glp_get_col_type - retrieve column type . More...
 
static double glp_get_col_lb (glp_prob P, int j)
 glp_get_col_lb - retrieve column lower bound . More...
 
static double glp_get_col_ub (glp_prob P, int j)
 glp_get_col_ub - retrieve column upper bound . More...
 
static double glp_get_obj_coef (glp_prob P, int j)
 glp_get_obj_coef - retrieve obj. More...
 
static int glp_get_num_nz (glp_prob P)
 glp_get_num_nz - retrieve number of constraint coefficients . More...
 
static int glp_get_mat_row (glp_prob P, int i, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_get_mat_row - retrieve row of the constraint matrix . More...
 
static int glp_get_mat_col (glp_prob P, int j, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_get_mat_col - retrieve column of the constraint matrix . More...
 
static void glp_create_index (glp_prob P)
 glp_create_index - create the name index . More...
 
static int glp_find_row (glp_prob P, string name)
 glp_find_row - find row by its name . More...
 
static int glp_find_col (glp_prob P, string name)
 glp_find_col - find column by its name . More...
 
static void glp_delete_index (glp_prob P)
 glp_delete_index - delete the name index . More...
 
static void glp_set_rii (glp_prob P, int i, double rii)
 glp_set_rii - set (change) row scale factor . More...
 
static void glp_set_sjj (glp_prob P, int j, double sjj)
 glp_set sjj - set (change) column scale factor . More...
 
static double glp_get_rii (glp_prob P, int i)
 glp_get_rii - retrieve row scale factor . More...
 
static double glp_get_sjj (glp_prob P, int j)
 glp_get_sjj - retrieve column scale factor . More...
 
static void glp_scale_prob (glp_prob P, int flags)
 glp_scale_prob - scale problem data . More...
 
static void glp_unscale_prob (glp_prob P)
 glp_unscale_prob - unscale problem data . More...
 
static void glp_set_row_stat (glp_prob P, int i, int stat)
 glp_set_row_stat - set (change) row status . More...
 
static void glp_set_col_stat (glp_prob P, int j, int stat)
 glp_set_col_stat - set (change) column status . More...
 
static void glp_std_basis (glp_prob P)
 glp_std_basis - construct standard initial LP basis . More...
 
static void glp_adv_basis (glp_prob P, int flags)
 
static void glp_cpx_basis (glp_prob P)
 glp_cpx_basis - construct Bixby's initial LP basis . More...
 
static int glp_simplex (glp_prob P, glp_smcp parm)
 
static int glp_exact (glp_prob P, glp_smcp parm)
 
static void glp_init_smcp (glp_smcp parm)
 glp_init_smcp - initialize simplex method control parameters . More...
 
static int glp_get_status (glp_prob P)
 glp_get_status - retrieve generic status of basic solution . More...
 
static int glp_get_prim_stat (glp_prob P)
 glp_get_prim_stat - retrieve status of primal basic solution . More...
 
static int glp_get_dual_stat (glp_prob P)
 glp_get_dual_stat - retrieve status of dual basic solution . More...
 
static double glp_get_obj_val (glp_prob P)
 glp_get_obj_val - retrieve objective value (basic solution) . More...
 
static int glp_get_row_stat (glp_prob P, int i)
 glp_get_row_stat - retrieve row status . More...
 
static double glp_get_row_prim (glp_prob P, int i)
 glp_get_row_prim - retrieve row primal value (basic solution) . More...
 
static double glp_get_row_dual (glp_prob P, int i)
 glp_get_row_dual - retrieve row dual value (basic solution) . More...
 
static int glp_get_col_stat (glp_prob P, int j)
 glp_get_col_stat - retrieve column status . More...
 
static double glp_get_col_prim (glp_prob P, int j)
 glp_get_col_prim - retrieve column primal value (basic solution) . More...
 
static double glp_get_col_dual (glp_prob P, int j)
 glp_get_col_dual - retrieve column dual value (basic solution) . More...
 
static int glp_get_unbnd_ray (glp_prob P)
 glp_get_unbnd_ray - determine variable causing unboundedness . More...
 
static int glp_get_it_cnt (glp_prob P)
 
static void glp_set_it_cnt (glp_prob P, int it_cnt)
 
static int glp_interior (glp_prob P, glp_iptcp parm)
 
static void glp_init_iptcp (glp_iptcp parm)
 glp_init_iptcp - initialize interior-point solver control parameters . More...
 
static int glp_ipt_status (glp_prob P)
 glp_ipt_status - retrieve status of interior-point solution . More...
 
static double glp_ipt_obj_val (glp_prob P)
 glp_ipt_obj_val - retrieve objective value (interior point) . More...
 
static double glp_ipt_row_prim (glp_prob P, int i)
 glp_ipt_row_prim - retrieve row primal value (interior point) . More...
 
static double glp_ipt_row_dual (glp_prob P, int i)
 glp_ipt_row_dual - retrieve row dual value (interior point) . More...
 
static double glp_ipt_col_prim (glp_prob P, int j)
 glp_ipt_col_prim - retrieve column primal value (interior point) . More...
 
static double glp_ipt_col_dual (glp_prob P, int j)
 glp_ipt_col_dual - retrieve column dual value (interior point) . More...
 
static void glp_set_col_kind (glp_prob P, int j, int kind)
 glp_set_col_kind - set (change) column kind . More...
 
static int glp_get_col_kind (glp_prob P, int j)
 glp_get_col_kind - retrieve column kind . More...
 
static int glp_get_num_int (glp_prob P)
 glp_get_num_int - retrieve number of integer columns . More...
 
static int glp_get_num_bin (glp_prob P)
 glp_get_num_bin - retrieve number of binary columns . More...
 
static int glp_intopt (glp_prob P, glp_iocp parm)
 
static void glp_init_iocp (glp_iocp parm)
 glp_init_iocp - initialize integer optimizer control parameters . More...
 
static int glp_mip_status (glp_prob P)
 glp_mip_status - retrieve status of MIP solution . More...
 
static double glp_mip_obj_val (glp_prob P)
 glp_mip_obj_val - retrieve objective value (MIP solution) . More...
 
static double glp_mip_row_val (glp_prob P, int i)
 glp_mip_row_val - retrieve row value (MIP solution) . More...
 
static double glp_mip_col_val (glp_prob P, int j)
 glp_mip_col_val - retrieve column value (MIP solution) . More...
 
static void glp_check_kkt (glp_prob P, int sol, int cond, SWIGTYPE_p_double ae_max, SWIGTYPE_p_int ae_ind, SWIGTYPE_p_double re_max, SWIGTYPE_p_int re_ind)
 
static int glp_print_sol (glp_prob P, string fname)
 
static int glp_read_sol (glp_prob P, string fname)
 glp_read_sol - read basic solution from text file . More...
 
static int glp_write_sol (glp_prob P, string fname)
 glp_write_sol - write basic solution to text file . More...
 
static int glp_print_ranges (glp_prob P, int len, SWIGTYPE_p_int list, int flags, string fname)
 
static int glp_print_ipt (glp_prob P, string fname)
 
static int glp_read_ipt (glp_prob P, string fname)
 glp_read_ipt - read interior-point solution from text file . More...
 
static int glp_write_ipt (glp_prob P, string fname)
 glp_write_ipt - write interior-point solution to text file . More...
 
static int glp_print_mip (glp_prob P, string fname)
 
static int glp_read_mip (glp_prob P, string fname)
 glp_read_mip - read MIP solution from text file . More...
 
static int glp_write_mip (glp_prob P, string fname)
 glp_write_mip - write MIP solution to text file . More...
 
static int glp_bf_exists (glp_prob P)
 glp_bf_exists - check if the basis factorization exists . More...
 
static int glp_factorize (glp_prob P)
 
static int glp_bf_updated (glp_prob P)
 glp_bf_updated - check if the basis factorization has been updated . More...
 
static void glp_get_bfcp (glp_prob P, glp_bfcp parm)
 glp_get_bfcp - retrieve basis factorization control parameters . More...
 
static void glp_set_bfcp (glp_prob P, glp_bfcp parm)
 glp_set_bfcp - change basis factorization control parameters . More...
 
static int glp_get_bhead (glp_prob P, int k)
 glp_get_bhead - retrieve the basis header information . More...
 
static int glp_get_row_bind (glp_prob P, int i)
 glp_get_row_bind - retrieve row index in the basis header . More...
 
static int glp_get_col_bind (glp_prob P, int j)
 glp_get_col_bind - retrieve column index in the basis header . More...
 
static void glp_ftran (glp_prob P, SWIGTYPE_p_double x)
 glp_ftran - perform forward transformation (solve system B*x = b) . More...
 
static void glp_btran (glp_prob P, SWIGTYPE_p_double x)
 glp_btran - perform backward transformation (solve system B'*x = b) . More...
 
static int glp_warm_up (glp_prob P)
 glp_warm_up - "warm up" LP basis . More...
 
static int glp_eval_tab_row (glp_prob P, int k, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_eval_tab_row - compute row of the simplex tableau . More...
 
static int glp_eval_tab_col (glp_prob P, int k, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_eval_tab_col - compute column of the simplex tableau . More...
 
static int glp_transform_row (glp_prob P, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_transform_row - transform explicitly specified row . More...
 
static int glp_transform_col (glp_prob P, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val)
 glp_transform_col - transform explicitly specified column . More...
 
static int glp_prim_rtest (glp_prob P, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val, int dir, double eps)
 glp_prim_rtest - perform primal ratio test . More...
 
static int glp_dual_rtest (glp_prob P, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val, int dir, double eps)
 glp_dual_rtest - perform dual ratio test . More...
 
static void glp_analyze_bound (glp_prob P, int k, SWIGTYPE_p_double value1, SWIGTYPE_p_int var1, SWIGTYPE_p_double value2, SWIGTYPE_p_int var2)
 glp_analyze_bound - analyze active bound of non-basic variable . More...
 
static void glp_analyze_coef (glp_prob P, int k, SWIGTYPE_p_double coef1, SWIGTYPE_p_int var1, SWIGTYPE_p_double value1, SWIGTYPE_p_double coef2, SWIGTYPE_p_int var2, SWIGTYPE_p_double value2)
 glp_analyze_coef - analyze objective coefficient at basic variable . More...
 
static SWIGTYPE_p_glp_prep glp_npp_alloc_wksp ()
 
static void glp_npp_load_prob (SWIGTYPE_p_glp_prep prep, glp_prob P, int sol, int names)
 
static int glp_npp_preprocess1 (SWIGTYPE_p_glp_prep prep, int hard)
 
static void glp_npp_build_prob (SWIGTYPE_p_glp_prep prep, glp_prob Q)
 
static void glp_npp_postprocess (SWIGTYPE_p_glp_prep prep, glp_prob Q)
 
static void glp_npp_obtain_sol (SWIGTYPE_p_glp_prep prep, glp_prob P)
 
static void glp_npp_free_wksp (SWIGTYPE_p_glp_prep prep)
 
static int glp_ios_reason (glp_tree T)
 glp_ios_reason - determine reason for calling the callback routine . More...
 
static glp_prob glp_ios_get_prob (glp_tree T)
 glp_ios_get_prob - access the problem object . More...
 
static void glp_ios_tree_size (glp_tree T, SWIGTYPE_p_int a_cnt, SWIGTYPE_p_int n_cnt, SWIGTYPE_p_int t_cnt)
 glp_ios_tree_size - determine size of the branch-and-bound tree . More...
 
static int glp_ios_curr_node (glp_tree T)
 glp_ios_curr_node - determine current active subproblem . More...
 
static int glp_ios_next_node (glp_tree T, int p)
 glp_ios_next_node - determine next active subproblem . More...
 
static int glp_ios_prev_node (glp_tree T, int p)
 glp_ios_prev_node - determine previous active subproblem . More...
 
static int glp_ios_up_node (glp_tree T, int p)
 glp_ios_up_node - determine parent subproblem . More...
 
static int glp_ios_node_level (glp_tree T, int p)
 glp_ios_node_level - determine subproblem level . More...
 
static double glp_ios_node_bound (glp_tree T, int p)
 glp_ios_node_bound - determine subproblem local bound . More...
 
static int glp_ios_best_node (glp_tree T)
 glp_ios_best_node - find active subproblem with best local bound . More...
 
static double glp_ios_mip_gap (glp_tree T)
 glp_ios_mip_gap - compute relative MIP gap . More...
 
static SWIGTYPE_p_void glp_ios_node_data (glp_tree T, int p)
 glp_ios_node_data - access subproblem application-specific data . More...
 
static void glp_ios_row_attr (glp_tree T, int i, glp_attr attr)
 glp_ios_row_attr - retrieve additional row attributes . More...
 
static int glp_ios_pool_size (glp_tree T)
 
static int glp_ios_add_row (glp_tree T, string name, int klass, int flags, int len, SWIGTYPE_p_int ind, SWIGTYPE_p_double val, int type, double rhs)
 
static void glp_ios_del_row (glp_tree T, int i)
 
static void glp_ios_clear_pool (glp_tree T)
 
static int glp_ios_can_branch (glp_tree T, int j)
 glp_ios_can_branch - check if can branch upon specified variable . More...
 
static void glp_ios_branch_upon (glp_tree T, int j, int sel)
 glp_ios_branch_upon - choose variable to branch upon . More...
 
static void glp_ios_select_node (glp_tree T, int p)
 glp_ios_select_node - select subproblem to continue the search . More...
 
static int glp_ios_heur_sol (glp_tree T, SWIGTYPE_p_double x)
 glp_ios_heur_sol - provide solution found by heuristic . More...
 
static void glp_ios_terminate (glp_tree T)
 glp_ios_terminate - terminate the solution process. More...
 
static void glp_init_mpscp (glp_mpscp parm)
 glp_init_mpscp - initialize MPS format control parameters . More...
 
static int glp_read_mps (glp_prob P, int fmt, glp_mpscp parm, string fname)
 
static int glp_write_mps (glp_prob P, int fmt, glp_mpscp parm, string fname)
 
static void glp_init_cpxcp (glp_cpxcp parm)
 glp_init_cpxcp - initialize CPLEX LP format control parameters . More...
 
static int glp_read_lp (glp_prob P, glp_cpxcp parm, string fname)
 
static int glp_write_lp (glp_prob P, glp_cpxcp parm, string fname)
 
static int glp_read_prob (glp_prob P, int flags, string fname)
 glp_read_prob - read problem data in GLPK format . More...
 
static int glp_write_prob (glp_prob P, int flags, string fname)
 glp_write_prob - write problem data in GLPK format . More...
 
static glp_tran glp_mpl_alloc_wksp ()
 
static void glp_mpl_init_rand (glp_tran tran, int seed)
 
static int glp_mpl_read_model (glp_tran tran, string fname, int skip)
 
static int glp_mpl_read_data (glp_tran tran, string fname)
 
static int glp_mpl_generate (glp_tran tran, string fname)
 
static void glp_mpl_build_prob (glp_tran tran, glp_prob prob)
 
static int glp_mpl_postsolve (glp_tran tran, glp_prob prob, int sol)
 
static void glp_mpl_free_wksp (glp_tran tran)
 
static int glp_read_cnfsat (glp_prob P, string fname)
 
static int glp_check_cnfsat (glp_prob P)
 
static int glp_write_cnfsat (glp_prob P, string fname)
 
static int glp_minisat1 (glp_prob P)
 
static int glp_intfeas1 (glp_prob P, int use_bound, int obj_bound)
 
static int glp_init_env ()
 glp_init_env - initialize GLPK environment . More...
 
static string glp_version ()
 glp_version - determine library version . More...
 
static string glp_config (string option)
 
static int glp_free_env ()
 glp_free_env - free GLPK environment . More...
 
static void glp_puts (string s)
 glp_puts - write string on terminal . More...
 
static void glp_printf (string fmt)
 glp_printf - write formatted output on terminal . More...
 
static void glp_vprintf (string fmt, SWIGTYPE_p_va_list arg)
 glp_vprintf - write formatted output on terminal . More...
 
static int glp_term_out (int flag)
 glp_term_out - enable/disable terminal output . More...
 
static void glp_term_hook (SWIGTYPE_p_f_p_void_p_q_const__char__int func, SWIGTYPE_p_void info)
 glp_term_hook - install hook to intercept terminal output . More...
 
static int glp_open_tee (string name)
 glp_open_tee - start copying terminal output to text file . More...
 
static int glp_close_tee ()
 glp_close_tee - stop copying terminal output to text file . More...
 
static SWIGTYPE_p_f_p_q_const__char_v_______void glp_error_ (string file, int line)
 
static int glp_at_error ()
 glp_at_error - check for error state . More...
 
static void glp_assert_ (string expr, string file, int line)
 glp_assert - check for logical condition . More...
 
static void glp_error_hook (SWIGTYPE_p_f_p_void__void func, SWIGTYPE_p_void info)
 glp_error_hook - install hook to intercept abnormal termination . More...
 
static SWIGTYPE_p_void glp_alloc (int n, int size)
 glp_alloc - allocate memory block . More...
 
static SWIGTYPE_p_void glp_realloc (SWIGTYPE_p_void ptr, int n, int size)
 
static void glp_free (SWIGTYPE_p_void ptr)
 glp_free - free (deallocate) memory block . More...
 
static void glp_mem_limit (int limit)
 glp_mem_limit - set memory usage limit . More...
 
static void glp_mem_usage (SWIGTYPE_p_int count, SWIGTYPE_p_int cpeak, SWIGTYPE_p_size_t total, SWIGTYPE_p_size_t tpeak)
 glp_mem_usage - get memory usage information . More...
 
static double glp_time ()
 
static double glp_difftime (double t1, double t0)
 glp_difftime - compute difference between two time values . More...
 
static glp_graph glp_create_graph (int v_size, int a_size)
 
static void glp_set_graph_name (glp_graph G, string name)
 glp_set_graph_name - assign (change) graph name . More...
 
static int glp_add_vertices (glp_graph G, int nadd)
 glp_add_vertices - add new vertices to graph . More...
 
static void glp_set_vertex_name (glp_graph G, int i, string name)
 
static glp_arc glp_add_arc (glp_graph G, int i, int j)
 glp_add_arc - add new arc to graph . More...
 
static void glp_del_vertices (glp_graph G, int ndel, SWIGTYPE_p_int num)
 glp_del_vertices - delete vertices from graph . More...
 
static void glp_del_arc (glp_graph G, glp_arc a)
 glp_del_arc - delete arc from graph . More...
 
static void glp_erase_graph (glp_graph G, int v_size, int a_size)
 
static void glp_delete_graph (glp_graph G)
 glp_delete_graph - delete graph . More...
 
static void glp_create_v_index (glp_graph G)
 
static int glp_find_vertex (glp_graph G, string name)
 
static void glp_delete_v_index (glp_graph G)
 
static int glp_read_graph (glp_graph G, string fname)
 glp_read_graph - read graph from plain text file . More...
 
static int glp_write_graph (glp_graph G, string fname)
 glp_write_graph - write graph to plain text file . More...
 
static void glp_mincost_lp (glp_prob P, glp_graph G, int names, int v_rhs, int a_low, int a_cap, int a_cost)
 glp_mincost_lp - convert minimum cost flow problem to LP . More...
 
static int glp_mincost_okalg (glp_graph G, int v_rhs, int a_low, int a_cap, int a_cost, SWIGTYPE_p_double sol, int a_x, int v_pi)
 
static int glp_mincost_relax4 (glp_graph G, int v_rhs, int a_low, int a_cap, int a_cost, int crash, SWIGTYPE_p_double sol, int a_x, int a_rc)
 
static void glp_maxflow_lp (glp_prob P, glp_graph G, int names, int s, int t, int a_cap)
 glp_maxflow_lp - convert maximum flow problem to LP . More...
 
static int glp_maxflow_ffalg (glp_graph G, int s, int t, int a_cap, SWIGTYPE_p_double sol, int a_x, int v_cut)
 
static int glp_check_asnprob (glp_graph G, int v_set)
 glp_check_asnprob - check correctness of assignment problem data . More...
 
static int glp_asnprob_lp (glp_prob P, int form, glp_graph G, int names, int v_set, int a_cost)
 glp_asnprob_lp - convert assignment problem to LP . More...
 
static int glp_asnprob_okalg (int form, glp_graph G, int v_set, int a_cost, SWIGTYPE_p_double sol, int a_x)
 
static int glp_asnprob_hall (glp_graph G, int v_set, int a_x)
 glp_asnprob_hall - find bipartite matching of maximum cardinality . More...
 
static double glp_cpp (glp_graph G, int v_t, int v_es, int v_ls)
 
static int glp_read_mincost (glp_graph G, int v_rhs, int a_low, int a_cap, int a_cost, string fname)
 glp_read_mincost - read min-cost flow problem data in DIMACS format . More...
 
static int glp_write_mincost (glp_graph G, int v_rhs, int a_low, int a_cap, int a_cost, string fname)
 glp_write_mincost - write min-cost flow problem data in DIMACS format . More...
 
static int glp_read_maxflow (glp_graph G, SWIGTYPE_p_int s, SWIGTYPE_p_int t, int a_cap, string fname)
 glp_read_maxflow - read maximum flow problem data in DIMACS format . More...
 
static int glp_write_maxflow (glp_graph G, int s, int t, int a_cap, string fname)
 glp_write_maxflow - write maximum flow problem data in DIMACS format . More...
 
static int glp_read_asnprob (glp_graph G, int v_set, int a_cost, string fname)
 glp_read_asnprob - read assignment problem data in DIMACS format . More...
 
static int glp_write_asnprob (glp_graph G, int v_set, int a_cost, string fname)
 glp_write_asnprob - write assignment problem data in DIMACS format . More...
 
static int glp_read_ccdata (glp_graph G, int v_wgt, string fname)
 glp_read_ccdata - read graph in DIMACS clique/coloring format . More...
 
static int glp_write_ccdata (glp_graph G, int v_wgt, string fname)
 glp_write_ccdata - write graph in DIMACS clique/coloring format . More...
 
static int glp_netgen (glp_graph G, int v_rhs, int a_cap, int a_cost, SWIGTYPE_p_int parm)
 
static void glp_netgen_prob (int nprob, SWIGTYPE_p_int parm)
 
static int glp_gridgen (glp_graph G, int v_rhs, int a_cap, int a_cost, SWIGTYPE_p_int parm)
 
static int glp_rmfgen (glp_graph G, SWIGTYPE_p_int s, SWIGTYPE_p_int t, int a_cap, SWIGTYPE_p_int parm)
 
static int glp_weak_comp (glp_graph G, int v_num)
 glp_weak_comp - find all weakly connected components of graph . More...
 
static int glp_strong_comp (glp_graph G, int v_num)
 glp_strong_comp - find all strongly connected components of graph . More...
 
static int glp_top_sort (glp_graph G, int v_num)
 
static int glp_wclique_exact (glp_graph G, int v_wgt, SWIGTYPE_p_double sol, int v_set)
 

Static Public Attributes

static readonly int GLP_CLI_A_CAP = GLPKPINVOKE.GLP_CLI_A_CAP_get()
 
static readonly int GLP_CLI_A_COST = GLPKPINVOKE.GLP_CLI_A_COST_get()
 
static readonly int GLP_CLI_A_LOW = GLPKPINVOKE.GLP_CLI_A_LOW_get()
 
static readonly int GLP_CLI_A_RC = GLPKPINVOKE.GLP_CLI_A_RC_get()
 
static readonly int GLP_CLI_A_X = GLPKPINVOKE.GLP_CLI_A_X_get()
 
static readonly int GLP_CLI_A_SIZE = GLPKPINVOKE.GLP_CLI_A_SIZE_get()
 
static readonly int GLP_CLI_V_CUT = GLPKPINVOKE.GLP_CLI_V_CUT_get()
 
static readonly int GLP_CLI_V_PI = GLPKPINVOKE.GLP_CLI_V_PI_get()
 
static readonly int GLP_CLI_V_RHS = GLPKPINVOKE.GLP_CLI_V_RHS_get()
 
static readonly int GLP_CLI_V_SET = GLPKPINVOKE.GLP_CLI_V_SET_get()
 
static readonly int GLP_CLI_V_SIZE = GLPKPINVOKE.GLP_CLI_V_SIZE_get()
 
static readonly int GLP_CLI_MSG_LVL_OFF = GLPKPINVOKE.GLP_CLI_MSG_LVL_OFF_get()
 
static readonly int GLP_CLI_MSG_LVL_ALL = GLPKPINVOKE.GLP_CLI_MSG_LVL_ALL_get()
 
static readonly int GLP_MAJOR_VERSION = GLPKPINVOKE.GLP_MAJOR_VERSION_get()
 
static readonly int GLP_MINOR_VERSION = GLPKPINVOKE.GLP_MINOR_VERSION_get()
 
static readonly int GLP_MIN = GLPKPINVOKE.GLP_MIN_get()
 
static readonly int GLP_MAX = GLPKPINVOKE.GLP_MAX_get()
 
static readonly int GLP_CV = GLPKPINVOKE.GLP_CV_get()
 
static readonly int GLP_IV = GLPKPINVOKE.GLP_IV_get()
 
static readonly int GLP_BV = GLPKPINVOKE.GLP_BV_get()
 
static readonly int GLP_FR = GLPKPINVOKE.GLP_FR_get()
 
static readonly int GLP_LO = GLPKPINVOKE.GLP_LO_get()
 
static readonly int GLP_UP = GLPKPINVOKE.GLP_UP_get()
 
static readonly int GLP_DB = GLPKPINVOKE.GLP_DB_get()
 
static readonly int GLP_FX = GLPKPINVOKE.GLP_FX_get()
 
static readonly int GLP_BS = GLPKPINVOKE.GLP_BS_get()
 
static readonly int GLP_NL = GLPKPINVOKE.GLP_NL_get()
 
static readonly int GLP_NU = GLPKPINVOKE.GLP_NU_get()
 
static readonly int GLP_NF = GLPKPINVOKE.GLP_NF_get()
 
static readonly int GLP_NS = GLPKPINVOKE.GLP_NS_get()
 
static readonly int GLP_SF_GM = GLPKPINVOKE.GLP_SF_GM_get()
 
static readonly int GLP_SF_EQ = GLPKPINVOKE.GLP_SF_EQ_get()
 
static readonly int GLP_SF_2N = GLPKPINVOKE.GLP_SF_2N_get()
 
static readonly int GLP_SF_SKIP = GLPKPINVOKE.GLP_SF_SKIP_get()
 
static readonly int GLP_SF_AUTO = GLPKPINVOKE.GLP_SF_AUTO_get()
 
static readonly int GLP_SOL = GLPKPINVOKE.GLP_SOL_get()
 
static readonly int GLP_IPT = GLPKPINVOKE.GLP_IPT_get()
 
static readonly int GLP_MIP = GLPKPINVOKE.GLP_MIP_get()
 
static readonly int GLP_UNDEF = GLPKPINVOKE.GLP_UNDEF_get()
 
static readonly int GLP_FEAS = GLPKPINVOKE.GLP_FEAS_get()
 
static readonly int GLP_INFEAS = GLPKPINVOKE.GLP_INFEAS_get()
 
static readonly int GLP_NOFEAS = GLPKPINVOKE.GLP_NOFEAS_get()
 
static readonly int GLP_OPT = GLPKPINVOKE.GLP_OPT_get()
 
static readonly int GLP_UNBND = GLPKPINVOKE.GLP_UNBND_get()
 
static readonly int GLP_BF_LUF = GLPKPINVOKE.GLP_BF_LUF_get()
 
static readonly int GLP_BF_BTF = GLPKPINVOKE.GLP_BF_BTF_get()
 
static readonly int GLP_BF_FT = GLPKPINVOKE.GLP_BF_FT_get()
 
static readonly int GLP_BF_BG = GLPKPINVOKE.GLP_BF_BG_get()
 
static readonly int GLP_BF_GR = GLPKPINVOKE.GLP_BF_GR_get()
 
static readonly int GLP_MSG_OFF = GLPKPINVOKE.GLP_MSG_OFF_get()
 
static readonly int GLP_MSG_ERR = GLPKPINVOKE.GLP_MSG_ERR_get()
 
static readonly int GLP_MSG_ON = GLPKPINVOKE.GLP_MSG_ON_get()
 
static readonly int GLP_MSG_ALL = GLPKPINVOKE.GLP_MSG_ALL_get()
 
static readonly int GLP_MSG_DBG = GLPKPINVOKE.GLP_MSG_DBG_get()
 
static readonly int GLP_PRIMAL = GLPKPINVOKE.GLP_PRIMAL_get()
 
static readonly int GLP_DUALP = GLPKPINVOKE.GLP_DUALP_get()
 
static readonly int GLP_DUAL = GLPKPINVOKE.GLP_DUAL_get()
 
static readonly int GLP_PT_STD = GLPKPINVOKE.GLP_PT_STD_get()
 
static readonly int GLP_PT_PSE = GLPKPINVOKE.GLP_PT_PSE_get()
 
static readonly int GLP_RT_STD = GLPKPINVOKE.GLP_RT_STD_get()
 
static readonly int GLP_RT_HAR = GLPKPINVOKE.GLP_RT_HAR_get()
 
static readonly int GLP_RT_FLIP = GLPKPINVOKE.GLP_RT_FLIP_get()
 
static readonly int GLP_USE_AT = GLPKPINVOKE.GLP_USE_AT_get()
 
static readonly int GLP_USE_NT = GLPKPINVOKE.GLP_USE_NT_get()
 
static readonly int GLP_ORD_NONE = GLPKPINVOKE.GLP_ORD_NONE_get()
 
static readonly int GLP_ORD_QMD = GLPKPINVOKE.GLP_ORD_QMD_get()
 
static readonly int GLP_ORD_AMD = GLPKPINVOKE.GLP_ORD_AMD_get()
 
static readonly int GLP_ORD_SYMAMD = GLPKPINVOKE.GLP_ORD_SYMAMD_get()
 
static readonly int GLP_BR_FFV = GLPKPINVOKE.GLP_BR_FFV_get()
 
static readonly int GLP_BR_LFV = GLPKPINVOKE.GLP_BR_LFV_get()
 
static readonly int GLP_BR_MFV = GLPKPINVOKE.GLP_BR_MFV_get()
 
static readonly int GLP_BR_DTH = GLPKPINVOKE.GLP_BR_DTH_get()
 
static readonly int GLP_BR_PCH = GLPKPINVOKE.GLP_BR_PCH_get()
 
static readonly int GLP_BT_DFS = GLPKPINVOKE.GLP_BT_DFS_get()
 
static readonly int GLP_BT_BFS = GLPKPINVOKE.GLP_BT_BFS_get()
 
static readonly int GLP_BT_BLB = GLPKPINVOKE.GLP_BT_BLB_get()
 
static readonly int GLP_BT_BPH = GLPKPINVOKE.GLP_BT_BPH_get()
 
static readonly int GLP_PP_NONE = GLPKPINVOKE.GLP_PP_NONE_get()
 
static readonly int GLP_PP_ROOT = GLPKPINVOKE.GLP_PP_ROOT_get()
 
static readonly int GLP_PP_ALL = GLPKPINVOKE.GLP_PP_ALL_get()
 
static readonly int GLP_RF_REG = GLPKPINVOKE.GLP_RF_REG_get()
 
static readonly int GLP_RF_LAZY = GLPKPINVOKE.GLP_RF_LAZY_get()
 
static readonly int GLP_RF_CUT = GLPKPINVOKE.GLP_RF_CUT_get()
 
static readonly int GLP_RF_GMI = GLPKPINVOKE.GLP_RF_GMI_get()
 
static readonly int GLP_RF_MIR = GLPKPINVOKE.GLP_RF_MIR_get()
 
static readonly int GLP_RF_COV = GLPKPINVOKE.GLP_RF_COV_get()
 
static readonly int GLP_RF_CLQ = GLPKPINVOKE.GLP_RF_CLQ_get()
 
static readonly int GLP_ON = GLPKPINVOKE.GLP_ON_get()
 
static readonly int GLP_OFF = GLPKPINVOKE.GLP_OFF_get()
 
static readonly int GLP_IROWGEN = GLPKPINVOKE.GLP_IROWGEN_get()
 
static readonly int GLP_IBINGO = GLPKPINVOKE.GLP_IBINGO_get()
 
static readonly int GLP_IHEUR = GLPKPINVOKE.GLP_IHEUR_get()
 
static readonly int GLP_ICUTGEN = GLPKPINVOKE.GLP_ICUTGEN_get()
 
static readonly int GLP_IBRANCH = GLPKPINVOKE.GLP_IBRANCH_get()
 
static readonly int GLP_ISELECT = GLPKPINVOKE.GLP_ISELECT_get()
 
static readonly int GLP_IPREPRO = GLPKPINVOKE.GLP_IPREPRO_get()
 
static readonly int GLP_NO_BRNCH = GLPKPINVOKE.GLP_NO_BRNCH_get()
 
static readonly int GLP_DN_BRNCH = GLPKPINVOKE.GLP_DN_BRNCH_get()
 
static readonly int GLP_UP_BRNCH = GLPKPINVOKE.GLP_UP_BRNCH_get()
 
static readonly int GLP_EBADB = GLPKPINVOKE.GLP_EBADB_get()
 
static readonly int GLP_ESING = GLPKPINVOKE.GLP_ESING_get()
 
static readonly int GLP_ECOND = GLPKPINVOKE.GLP_ECOND_get()
 
static readonly int GLP_EBOUND = GLPKPINVOKE.GLP_EBOUND_get()
 
static readonly int GLP_EFAIL = GLPKPINVOKE.GLP_EFAIL_get()
 
static readonly int GLP_EOBJLL = GLPKPINVOKE.GLP_EOBJLL_get()
 
static readonly int GLP_EOBJUL = GLPKPINVOKE.GLP_EOBJUL_get()
 
static readonly int GLP_EITLIM = GLPKPINVOKE.GLP_EITLIM_get()
 
static readonly int GLP_ETMLIM = GLPKPINVOKE.GLP_ETMLIM_get()
 
static readonly int GLP_ENOPFS = GLPKPINVOKE.GLP_ENOPFS_get()
 
static readonly int GLP_ENODFS = GLPKPINVOKE.GLP_ENODFS_get()
 
static readonly int GLP_EROOT = GLPKPINVOKE.GLP_EROOT_get()
 
static readonly int GLP_ESTOP = GLPKPINVOKE.GLP_ESTOP_get()
 
static readonly int GLP_EMIPGAP = GLPKPINVOKE.GLP_EMIPGAP_get()
 
static readonly int GLP_ENOFEAS = GLPKPINVOKE.GLP_ENOFEAS_get()
 
static readonly int GLP_ENOCVG = GLPKPINVOKE.GLP_ENOCVG_get()
 
static readonly int GLP_EINSTAB = GLPKPINVOKE.GLP_EINSTAB_get()
 
static readonly int GLP_EDATA = GLPKPINVOKE.GLP_EDATA_get()
 
static readonly int GLP_ERANGE = GLPKPINVOKE.GLP_ERANGE_get()
 
static readonly int GLP_KKT_PE = GLPKPINVOKE.GLP_KKT_PE_get()
 
static readonly int GLP_KKT_PB = GLPKPINVOKE.GLP_KKT_PB_get()
 
static readonly int GLP_KKT_DE = GLPKPINVOKE.GLP_KKT_DE_get()
 
static readonly int GLP_KKT_DB = GLPKPINVOKE.GLP_KKT_DB_get()
 
static readonly int GLP_KKT_CS = GLPKPINVOKE.GLP_KKT_CS_get()
 
static readonly int GLP_MPS_DECK = GLPKPINVOKE.GLP_MPS_DECK_get()
 
static readonly int GLP_MPS_FILE = GLPKPINVOKE.GLP_MPS_FILE_get()
 
static readonly int GLP_ASN_MIN = GLPKPINVOKE.GLP_ASN_MIN_get()
 
static readonly int GLP_ASN_MAX = GLPKPINVOKE.GLP_ASN_MAX_get()
 
static readonly int GLP_ASN_MMP = GLPKPINVOKE.GLP_ASN_MMP_get()
 

Detailed Description

Definition at line 13 of file GLPK.cs.

Member Function Documentation

◆ delete_doubleArray()

static void org.gnu.glpk.GLPK.delete_doubleArray ( SWIGTYPE_p_double  ary)
inlinestatic

Deletes an array of double.

The memory is deallocated with free().

Parameters
aryarray

Definition at line 40 of file GLPK.cs.

◆ delete_intArray()

static void org.gnu.glpk.GLPK.delete_intArray ( SWIGTYPE_p_int  ary)
inlinestatic

Deletes an array of int.

The memory is deallocated with free().

Parameters
aryarray

Definition at line 100 of file GLPK.cs.

◆ doubleArray_getitem()

static double org.gnu.glpk.GLPK.doubleArray_getitem ( SWIGTYPE_p_double  ary,
int  index 
)
inlinestatic

Retrieves an element of an array of double.

BEWARE: The validity of the index is not checked.

Parameters
aryarray
indexindex of the element
Returns
array element

Definition at line 54 of file GLPK.cs.

◆ doubleArray_setitem()

static void org.gnu.glpk.GLPK.doubleArray_setitem ( SWIGTYPE_p_double  ary,
int  index,
double  value 
)
inlinestatic

Sets the value of an element of an array of double.

BEWARE: The validity of the index is not checked.

Parameters
aryarray
indexindex of the element
valuenew value

Definition at line 69 of file GLPK.cs.

◆ glp_add_arc()

static glp_arc org.gnu.glpk.GLPK.glp_add_arc ( glp_graph  G,
int  i,
int  j 
)
inlinestatic

glp_add_arc - add new arc to graph .

SYNOPSIS

glp_arc *glp_add_arc(glp_graph *G, int i, int j);

DESCRIPTION

The routine glp_add_arc adds a new arc to the specified graph.

The parameters i and j specify the ordinal numbers of, resp., tail and head vertices of the arc. Note that self-loops and multiple arcs are allowed.

RETURNS

The routine glp_add_arc returns a pointer to the arc added.

Definition at line 2919 of file GLPK.cs.

◆ glp_add_cols()

static int org.gnu.glpk.GLPK.glp_add_cols ( glp_prob  P,
int  ncs 
)
inlinestatic

glp_add_cols - add new columns to problem object .

SYNOPSIS

int glp_add_cols(glp_prob *lp, int ncs);

DESCRIPTION

The routine glp_add_cols adds ncs columns (structural variables) to the specified problem object. New columns are always added to the end of the column list, so the ordinal numbers of existing columns remain unchanged.

Being added each new column is initially fixed at zero and has empty list of the constraint coefficients.

RETURNS

The routine glp_add_cols returns the ordinal number of the first new column added to the problem object.

Definition at line 303 of file GLPK.cs.

◆ glp_add_rows()

static int org.gnu.glpk.GLPK.glp_add_rows ( glp_prob  P,
int  nrs 
)
inlinestatic

glp_add_rows - add new rows to problem object .

SYNOPSIS

int glp_add_rows(glp_prob *lp, int nrs);

DESCRIPTION

The routine glp_add_rows adds nrs rows (constraints) to the specified problem object. New rows are always added to the end of the row list, so the ordinal numbers of existing rows remain unchanged.

Being added each new row is initially free (unbounded) and has empty list of the constraint coefficients.

RETURNS

The routine glp_add_rows returns the ordinal number of the first new row added to the problem object.

Definition at line 286 of file GLPK.cs.

◆ glp_add_vertices()

static int org.gnu.glpk.GLPK.glp_add_vertices ( glp_graph  G,
int  nadd 
)
inlinestatic

glp_add_vertices - add new vertices to graph .

SYNOPSIS

int glp_add_vertices(glp_graph *G, int nadd);

DESCRIPTION

The routine glp_add_vertices adds nadd vertices to the specified graph. New vertices are always added to the end of the vertex list, so ordinal numbers of existing vertices remain unchanged.

Being added each new vertex is isolated (has no incident arcs).

RETURNS

The routine glp_add_vertices returns an ordinal number of the first new vertex added to the graph.

Definition at line 2894 of file GLPK.cs.

◆ glp_alloc()

static SWIGTYPE_p_void org.gnu.glpk.GLPK.glp_alloc ( int  n,
int  size 
)
inlinestatic

glp_alloc - allocate memory block .

SYNOPSIS

void *glp_alloc(int n, int size);

DESCRIPTION

The routine glp_alloc allocates a memory block of n * size bytes long.

Note that being allocated the memory block contains arbitrary data (not binary zeros!).

RETURNS

The routine glp_alloc returns a pointer to the block allocated. To free this block the routine glp_free (not free!) must be used.

Definition at line 2777 of file GLPK.cs.

◆ glp_analyze_bound()

static void org.gnu.glpk.GLPK.glp_analyze_bound ( glp_prob  P,
int  k,
SWIGTYPE_p_double  value1,
SWIGTYPE_p_int  var1,
SWIGTYPE_p_double  value2,
SWIGTYPE_p_int  var2 
)
inlinestatic

glp_analyze_bound - analyze active bound of non-basic variable .

SYNOPSIS

void glp_analyze_bound(glp_prob *P, int k, double *limit1, int *var1, double *limit2, int *var2);

DESCRIPTION

The routine glp_analyze_bound analyzes the effect of varying the active bound of specified non-basic variable.

The non-basic variable is specified by the parameter k, where 1 <= k <= m means auxiliary variable of corresponding row while m+1 <= k <= m+n means structural variable (column).

Note that the current basic solution must be optimal, and the basis factorization must exist.

Results of the analysis have the following meaning.

value1 is the minimal value of the active bound, at which the basis still remains primal feasible and thus optimal. -DBL_MAX means that the active bound has no lower limit.

var1 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) basic variable, which reaches its bound first and thereby limits further decreasing the active bound being analyzed. if value1 = -DBL_MAX, var1 is set to 0.

value2 is the maximal value of the active bound, at which the basis still remains primal feasible and thus optimal. +DBL_MAX means that the active bound has no upper limit.

var2 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) basic variable, which reaches its bound first and thereby limits further increasing the active bound being analyzed. if value2 = +DBL_MAX, var2 is set to 0.

Definition at line 1971 of file GLPK.cs.

◆ glp_analyze_coef()

static void org.gnu.glpk.GLPK.glp_analyze_coef ( glp_prob  P,
int  k,
SWIGTYPE_p_double  coef1,
SWIGTYPE_p_int  var1,
SWIGTYPE_p_double  value1,
SWIGTYPE_p_double  coef2,
SWIGTYPE_p_int  var2,
SWIGTYPE_p_double  value2 
)
inlinestatic

glp_analyze_coef - analyze objective coefficient at basic variable .

SYNOPSIS

void glp_analyze_coef(glp_prob *P, int k, double *coef1, int *var1, double *value1, double *coef2, int *var2, double *value2);

DESCRIPTION

The routine glp_analyze_coef analyzes the effect of varying the objective coefficient at specified basic variable.

The basic variable is specified by the parameter k, where 1 <= k <= m means auxiliary variable of corresponding row while m+1 <= k <= m+n means structural variable (column).

Note that the current basic solution must be optimal, and the basis factorization must exist.

Results of the analysis have the following meaning.

coef1 is the minimal value of the objective coefficient, at which the basis still remains dual feasible and thus optimal. -DBL_MAX means that the objective coefficient has no lower limit.

var1 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) non-basic variable, whose reduced cost reaches its zero bound first and thereby limits further decreasing the objective coefficient being analyzed. If coef1 = -DBL_MAX, var1 is set to 0.

value1 is value of the basic variable being analyzed in an adjacent basis, which is defined as follows. Let the objective coefficient reaches its minimal value (coef1) and continues decreasing. Then the reduced cost of the limiting non-basic variable (var1) becomes dual infeasible and the current basis becomes non-optimal that forces the limiting non-basic variable to enter the basis replacing there some basic variable that leaves the basis to keep primal feasibility. Should note that on determining the adjacent basis current bounds of the basic variable being analyzed are ignored as if it were free (unbounded) variable, so it cannot leave the basis. It may happen that no dual feasible adjacent basis exists, in which case value1 is set to -DBL_MAX or +DBL_MAX.

coef2 is the maximal value of the objective coefficient, at which the basis still remains dual feasible and thus optimal. +DBL_MAX means that the objective coefficient has no upper limit.

var2 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) non-basic variable, whose reduced cost reaches its zero bound first and thereby limits further increasing the objective coefficient being analyzed. If coef2 = +DBL_MAX, var2 is set to 0.

value2 is value of the basic variable being analyzed in an adjacent basis, which is defined exactly in the same way as value1 above with exception that now the objective coefficient is increasing.

Definition at line 1993 of file GLPK.cs.

◆ glp_asnprob_hall()

static int org.gnu.glpk.GLPK.glp_asnprob_hall ( glp_graph  G,
int  v_set,
int  a_x 
)
inlinestatic

glp_asnprob_hall - find bipartite matching of maximum cardinality .

SYNOPSIS

int glp_asnprob_hall(glp_graph *G, int v_set, int a_x);

DESCRIPTION

The routine glp_asnprob_hall finds a matching of maximal cardinality in the specified bipartite graph G. It uses a version of the Fortran routine MC21A developed by I.S.Duff [1], which implements Hall's algorithm [2].

RETURNS

The routine glp_asnprob_hall returns the cardinality of the matching found. However, if the specified graph is incorrect (as detected by the routine glp_check_asnprob), the routine returns negative value.

REFERENCES

I.S.Duff, Algorithm 575: Permutations for zero-free diagonal, ACM Trans. on Math. Softw. 7 (1981), 387-390.M.Hall, "An Algorithm for distinct representatives," Amer. Math. Monthly 63 (1956), 716-717.

Definition at line 3136 of file GLPK.cs.

◆ glp_asnprob_lp()

static int org.gnu.glpk.GLPK.glp_asnprob_lp ( glp_prob  P,
int  form,
glp_graph  G,
int  names,
int  v_set,
int  a_cost 
)
inlinestatic

glp_asnprob_lp - convert assignment problem to LP .

SYNOPSIS

int glp_asnprob_lp(glp_prob *P, int form, glp_graph *G, int names, int v_set, int a_cost);

DESCRIPTION

The routine glp_asnprob_lp builds an LP problem, which corresponds to the assignment problem on the specified graph G.

RETURNS

If the LP problem has been successfully built, the routine returns zero, otherwise, non-zero.

Definition at line 3107 of file GLPK.cs.

◆ glp_assert_()

static void org.gnu.glpk.GLPK.glp_assert_ ( string  expr,
string  file,
int  line 
)
inlinestatic

glp_assert - check for logical condition .

SYNOPSIS

void glp_assert(int expr);

DESCRIPTION

The routine glp_assert (implemented as a macro) checks for a logical condition specified by the parameter expr. If the condition is false (i.e. the value of expr is zero), the routine writes a message on the terminal and abnormally terminates the program.

Definition at line 2746 of file GLPK.cs.

◆ glp_at_error()

static int org.gnu.glpk.GLPK.glp_at_error ( )
inlinestatic

glp_at_error - check for error state .

SYNOPSIS

int glp_at_error(void);

DESCRIPTION

The routine glp_at_error checks if the GLPK environment is at error state, i.e. if the call to the routine is (indirectly) made from the glp_error routine via an user-defined hook routine.

RETURNS

If the GLPK environment is at error state, the routine glp_at_error returns non-zero, otherwise zero.

Definition at line 2732 of file GLPK.cs.

◆ glp_bf_exists()

static int org.gnu.glpk.GLPK.glp_bf_exists ( glp_prob  P)
inlinestatic

glp_bf_exists - check if the basis factorization exists .

SYNOPSIS

int glp_bf_exists(glp_prob *lp);

RETURNS

If the basis factorization for the current basis associated with the specified problem object exists and therefore is available for computations, the routine glp_bf_exists returns non-zero. Otherwise the routine returns zero.

Definition at line 1603 of file GLPK.cs.

◆ glp_bf_updated()

static int org.gnu.glpk.GLPK.glp_bf_updated ( glp_prob  P)
inlinestatic

glp_bf_updated - check if the basis factorization has been updated .

SYNOPSIS

int glp_bf_updated(glp_prob *lp);

RETURNS

If the basis factorization has been just computed from scratch, the routine glp_bf_updated returns zero. Otherwise, if the factorization has been updated one or more times, the routine returns non-zero.

Definition at line 1626 of file GLPK.cs.

◆ glp_btran()

static void org.gnu.glpk.GLPK.glp_btran ( glp_prob  P,
SWIGTYPE_p_double  x 
)
inlinestatic

glp_btran - perform backward transformation (solve system B'*x = b) .

SYNOPSIS

void glp_btran(glp_prob *lp, double x[]);

DESCRIPTION

The routine glp_btran performs backward transformation, i.e. solves the system B'*x = b, where B' is a matrix transposed to the basis matrix corresponding to the current basis for the specified problem problem object, x is the vector of unknowns to be computed, b is the vector of right-hand sides.

On entry elements of the vector b should be stored in dense format in locations x[1], ..., x[m], where m is the number of rows. On exit the routine stores elements of the vector x in the same locations.

SCALING/UNSCALING

See comments to the routine glp_ftran.

Definition at line 1743 of file GLPK.cs.

◆ glp_check_asnprob()

static int org.gnu.glpk.GLPK.glp_check_asnprob ( glp_graph  G,
int  v_set 
)
inlinestatic

glp_check_asnprob - check correctness of assignment problem data .

SYNOPSIS

int glp_check_asnprob(glp_graph *G, int v_set);

RETURNS

If the specified assignment problem data are correct, the routine glp_check_asnprob returns zero, otherwise, non-zero.

Definition at line 3091 of file GLPK.cs.

◆ glp_check_dup()

static int org.gnu.glpk.GLPK.glp_check_dup ( int  m,
int  n,
int  ne,
SWIGTYPE_p_int  ia,
SWIGTYPE_p_int  ja 
)
inlinestatic

glp_check_dup - check for duplicate elements in sparse matrix .

SYNOPSIS

int glp_check_dup(int m, int n, int ne, const int ia[], const int ja[]);

DESCRIPTION

The routine glp_check_dup checks for duplicate elements (that is, elements with identical indices) in a sparse matrix specified in the coordinate format.

The parameters m and n specifies, respectively, the number of rows and columns in the matrix, m >= 0, n >= 0.

The parameter ne specifies the number of (structurally) non-zero elements in the matrix, ne >= 0.

Elements of the matrix are specified as doublets (ia[k],ja[k]) for k = 1,...,ne, where ia[k] is a row index, ja[k] is a column index.

The routine glp_check_dup can be used prior to a call to the routine glp_load_matrix to check that the constraint matrix to be loaded has no duplicate elements.

RETURNS

The routine glp_check_dup returns one of the following values:

0 - the matrix has no duplicate elements;

-k - indices ia[k] or/and ja[k] are out of range;

+k - element (ia[k],ja[k]) is duplicate.

Definition at line 452 of file GLPK.cs.

◆ glp_cli_arc_get_data()

static glp_cli_arc_data org.gnu.glpk.GLPK.glp_cli_arc_get_data ( glp_arc  arc)
inlinestatic

Get arc data.

Parameters
arcarc
Returns
data

Definition at line 173 of file GLPK.cs.

◆ glp_cli_error()

static void org.gnu.glpk.GLPK.glp_cli_error ( string  message)
inlinestatic

Abort GLPK library with error message.

This method can be used to stop the solver using a GlpkTerminalListener.

Parameters
messagemessage

Definition at line 141 of file GLPK.cs.

◆ glp_cli_set_msg_lvl()

static void org.gnu.glpk.GLPK.glp_cli_set_msg_lvl ( int  msg_lvl)
inlinestatic

Sets the message level.

This method enables and disables debug output of GLPK for Java.

Parameters
msg_lvlmessage level
See also
GLPKConstants::GLP_CLI_MSG_LVL_OFF
GLPKConstants::GLP_CLI_MSG_LVL_ALL

Definition at line 156 of file GLPK.cs.

◆ glp_cli_vertex_data_get()

static glp_cli_vertex_data org.gnu.glpk.GLPK.glp_cli_vertex_data_get ( glp_graph  G,
int  i 
)
inlinestatic

Get vertex data.

Parameters
Ggraph
iindex to vertex
Returns
data

Definition at line 188 of file GLPK.cs.

◆ glp_cli_vertex_get()

static glp_vertex org.gnu.glpk.GLPK.glp_cli_vertex_get ( glp_graph  G,
int  i 
)
inlinestatic

Get vertex.

Parameters
Ggraph
iindex
Returns
vertex

Definition at line 217 of file GLPK.cs.

◆ glp_cli_vertex_get_data()

static glp_cli_vertex_data org.gnu.glpk.GLPK.glp_cli_vertex_get_data ( glp_vertex  v)
inlinestatic

Get vertex data.

Parameters
vvertex
Returns
data

Definition at line 202 of file GLPK.cs.

◆ glp_close_tee()

static int org.gnu.glpk.GLPK.glp_close_tee ( )
inlinestatic

glp_close_tee - stop copying terminal output to text file .

SYNOPSIS

int glp_close_tee(void);

DESCRIPTION

The routine glp_close_tee stops copying the terminal output to the output text file previously open by the routine glp_open_tee closing that file.

RETURNS

0 - operation successful 1 - copying terminal output was not started

Definition at line 2706 of file GLPK.cs.

◆ glp_copy_prob()

static void org.gnu.glpk.GLPK.glp_copy_prob ( glp_prob  dest,
glp_prob  prob,
int  names 
)
inlinestatic

glp_copy_prob - copy problem object content .

SYNOPSIS

void glp_copy_prob(glp_prob *dest, glp_prob *prob, int names);

DESCRIPTION

The routine glp_copy_prob copies the content of the problem object prob to the problem object dest.

The parameter names is a flag. If it is non-zero, the routine also copies all symbolic names; otherwise, if it is zero, symbolic names are not copied.

Definition at line 508 of file GLPK.cs.

◆ glp_cpx_basis()

static void org.gnu.glpk.GLPK.glp_cpx_basis ( glp_prob  P)
inlinestatic

glp_cpx_basis - construct Bixby's initial LP basis .

SYNOPSIS

void glp_cpx_basis(glp_prob *lp);

DESCRIPTION

The routine glp_cpx_basis constructs an advanced initial basis for the specified problem object.

The routine is based on Bixby's algorithm described in the paper:

Robert E. Bixby. Implementing the Simplex Method: The Initial Basis. ORSA Journal on Computing, Vol. 4, No. 3, 1992, pp. 267-84.

Definition at line 980 of file GLPK.cs.

◆ glp_create_index()

static void org.gnu.glpk.GLPK.glp_create_index ( glp_prob  P)
inlinestatic

glp_create_index - create the name index .

SYNOPSIS

void glp_create_index(glp_prob *lp);

DESCRIPTION

The routine glp_create_index creates the name index for the specified problem object. The name index is an auxiliary data structure, which is intended to quickly (i.e. for logarithmic time) find rows and columns by their names.

This routine can be called at any time. If the name index already exists, the routine does nothing.

Definition at line 787 of file GLPK.cs.

◆ glp_del_arc()

static void org.gnu.glpk.GLPK.glp_del_arc ( glp_graph  G,
glp_arc  a 
)
inlinestatic

glp_del_arc - delete arc from graph .

SYNOPSIS

void glp_del_arc(glp_graph *G, glp_arc *a);

DESCRIPTION

The routine glp_del_arc deletes an arc from the specified graph. The arc to be deleted must exist.

Definition at line 2947 of file GLPK.cs.

◆ glp_del_cols()

static void org.gnu.glpk.GLPK.glp_del_cols ( glp_prob  P,
int  ncs,
SWIGTYPE_p_int  num 
)
inlinestatic

glp_del_cols - delete columns from problem object .

SYNOPSIS

void glp_del_cols(glp_prob *lp, int ncs, const int num[]);

DESCRIPTION

The routine glp_del_cols deletes columns from the specified problem object. Ordinal numbers of columns to be deleted should be placed in locations num[1], ..., num[ncs], where ncs > 0.

Note that deleting columns involves changing ordinal numbers of other columns remaining in the problem object. New ordinal numbers of the remaining columns are assigned under the assumption that the original order of columns is not changed.

Definition at line 494 of file GLPK.cs.

◆ glp_del_rows()

static void org.gnu.glpk.GLPK.glp_del_rows ( glp_prob  P,
int  nrs,
SWIGTYPE_p_int  num 
)
inlinestatic

glp_del_rows - delete rows from problem object .

SYNOPSIS

void glp_del_rows(glp_prob *lp, int nrs, const int num[]);

DESCRIPTION

The routine glp_del_rows deletes rows from the specified problem object. Ordinal numbers of rows to be deleted should be placed in locations num[1], ..., num[nrs], where nrs > 0.

Note that deleting rows involves changing ordinal numbers of other rows remaining in the problem object. New ordinal numbers of the remaining rows are assigned under the assumption that the original order of rows is not changed.

Definition at line 480 of file GLPK.cs.

◆ glp_del_vertices()

static void org.gnu.glpk.GLPK.glp_del_vertices ( glp_graph  G,
int  ndel,
SWIGTYPE_p_int  num 
)
inlinestatic

glp_del_vertices - delete vertices from graph .

SYNOPSIS

void glp_del_vertices(glp_graph *G, int ndel, const int num[]);

DESCRIPTION

The routine glp_del_vertices deletes vertices along with all incident arcs from the specified graph. Ordinal numbers of vertices to be deleted should be placed in locations num[1], ..., num[ndel], ndel > 0.

Note that deleting vertices involves changing ordinal numbers of other vertices remaining in the graph. New ordinal numbers of the remaining vertices are assigned under the assumption that the original order of vertices is not changed.

Definition at line 2934 of file GLPK.cs.

◆ glp_delete_graph()

static void org.gnu.glpk.GLPK.glp_delete_graph ( glp_graph  G)
inlinestatic

glp_delete_graph - delete graph .

SYNOPSIS

void glp_delete_graph(glp_graph *G);

DESCRIPTION

The routine glp_delete_graph deletes the specified graph and frees all the memory allocated to this program object.

Definition at line 2968 of file GLPK.cs.

◆ glp_delete_index()

static void org.gnu.glpk.GLPK.glp_delete_index ( glp_prob  P)
inlinestatic

glp_delete_index - delete the name index .

SYNOPSIS

void glp_delete_index(glp_prob *lp);

DESCRIPTION

The routine glp_delete_index deletes the name index previously created by the routine glp_create_index and frees the memory allocated to this auxiliary data structure.

This routine can be called at any time. If the name index does not exist, the routine does nothing.

Definition at line 829 of file GLPK.cs.

◆ glp_difftime()

static double org.gnu.glpk.GLPK.glp_difftime ( double  t1,
double  t0 
)
inlinestatic

glp_difftime - compute difference between two time values .

SYNOPSIS

double glp_difftime(double t1, double t0);

RETURNS

The routine glp_difftime returns the difference between two time values t1 and t0, expressed in seconds.

Definition at line 2854 of file GLPK.cs.

◆ glp_dual_rtest()

static int org.gnu.glpk.GLPK.glp_dual_rtest ( glp_prob  P,
int  len,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val,
int  dir,
double  eps 
)
inlinestatic

glp_dual_rtest - perform dual ratio test .

SYNOPSIS

int glp_dual_rtest(glp_prob *P, int len, const int ind[], const double val[], int dir, double eps);

DESCRIPTION

The routine glp_dual_rtest performs the dual ratio test using an explicitly specified row of the simplex table.

The current basic solution associated with the LP problem object must be dual feasible.

The explicitly specified row of the simplex table is a linear form that shows how some basic variable x (which is not necessarily presented in the problem object) depends on non-basic variables xN:

x = alfa[1] * xN[1] + alfa[2] * xN[2] + ... + alfa[n] * xN[n]. (*)

The row (*) is specified on entry to the routine using the sparse format. Ordinal numbers of non-basic variables xN[j] should be placed in locations ind[1], ..., ind[len], where ordinal numbers 1 to m denote auxiliary variables, and ordinal numbers m+1 to m+n denote structural variables. The corresponding non-zero coefficients alfa[j] should be placed in locations val[1], ..., val[len]. The arrays ind and val are not changed on exit.

The parameter dir specifies direction in which the variable x changes on leaving the basis: +1 means that x goes to its lower bound, and -1 means that x goes to its upper bound.

The parameter eps is an absolute tolerance (small positive number) used by the routine to skip small alfa[j] of the row (*).

The routine determines which non-basic variable (among specified in ind[1], ..., ind[len]) should enter the basis in order to keep dual feasibility.

RETURNS

The routine glp_dual_rtest returns the index piv in the arrays ind and val corresponding to the pivot element chosen, 1 <= piv <= len. If the adjacent basic solution is dual unbounded and therefore the choice cannot be made, the routine returns zero.

COMMENTS

If the basic variable x is presented in the LP problem object, the row (*) can be computed with the routine glp_eval_tab_row; otherwise it can be computed with the routine glp_transform_row.

Definition at line 1950 of file GLPK.cs.

◆ glp_error_hook()

static void org.gnu.glpk.GLPK.glp_error_hook ( SWIGTYPE_p_f_p_void__void  func,
SWIGTYPE_p_void  info 
)
inlinestatic

glp_error_hook - install hook to intercept abnormal termination .

SYNOPSIS

void glp_error_hook(void (*func)(void *info), void *info);

DESCRIPTION

The routine glp_error_hook installs a user-defined hook routine to intercept abnormal termination.

The parameter func specifies the user-defined hook routine. It is called from the routine glp_error before the latter calls the abort function to abnormally terminate the application program because of fatal error. The parameter info is a transit pointer, specified in the corresponding call to the routine glp_error_hook; it may be used to pass some information to the hook routine.

To uninstall the hook routine the parameters func and info should be both specified as NULL.

Definition at line 2761 of file GLPK.cs.

◆ glp_eval_tab_col()

static int org.gnu.glpk.GLPK.glp_eval_tab_col ( glp_prob  P,
int  k,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_eval_tab_col - compute column of the simplex tableau .

SYNOPSIS

int glp_eval_tab_col(glp_prob *lp, int k, int ind[], double val[]);

DESCRIPTION

The routine glp_eval_tab_col computes a column of the current simplex table for the non-basic variable, which is specified by the number k: if 1 <= k <= m, x[k] is k-th auxiliary variable; if m+1 <= k <= m+n, x[k] is (k-m)-th structural variable, where m is number of rows, and n is number of columns. The current basis must be available.

The routine stores row indices and numerical values of non-zero elements of the computed column using sparse format to the locations ind[1], ..., ind[len] and val[1], ..., val[len] respectively, where 0 <= len <= m is number of non-zeros returned on exit.

Element indices stored in the array ind have the same sense as the index k, i.e. indices 1 to m denote auxiliary variables and indices m+1 to m+n denote structural ones (all these variables are obviously basic by the definition).

The computed column shows how basic variables depend on the specified non-basic variable x[k] = xN[j]:

xB[1] = ... + alfa[1,j]*xN[j] + ... xB[2] = ... + alfa[2,j]*xN[j] + ... . . . . . . xB[m] = ... + alfa[m,j]*xN[j] + ...

where alfa[i,j] are elements of the simplex table column, xB[i] are basic (auxiliary and structural) variables.

RETURNS

The routine returns number of non-zero elements in the simplex table column stored in the arrays ind and val.

BACKGROUND

As it was explained in comments to the routine glp_eval_tab_row (see above) the simplex table is the following matrix:

A^ = - inv(B) * N. (1)

Therefore j-th column of the simplex table is:

A^ * e = - inv(B) * N * e = - inv(B) * N[j], (2)

where e is a unity vector with e[j] = 1, B is the basis matrix, N[j] is a column of the augmented constraint matrix A~, which corresponds to the given non-basic auxiliary or structural variable.

Definition at line 1834 of file GLPK.cs.

◆ glp_eval_tab_row()

static int org.gnu.glpk.GLPK.glp_eval_tab_row ( glp_prob  P,
int  k,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_eval_tab_row - compute row of the simplex tableau .

SYNOPSIS

int glp_eval_tab_row(glp_prob *lp, int k, int ind[], double val[]);

DESCRIPTION

The routine glp_eval_tab_row computes a row of the current simplex tableau for the basic variable, which is specified by the number k: if 1 <= k <= m, x[k] is k-th auxiliary variable; if m+1 <= k <= m+n, x[k] is (k-m)-th structural variable, where m is number of rows, and n is number of columns. The current basis must be available.

The routine stores column indices and numerical values of non-zero elements of the computed row using sparse format to the locations ind[1], ..., ind[len] and val[1], ..., val[len], respectively, where 0 <= len <= n is number of non-zeros returned on exit.

Element indices stored in the array ind have the same sense as the index k, i.e. indices 1 to m denote auxiliary variables and indices m+1 to m+n denote structural ones (all these variables are obviously non-basic by definition).

The computed row shows how the specified basic variable x[k] = xB[i] depends on non-basic variables:

xB[i] = alfa[i,1]*xN[1] + alfa[i,2]*xN[2] + ... + alfa[i,n]*xN[n],

where alfa[i,j] are elements of the simplex table row, xN[j] are non-basic (auxiliary and structural) variables.

RETURNS

The routine returns number of non-zero elements in the simplex table row stored in the arrays ind and val.

BACKGROUND

The system of equality constraints of the LP problem is:

xR = A * xS, (1)

where xR is the vector of auxliary variables, xS is the vector of structural variables, A is the matrix of constraint coefficients.

The system (1) can be written in homogenous form as follows:

A~ * x = 0, (2)

where A~ = (I | -A) is the augmented constraint matrix (has m rows and m+n columns), x = (xR | xS) is the vector of all (auxiliary and structural) variables.

By definition for the current basis we have:

A~ = (B | N), (3)

where B is the basis matrix. Thus, the system (2) can be written as:

B * xB + N * xN = 0. (4)

From (4) it follows that:

xB = A^ * xN, (5)

where the matrix

A^ = - inv(B) * N (6)

is called the simplex table.

It is understood that i-th row of the simplex table is:

e * A^ = - e * inv(B) * N, (7)

where e is a unity vector with e[i] = 1.

To compute i-th row of the simplex table the routine first computes i-th row of the inverse:

rho = inv(B') * e, (8)

where B' is a matrix transposed to B, and then computes elements of i-th row of the simplex table as scalar products:

alfa[i,j] = - rho * N[j] for all j, (9)

where N[j] is a column of the augmented constraint matrix A~, which corresponds to some non-basic auxiliary or structural variable.

Definition at line 1807 of file GLPK.cs.

◆ glp_find_col()

static int org.gnu.glpk.GLPK.glp_find_col ( glp_prob  P,
string  name 
)
inlinestatic

glp_find_col - find column by its name .

SYNOPSIS

int glp_find_col(glp_prob *lp, const char *name);

RETURNS

The routine glp_find_col returns the ordinal number of a column, which is assigned (by the routine glp_set_col_name) the specified symbolic name. If no such column exists, the routine returns 0.

Definition at line 814 of file GLPK.cs.

◆ glp_find_row()

static int org.gnu.glpk.GLPK.glp_find_row ( glp_prob  P,
string  name 
)
inlinestatic

glp_find_row - find row by its name .

SYNOPSIS

int glp_find_row(glp_prob *lp, const char *name);

RETURNS

The routine glp_find_row returns the ordinal number of a row, which is assigned (by the routine glp_set_row_name) the specified symbolic name. If no such row exists, the routine returns 0.

Definition at line 800 of file GLPK.cs.

◆ glp_free()

static void org.gnu.glpk.GLPK.glp_free ( SWIGTYPE_p_void  ptr)
inlinestatic

glp_free - free (deallocate) memory block .

SYNOPSIS

void glp_free(void *ptr);

DESCRIPTION

The routine glp_free frees (deallocates) a memory block pointed to by ptr, which was previuosly allocated by the routine glp_alloc or reallocated by the routine glp_realloc.

Definition at line 2802 of file GLPK.cs.

◆ glp_free_env()

static int org.gnu.glpk.GLPK.glp_free_env ( )
inlinestatic

glp_free_env - free GLPK environment .

SYNOPSIS

int glp_free_env(void);

DESCRIPTION

The routine glp_free_env frees all resources used by GLPK routines (memory blocks, etc.) which are currently still in use.

Normally the application program does not need to call this routine, because GLPK routines always free all unused resources. However, if the application program even has deleted all problem objects, there will be several memory blocks still allocated for the library needs. For some reasons the application program may want GLPK to free this memory, in which case it should call glp_free_env.

Note that a call to glp_free_env invalidates all problem objects as if no GLPK routine were called.

RETURNS

0 - termination successful; 1 - environment is inactive (was not initialized).

Definition at line 2603 of file GLPK.cs.

◆ glp_ftran()

static void org.gnu.glpk.GLPK.glp_ftran ( glp_prob  P,
SWIGTYPE_p_double  x 
)
inlinestatic

glp_ftran - perform forward transformation (solve system B*x = b) .

SYNOPSIS

void glp_ftran(glp_prob <em>lp, double x[]);

DESCRIPTION

The routine glp_ftran performs forward transformation, i.e. solves the system B*x = b, where B is the basis matrix corresponding to the current basis for the specified problem object, x is the vector of unknowns to be computed, b is the vector of right-hand sides.

On entry elements of the vector b should be stored in dense format in locations x[1], ..., x[m], where m is the number of rows. On exit the routine stores elements of the vector x in the same locations.

SCALING/UNSCALING

Let A~ = (I | -A) is the augmented constraint matrix of the original (unscaled) problem. In the scaled LP problem instead the matrix A the scaled matrix A" = R*A*S is actually used, so</p> <p>A~" = (I | A") = (I | R*A*S) = (R*I*inv(R) | R*A*S) = (1) = R(I | A)*S~ = R*A~*S~,

is the scaled augmented constraint matrix, where R and S are diagonal scaling matrices used to scale rows and columns of the matrix A, and

S~ = diag(inv(R) | S) (2)

is an augmented diagonal scaling matrix.

By definition:

A~ = (B | N), (3)

where B is the basic matrix, which consists of basic columns of the augmented constraint matrix A~, and N is a matrix, which consists of non-basic columns of A~. From (1) it follows that:

A~" = (B" | N") = (R*B*SB | R*N*SN), (4)

where SB and SN are parts of the augmented scaling matrix S~, which correspond to basic and non-basic variables, respectively. Therefore

B" = R*B*SB, (5)

which is the scaled basis matrix.

Definition at line 1727 of file GLPK.cs.

◆ glp_get_bfcp()

static void org.gnu.glpk.GLPK.glp_get_bfcp ( glp_prob  P,
glp_bfcp  parm 
)
inlinestatic

glp_get_bfcp - retrieve basis factorization control parameters .

SYNOPSIS

void glp_get_bfcp(glp_prob *lp, glp_bfcp *parm);

DESCRIPTION

The routine glp_get_bfcp retrieves control parameters, which are used on computing and updating the basis factorization associated with the specified problem object.

Current values of control parameters are stored by the routine in a glp_bfcp structure, which the parameter parm points to.

Definition at line 1641 of file GLPK.cs.

◆ glp_get_bhead()

static int org.gnu.glpk.GLPK.glp_get_bhead ( glp_prob  P,
int  k 
)
inlinestatic

glp_get_bhead - retrieve the basis header information .

SYNOPSIS

int glp_get_bhead(glp_prob *lp, int k);

DESCRIPTION

The routine glp_get_bhead returns the basis header information for the current basis associated with the specified problem object.

RETURNS

If xB[k], 1 <= k <= m, is i-th auxiliary variable (1 <= i <= m), the routine returns i. Otherwise, if xB[k] is j-th structural variable (1 <= j <= n), the routine returns m+j. Here m is the number of rows and n is the number of columns in the problem object.

Definition at line 1671 of file GLPK.cs.

◆ glp_get_col_bind()

static int org.gnu.glpk.GLPK.glp_get_col_bind ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_bind - retrieve column index in the basis header .

SYNOPSIS

int glp_get_col_bind(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_bind returns the index k of basic variable xB[k], 1 <= k <= m, which is j-th structural variable, 1 <= j <= n, in the current basis associated with the specified problem object, where m is the number of rows, n is the number of columns. However, if j-th structural variable is non-basic, the routine returns zero.

Definition at line 1699 of file GLPK.cs.

◆ glp_get_col_dual()

static double org.gnu.glpk.GLPK.glp_get_col_dual ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_dual - retrieve column dual value (basic solution) .

SYNOPSIS

double glp_get_col_dual(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_dual returns dual value (i.e. reduced cost) of the structural variable associated with j-th column.

Definition at line 1156 of file GLPK.cs.

◆ glp_get_col_kind()

static int org.gnu.glpk.GLPK.glp_get_col_kind ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_kind - retrieve column kind .

SYNOPSIS

int glp_get_col_kind(glp_prob *mip, int j);

RETURNS

The routine glp_get_col_kind returns the kind of j-th column, i.e. the kind of corresponding structural variable, as follows:

GLP_CV - continuous variable; GLP_IV - integer variable; GLP_BV - binary variable

Definition at line 1326 of file GLPK.cs.

◆ glp_get_col_lb()

static double org.gnu.glpk.GLPK.glp_get_col_lb ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_lb - retrieve column lower bound .

SYNOPSIS

double glp_get_col_lb(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_lb returns the lower bound of j-th column, i.e. the lower bound of corresponding structural variable. However, if the column has no lower bound, the routine returns -DBL_MAX.

Definition at line 694 of file GLPK.cs.

◆ glp_get_col_name()

static string org.gnu.glpk.GLPK.glp_get_col_name ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_name - retrieve column name .

SYNOPSIS

const char *glp_get_col_name(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_name returns a pointer to an internal buffer, which contains symbolic name of j-th column. However, if j-th column has no assigned name, the routine returns NULL.

Definition at line 622 of file GLPK.cs.

◆ glp_get_col_prim()

static double org.gnu.glpk.GLPK.glp_get_col_prim ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_prim - retrieve column primal value (basic solution) .

SYNOPSIS

double glp_get_col_prim(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_prim returns primal value of the structural variable associated with j-th column.

Definition at line 1142 of file GLPK.cs.

◆ glp_get_col_stat()

static int org.gnu.glpk.GLPK.glp_get_col_stat ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_stat - retrieve column status .

SYNOPSIS

int glp_get_col_stat(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_stat returns current status assigned to the structural variable associated with j-th column as follows:

GLP_BS - basic variable; GLP_NL - non-basic variable on its lower bound; GLP_NU - non-basic variable on its upper bound; GLP_NF - non-basic free (unbounded) variable; GLP_NS - non-basic fixed variable.

Definition at line 1128 of file GLPK.cs.

◆ glp_get_col_type()

static int org.gnu.glpk.GLPK.glp_get_col_type ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_type - retrieve column type .

SYNOPSIS

int glp_get_col_type(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_type returns the type of j-th column, i.e. the type of corresponding structural variable, as follows:

GLP_FR - free (unbounded) variable; GLP_LO - variable with lower bound; GLP_UP - variable with upper bound; GLP_DB - double-bounded variable; GLP_FX - fixed variable.

Definition at line 680 of file GLPK.cs.

◆ glp_get_col_ub()

static double org.gnu.glpk.GLPK.glp_get_col_ub ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_col_ub - retrieve column upper bound .

SYNOPSIS

double glp_get_col_ub(glp_prob *lp, int j);

RETURNS

The routine glp_get_col_ub returns the upper bound of j-th column, i.e. the upper bound of corresponding structural variable. However, if the column has no upper bound, the routine returns +DBL_MAX.

Definition at line 708 of file GLPK.cs.

◆ glp_get_dual_stat()

static int org.gnu.glpk.GLPK.glp_get_dual_stat ( glp_prob  P)
inlinestatic

glp_get_dual_stat - retrieve status of dual basic solution .

SYNOPSIS

int glp_get_dual_stat(glp_prob *lp);

RETURNS

The routine glp_get_dual_stat reports the status of the dual basic solution for the specified problem object as follows:

GLP_UNDEF - dual solution is undefined; GLP_FEAS - dual solution is feasible; GLP_INFEAS - dual solution is infeasible; GLP_NOFEAS - no dual feasible solution exists.

Definition at line 1056 of file GLPK.cs.

◆ glp_get_mat_col()

static int org.gnu.glpk.GLPK.glp_get_mat_col ( glp_prob  P,
int  j,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_get_mat_col - retrieve column of the constraint matrix .

SYNOPSIS

int glp_get_mat_col(glp_prob *lp, int j, int ind[], double val[]);

DESCRIPTION

The routine glp_get_mat_col scans (non-zero) elements of j-th column of the constraint matrix of the specified problem object and stores their row indices and numeric values to locations ind[1], ..., ind[len] and val[1], ..., val[len], respectively, where 0 <= len <= m is the number of elements in j-th column, m is the number of rows.

The parameter ind or/and val can be specified as NULL, in which case corresponding information is not stored.

RETURNS

The routine glp_get_mat_col returns the length len, i.e. the number of (non-zero) elements in j-th column.

Definition at line 772 of file GLPK.cs.

◆ glp_get_mat_row()

static int org.gnu.glpk.GLPK.glp_get_mat_row ( glp_prob  P,
int  i,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_get_mat_row - retrieve row of the constraint matrix .

SYNOPSIS

int glp_get_mat_row(glp_prob *lp, int i, int ind[], double val[]);

DESCRIPTION

The routine glp_get_mat_row scans (non-zero) elements of i-th row of the constraint matrix of the specified problem object and stores their column indices and numeric values to locations ind[1], ..., ind[len] and val[1], ..., val[len], respectively, where 0 <= len <= n is the number of elements in i-th row, n is the number of columns.

The parameter ind and/or val can be specified as NULL, in which case corresponding information is not stored.

RETURNS

The routine glp_get_mat_row returns the length len, i.e. the number of (non-zero) elements in i-th row.

Definition at line 755 of file GLPK.cs.

◆ glp_get_num_bin()

static int org.gnu.glpk.GLPK.glp_get_num_bin ( glp_prob  P)
inlinestatic

glp_get_num_bin - retrieve number of binary columns .

SYNOPSIS

int glp_get_num_bin(glp_prob *mip);

RETURNS

The routine glp_get_num_bin returns the current number of columns, which are marked as binary.

Definition at line 1354 of file GLPK.cs.

◆ glp_get_num_cols()

static int org.gnu.glpk.GLPK.glp_get_num_cols ( glp_prob  P)
inlinestatic

glp_get_num_cols - retrieve number of columns .

SYNOPSIS

int glp_get_num_cols(glp_prob *lp);

RETURNS

The routine glp_get_num_cols returns the current number of columns in the specified problem object.

Definition at line 594 of file GLPK.cs.

◆ glp_get_num_int()

static int org.gnu.glpk.GLPK.glp_get_num_int ( glp_prob  P)
inlinestatic

glp_get_num_int - retrieve number of integer columns .

SYNOPSIS

int glp_get_num_int(glp_prob *mip);

RETURNS

The routine glp_get_num_int returns the current number of columns, which are marked as integer.

Definition at line 1340 of file GLPK.cs.

◆ glp_get_num_nz()

static int org.gnu.glpk.GLPK.glp_get_num_nz ( glp_prob  P)
inlinestatic

glp_get_num_nz - retrieve number of constraint coefficients .

SYNOPSIS

int glp_get_num_nz(glp_prob *lp);

RETURNS

The routine glp_get_num_nz returns the number of (non-zero) elements in the constraint matrix of the specified problem object.

Definition at line 738 of file GLPK.cs.

◆ glp_get_num_rows()

static int org.gnu.glpk.GLPK.glp_get_num_rows ( glp_prob  P)
inlinestatic

glp_get_num_rows - retrieve number of rows .

SYNOPSIS

int glp_get_num_rows(glp_prob *lp);

RETURNS

The routine glp_get_num_rows returns the current number of rows in the specified problem object.

Definition at line 580 of file GLPK.cs.

◆ glp_get_obj_coef()

static double org.gnu.glpk.GLPK.glp_get_obj_coef ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_obj_coef - retrieve obj.

coefficient or constant term

SYNOPSIS

double glp_get_obj_coef(glp_prob *lp, int j);

RETURNS

The routine glp_get_obj_coef returns the objective coefficient at j-th structural variable (column) of the specified problem object.

If the parameter j is zero, the routine returns the constant term ("shift") of the objective function.

Definition at line 724 of file GLPK.cs.

◆ glp_get_obj_dir()

static int org.gnu.glpk.GLPK.glp_get_obj_dir ( glp_prob  P)
inlinestatic

glp_get_obj_dir - retrieve optimization direction flag .

SYNOPSIS

int glp_get_obj_dir(glp_prob *lp);

RETURNS

The routine glp_get_obj_dir returns the optimization direction flag (i.e. "sense" of the objective function):

GLP_MIN - minimization; GLP_MAX - maximization.

Definition at line 566 of file GLPK.cs.

◆ glp_get_obj_name()

static string org.gnu.glpk.GLPK.glp_get_obj_name ( glp_prob  P)
inlinestatic

glp_get_obj_name - retrieve objective function name .

SYNOPSIS

const char *glp_get_obj_name(glp_prob *lp);

RETURNS

The routine glp_get_obj_name returns a pointer to an internal buffer, which contains a symbolic name of the objective function. However, if the objective function has no assigned name, the routine returns NULL.

Definition at line 551 of file GLPK.cs.

◆ glp_get_obj_val()

static double org.gnu.glpk.GLPK.glp_get_obj_val ( glp_prob  P)
inlinestatic

glp_get_obj_val - retrieve objective value (basic solution) .

SYNOPSIS

double glp_get_obj_val(glp_prob *lp);

RETURNS

The routine glp_get_obj_val returns value of the objective function for basic solution.

Definition at line 1070 of file GLPK.cs.

◆ glp_get_prim_stat()

static int org.gnu.glpk.GLPK.glp_get_prim_stat ( glp_prob  P)
inlinestatic

glp_get_prim_stat - retrieve status of primal basic solution .

SYNOPSIS

int glp_get_prim_stat(glp_prob *lp);

RETURNS

The routine glp_get_prim_stat reports the status of the primal basic solution for the specified problem object as follows:

GLP_UNDEF - primal solution is undefined; GLP_FEAS - primal solution is feasible; GLP_INFEAS - primal solution is infeasible; GLP_NOFEAS - no primal feasible solution exists.

Definition at line 1041 of file GLPK.cs.

◆ glp_get_prob_name()

static string org.gnu.glpk.GLPK.glp_get_prob_name ( glp_prob  P)
inlinestatic

glp_get_prob_name - retrieve problem name .

SYNOPSIS

const char *glp_get_prob_name(glp_prob *lp);

RETURNS

The routine glp_get_prob_name returns a pointer to an internal buffer, which contains symbolic name of the problem. However, if the problem has no assigned name, the routine returns NULL.

Definition at line 537 of file GLPK.cs.

◆ glp_get_rii()

static double org.gnu.glpk.GLPK.glp_get_rii ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_rii - retrieve row scale factor .

SYNOPSIS

double glp_get_rii(glp_prob *lp, int i);

RETURNS

The routine glp_get_rii returns current scale factor r[i,i] for i-th row of the specified problem object.

Definition at line 868 of file GLPK.cs.

◆ glp_get_row_bind()

static int org.gnu.glpk.GLPK.glp_get_row_bind ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_bind - retrieve row index in the basis header .

SYNOPSIS

int glp_get_row_bind(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_bind returns the index k of basic variable xB[k], 1 <= k <= m, which is i-th auxiliary variable, 1 <= i <= m, in the current basis associated with the specified problem object, where m is the number of rows. However, if i-th auxiliary variable is non-basic, the routine returns zero.

Definition at line 1685 of file GLPK.cs.

◆ glp_get_row_dual()

static double org.gnu.glpk.GLPK.glp_get_row_dual ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_dual - retrieve row dual value (basic solution) .

SYNOPSIS

double glp_get_row_dual(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_dual returns dual value (i.e. reduced cost) of the auxiliary variable associated with i-th row.

Definition at line 1113 of file GLPK.cs.

◆ glp_get_row_lb()

static double org.gnu.glpk.GLPK.glp_get_row_lb ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_lb - retrieve row lower bound .

SYNOPSIS

double glp_get_row_lb(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_lb returns the lower bound of i-th row, i.e. the lower bound of corresponding auxiliary variable. However, if the row has no lower bound, the routine returns -DBL_MAX.

Definition at line 651 of file GLPK.cs.

◆ glp_get_row_name()

static string org.gnu.glpk.GLPK.glp_get_row_name ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_name - retrieve row name .

SYNOPSIS

const char *glp_get_row_name(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_name returns a pointer to an internal buffer, which contains symbolic name of i-th row. However, if i-th row has no assigned name, the routine returns NULL.

Definition at line 608 of file GLPK.cs.

◆ glp_get_row_prim()

static double org.gnu.glpk.GLPK.glp_get_row_prim ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_prim - retrieve row primal value (basic solution) .

SYNOPSIS

double glp_get_row_prim(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_prim returns primal value of the auxiliary variable associated with i-th row.

Definition at line 1099 of file GLPK.cs.

◆ glp_get_row_stat()

static int org.gnu.glpk.GLPK.glp_get_row_stat ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_stat - retrieve row status .

SYNOPSIS

int glp_get_row_stat(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_stat returns current status assigned to the auxiliary variable associated with i-th row as follows:

GLP_BS - basic variable; GLP_NL - non-basic variable on its lower bound; GLP_NU - non-basic variable on its upper bound; GLP_NF - non-basic free (unbounded) variable; GLP_NS - non-basic fixed variable.

Definition at line 1085 of file GLPK.cs.

◆ glp_get_row_type()

static int org.gnu.glpk.GLPK.glp_get_row_type ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_type - retrieve row type .

SYNOPSIS

int glp_get_row_type(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_type returns the type of i-th row, i.e. the type of corresponding auxiliary variable, as follows:

GLP_FR - free (unbounded) variable; GLP_LO - variable with lower bound; GLP_UP - variable with upper bound; GLP_DB - double-bounded variable; GLP_FX - fixed variable.

Definition at line 637 of file GLPK.cs.

◆ glp_get_row_ub()

static double org.gnu.glpk.GLPK.glp_get_row_ub ( glp_prob  P,
int  i 
)
inlinestatic

glp_get_row_ub - retrieve row upper bound .

SYNOPSIS

double glp_get_row_ub(glp_prob *lp, int i);

RETURNS

The routine glp_get_row_ub returns the upper bound of i-th row, i.e. the upper bound of corresponding auxiliary variable. However, if the row has no upper bound, the routine returns +DBL_MAX.

Definition at line 665 of file GLPK.cs.

◆ glp_get_sjj()

static double org.gnu.glpk.GLPK.glp_get_sjj ( glp_prob  P,
int  j 
)
inlinestatic

glp_get_sjj - retrieve column scale factor .

SYNOPSIS

double glp_get_sjj(glp_prob *lp, int j);

RETURNS

The routine glp_get_sjj returns current scale factor s[j,j] for j-th column of the specified problem object.

Definition at line 882 of file GLPK.cs.

◆ glp_get_status()

static int org.gnu.glpk.GLPK.glp_get_status ( glp_prob  P)
inlinestatic

glp_get_status - retrieve generic status of basic solution .

SYNOPSIS

int glp_get_status(glp_prob *lp);

RETURNS

The routine glp_get_status reports the generic status of the basic solution for the specified problem object as follows:

GLP_OPT - solution is optimal; GLP_FEAS - solution is feasible; GLP_INFEAS - solution is infeasible; GLP_NOFEAS - problem has no feasible solution; GLP_UNBND - problem has unbounded solution; GLP_UNDEF - solution is undefined.

Definition at line 1026 of file GLPK.cs.

◆ glp_get_unbnd_ray()

static int org.gnu.glpk.GLPK.glp_get_unbnd_ray ( glp_prob  P)
inlinestatic

glp_get_unbnd_ray - determine variable causing unboundedness .

SYNOPSIS

int glp_get_unbnd_ray(glp_prob *lp);

RETURNS

The routine glp_get_unbnd_ray returns the number k of a variable, which causes primal or dual unboundedness. If 1 <= k <= m, it is k-th auxiliary variable, and if m+1 <= k <= m+n, it is (k-m)-th structural variable, where m is the number of rows, n is the number of columns in the problem object. If such variable is not defined, the routine returns 0.

COMMENTS

If it is not exactly known which version of the simplex solver detected unboundedness, i.e. whether the unboundedness is primal or dual, it is sufficient to check the status of the variable reported with the routine glp_get_row_stat or glp_get_col_stat. If the variable is non-basic, the unboundedness is primal, otherwise, if the variable is basic, the unboundedness is dual (the latter case means that the problem has no primal feasible dolution).

Definition at line 1172 of file GLPK.cs.

◆ glp_init_cpxcp()

static void org.gnu.glpk.GLPK.glp_init_cpxcp ( glp_cpxcp  parm)
inlinestatic

glp_init_cpxcp - initialize CPLEX LP format control parameters .

SYNOPSIS

void glp_init_cpxcp(glp_cpxcp *parm):

The routine glp_init_cpxcp initializes control parameters used by the CPLEX LP input/output routines glp_read_lp and glp_write_lp with default values.

Default values of the control parameters are stored in the glp_cpxcp structure, which the parameter parm points to.

Definition at line 2389 of file GLPK.cs.

◆ glp_init_env()

static int org.gnu.glpk.GLPK.glp_init_env ( )
inlinestatic

glp_init_env - initialize GLPK environment .

SYNOPSIS

int glp_init_env(void);

DESCRIPTION

The routine glp_init_env initializes the GLPK environment. Normally the application program does not need to call this routine, because it is called automatically on the first call to any API routine.

RETURNS

The routine glp_init_env returns one of the following codes:

0 - initialization successful; 1 - environment has been already initialized; 2 - initialization failed (insufficient memory); 3 - initialization failed (unsupported programming model).

Definition at line 2565 of file GLPK.cs.

◆ glp_init_iocp()

static void org.gnu.glpk.GLPK.glp_init_iocp ( glp_iocp  parm)
inlinestatic

glp_init_iocp - initialize integer optimizer control parameters .

SYNOPSIS

void glp_init_iocp(glp_iocp *parm);

DESCRIPTION

The routine glp_init_iocp initializes control parameters, which are used by the integer optimizer, with default values.

Default values of the control parameters are stored in a glp_iocp structure, which the parameter parm points to.

Definition at line 1378 of file GLPK.cs.

◆ glp_init_iptcp()

static void org.gnu.glpk.GLPK.glp_init_iptcp ( glp_iptcp  parm)
inlinestatic

glp_init_iptcp - initialize interior-point solver control parameters .

SYNOPSIS

void glp_init_iptcp(glp_iptcp *parm);

DESCRIPTION

The routine glp_init_iptcp initializes control parameters, which are used by the interior-point solver, with default values.

Default values of the control parameters are stored in the glp_iptcp structure, which the parameter parm points to.

Definition at line 1213 of file GLPK.cs.

◆ glp_init_mpscp()

static void org.gnu.glpk.GLPK.glp_init_mpscp ( glp_mpscp  parm)
inlinestatic

glp_init_mpscp - initialize MPS format control parameters .

SYNOPSIS

void glp_init_mpscp(glp_mpscp *parm);

DESCRIPTION

The routine glp_init_mpscp initializes control parameters, which are used by the MPS input/output routines glp_read_mps and glp_write_mps, with default values.

Default values of the control parameters are stored in the glp_mpscp structure, which the parameter parm points to.

Definition at line 2358 of file GLPK.cs.

◆ glp_init_smcp()

static void org.gnu.glpk.GLPK.glp_init_smcp ( glp_smcp  parm)
inlinestatic

glp_init_smcp - initialize simplex method control parameters .

SYNOPSIS

void glp_init_smcp(glp_smcp *parm);

DESCRIPTION

The routine glp_init_smcp initializes control parameters, which are used by the simplex solver, with default values.

Default values of the control parameters are stored in a glp_smcp structure, which the parameter parm points to.

Definition at line 1012 of file GLPK.cs.

◆ glp_ios_best_node()

static int org.gnu.glpk.GLPK.glp_ios_best_node ( glp_tree  T)
inlinestatic

glp_ios_best_node - find active subproblem with best local bound .

SYNOPSIS

int glp_ios_best_node(glp_tree *tree);

RETURNS

The routine glp_ios_best_node returns the reference number of the active subproblem, whose local bound is best (i.e. smallest in case of minimization or largest in case of maximization). However, if the tree is empty, the routine returns zero.

COMMENTS

The best local bound is an lower (minimization) or upper (maximization) bound for integer optimal solution to the original MIP problem.

Definition at line 2186 of file GLPK.cs.

◆ glp_ios_branch_upon()

static void org.gnu.glpk.GLPK.glp_ios_branch_upon ( glp_tree  T,
int  j,
int  sel 
)
inlinestatic

glp_ios_branch_upon - choose variable to branch upon .

SYNOPSIS

void glp_ios_branch_upon(glp_tree *tree, int j, int sel);

DESCRIPTION

The routine glp_ios_branch_upon can be called from the user-defined callback routine in response to the reason GLP_IBRANCH to choose a branching variable, whose ordinal number is j. Should note that only variables, for which the routine glp_ios_can_branch returns non-zero, can be used to branch upon.

The parameter sel is a flag that indicates which branch (subproblem) should be selected next to continue the search:

GLP_DN_BRNCH - select down-branch; GLP_UP_BRNCH - select up-branch; GLP_NO_BRNCH - use general selection technique.

Definition at line 2300 of file GLPK.cs.

◆ glp_ios_can_branch()

static int org.gnu.glpk.GLPK.glp_ios_can_branch ( glp_tree  T,
int  j 
)
inlinestatic

glp_ios_can_branch - check if can branch upon specified variable .

SYNOPSIS

int glp_ios_can_branch(glp_tree *tree, int j);

RETURNS

If j-th variable (column) can be used to branch upon, the routine glp_ios_can_branch returns non-zero, otherwise zero.

Definition at line 2284 of file GLPK.cs.

◆ glp_ios_curr_node()

static int org.gnu.glpk.GLPK.glp_ios_curr_node ( glp_tree  T)
inlinestatic

glp_ios_curr_node - determine current active subproblem .

SYNOPSIS

int glp_ios_curr_node(glp_tree *tree);

RETURNS

The routine glp_ios_curr_node returns the reference number of the current active subproblem. However, if the current subproblem does not exist, the routine returns zero.

Definition at line 2092 of file GLPK.cs.

◆ glp_ios_get_prob()

static glp_prob org.gnu.glpk.GLPK.glp_ios_get_prob ( glp_tree  T)
inlinestatic

glp_ios_get_prob - access the problem object .

SYNOPSIS

glp_prob *glp_ios_get_prob(glp_tree *tree);

DESCRIPTION

The routine glp_ios_get_prob can be called from the user-defined callback routine to access the problem object, which is used by the MIP solver. It is the original problem object passed to the routine glp_intopt if the MIP presolver is not used; otherwise it is an internal problem object built by the presolver. If the current subproblem exists, LP segment of the problem object corresponds to its LP relaxation.

RETURNS

The routine glp_ios_get_prob returns a pointer to the problem object used by the MIP solver.

Definition at line 2060 of file GLPK.cs.

◆ glp_ios_heur_sol()

static int org.gnu.glpk.GLPK.glp_ios_heur_sol ( glp_tree  T,
SWIGTYPE_p_double  x 
)
inlinestatic

glp_ios_heur_sol - provide solution found by heuristic .

SYNOPSIS

int glp_ios_heur_sol(glp_tree *tree, const double x[]);

DESCRIPTION

The routine glp_ios_heur_sol can be called from the user-defined callback routine in response to the reason GLP_IHEUR to provide an integer feasible solution found by a primal heuristic.

Primal values of all variables (columns) found by the heuristic should be placed in locations x[1], ..., x[n], where n is the number of columns in the original problem object. Note that the routine glp_ios_heur_sol does not check primal feasibility of the solution provided.

Using the solution passed in the array x the routine computes value of the objective function. If the objective value is better than the best known integer feasible solution, the routine computes values of auxiliary variables (rows) and stores all solution components in the problem object.

RETURNS

If the provided solution is accepted, the routine glp_ios_heur_sol returns zero. Otherwise, if the provided solution is rejected, the routine returns non-zero.

Definition at line 2330 of file GLPK.cs.

◆ glp_ios_mip_gap()

static double org.gnu.glpk.GLPK.glp_ios_mip_gap ( glp_tree  T)
inlinestatic

glp_ios_mip_gap - compute relative MIP gap .

SYNOPSIS

double glp_ios_mip_gap(glp_tree *tree);

DESCRIPTION

The routine glp_ios_mip_gap computes the relative MIP gap with the following formula:

gap = |best_mip - best_bnd| / (|best_mip| + DBL_EPSILON),

where best_mip is the best integer feasible solution found so far, best_bnd is the best (global) bound. If no integer feasible solution has been found yet, gap is set to DBL_MAX.

RETURNS

The routine glp_ios_mip_gap returns the relative MIP gap.

Definition at line 2204 of file GLPK.cs.

◆ glp_ios_next_node()

static int org.gnu.glpk.GLPK.glp_ios_next_node ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_next_node - determine next active subproblem .

SYNOPSIS

int glp_ios_next_node(glp_tree *tree, int p);

RETURNS

If the parameter p is zero, the routine glp_ios_next_node returns the reference number of the first active subproblem. However, if the tree is empty, zero is returned.

If the parameter p is not zero, it must specify the reference number of some active subproblem, in which case the routine returns the reference number of the next active subproblem. However, if there is no next active subproblem in the list, zero is returned.

All subproblems in the active list are ordered chronologically, i.e. subproblem A precedes subproblem B if A was created before B.

Definition at line 2108 of file GLPK.cs.

◆ glp_ios_node_bound()

static double org.gnu.glpk.GLPK.glp_ios_node_bound ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_node_bound - determine subproblem local bound .

SYNOPSIS

double glp_ios_node_bound(glp_tree *tree, int p);

RETURNS

The routine glp_ios_node_bound returns the local bound for (active or inactive) subproblem, whose reference number is p.

COMMENTS

The local bound for subproblem p is an lower (minimization) or upper (maximization) bound for integer optimal solution to this subproblem (not to the original problem). This bound is local in the sense that only subproblems in the subtree rooted at node p cannot have better integer feasible solutions.

On creating a subproblem (due to the branching step) its local bound is inherited from its parent and then may get only stronger (never weaker). For the root subproblem its local bound is initially set to -DBL_MAX (minimization) or +DBL_MAX (maximization) and then improved as the root LP relaxation has been solved.

Note that the local bound is not necessarily the optimal objective value to corresponding LP relaxation; it may be stronger.

Definition at line 2170 of file GLPK.cs.

◆ glp_ios_node_data()

static SWIGTYPE_p_void org.gnu.glpk.GLPK.glp_ios_node_data ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_node_data - access subproblem application-specific data .

SYNOPSIS

void *glp_ios_node_data(glp_tree *tree, int p);

DESCRIPTION

The routine glp_ios_node_data allows the application accessing a memory block allocated for the subproblem (which may be active or inactive), whose reference number is p.

The size of the block is defined by the control parameter cb_size passed to the routine glp_intopt. The block is initialized by binary zeros on creating corresponding subproblem, and its contents is kept until the subproblem will be removed from the tree.

The application may use these memory blocks to store specific data for each subproblem.

RETURNS

The routine glp_ios_node_data returns a pointer to the memory block for the specified subproblem. Note that if cb_size = 0, the routine returns a null pointer.

Definition at line 2222 of file GLPK.cs.

◆ glp_ios_node_level()

static int org.gnu.glpk.GLPK.glp_ios_node_level ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_node_level - determine subproblem level .

SYNOPSIS

int glp_ios_node_level(glp_tree *tree, int p);

RETURNS

The routine glp_ios_node_level returns the level of the subproblem, whose reference number is p, in the branch-and-bound tree. (The root subproblem has level 0, and the level of any other subproblem is the level of its parent plus one.)

Definition at line 2152 of file GLPK.cs.

◆ glp_ios_prev_node()

static int org.gnu.glpk.GLPK.glp_ios_prev_node ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_prev_node - determine previous active subproblem .

SYNOPSIS

int glp_ios_prev_node(glp_tree *tree, int p);

RETURNS

If the parameter p is zero, the routine glp_ios_prev_node returns the reference number of the last active subproblem. However, if the tree is empty, zero is returned.

If the parameter p is not zero, it must specify the reference number of some active subproblem, in which case the routine returns the reference number of the previous active subproblem. However, if there is no previous active subproblem in the list, zero is returned.

All subproblems in the active list are ordered chronologically, i.e. subproblem A precedes subproblem B if A was created before B.

Definition at line 2124 of file GLPK.cs.

◆ glp_ios_reason()

static int org.gnu.glpk.GLPK.glp_ios_reason ( glp_tree  T)
inlinestatic

glp_ios_reason - determine reason for calling the callback routine .

SYNOPSIS

glp_ios_reason(glp_tree *tree);

RETURNS

The routine glp_ios_reason returns a code, which indicates why the user-defined callback routine is being called.

Definition at line 2044 of file GLPK.cs.

◆ glp_ios_row_attr()

static void org.gnu.glpk.GLPK.glp_ios_row_attr ( glp_tree  T,
int  i,
glp_attr  attr 
)
inlinestatic

glp_ios_row_attr - retrieve additional row attributes .

SYNOPSIS

void glp_ios_row_attr(glp_tree *tree, int i, glp_attr *attr);

DESCRIPTION

The routine glp_ios_row_attr retrieves additional attributes of row i and stores them in the structure glp_attr.

Definition at line 2237 of file GLPK.cs.

◆ glp_ios_select_node()

static void org.gnu.glpk.GLPK.glp_ios_select_node ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_select_node - select subproblem to continue the search .

SYNOPSIS

void glp_ios_select_node(glp_tree *tree, int p);

DESCRIPTION

The routine glp_ios_select_node can be called from the user-defined callback routine in response to the reason GLP_ISELECT to select an active subproblem, whose reference number is p. The search will be continued from the subproblem selected.

Definition at line 2313 of file GLPK.cs.

◆ glp_ios_terminate()

static void org.gnu.glpk.GLPK.glp_ios_terminate ( glp_tree  T)
inlinestatic

glp_ios_terminate - terminate the solution process.

SYNOPSIS

void glp_ios_terminate(glp_tree *tree);

DESCRIPTION

The routine glp_ios_terminate sets a flag indicating that the MIP solver should prematurely terminate the search.

Definition at line 2344 of file GLPK.cs.

◆ glp_ios_tree_size()

static void org.gnu.glpk.GLPK.glp_ios_tree_size ( glp_tree  T,
SWIGTYPE_p_int  a_cnt,
SWIGTYPE_p_int  n_cnt,
SWIGTYPE_p_int  t_cnt 
)
inlinestatic

glp_ios_tree_size - determine size of the branch-and-bound tree .

SYNOPSIS

void glp_ios_tree_size(glp_tree *tree, int *a_cnt, int *n_cnt, int *t_cnt);

DESCRIPTION

The routine glp_ios_tree_size stores the following three counts which characterize the current size of the branch-and-bound tree:

a_cnt is the current number of active nodes, i.e. the current size of the active list;

n_cnt is the current number of all (active and inactive) nodes;

t_cnt is the total number of nodes including those which have been already removed from the tree. This count is increased whenever a new node appears in the tree and never decreased.

If some of the parameters a_cnt, n_cnt, t_cnt is a null pointer, the corresponding count is not stored.

Definition at line 2079 of file GLPK.cs.

◆ glp_ios_up_node()

static int org.gnu.glpk.GLPK.glp_ios_up_node ( glp_tree  T,
int  p 
)
inlinestatic

glp_ios_up_node - determine parent subproblem .

SYNOPSIS

int glp_ios_up_node(glp_tree *tree, int p);

RETURNS

The parameter p must specify the reference number of some (active or inactive) subproblem, in which case the routine iet_get_up_node returns the reference number of its parent subproblem. However, if the specified subproblem is the root of the tree and, therefore, has no parent, the routine returns zero.

Definition at line 2138 of file GLPK.cs.

◆ glp_ipt_col_dual()

static double org.gnu.glpk.GLPK.glp_ipt_col_dual ( glp_prob  P,
int  j 
)
inlinestatic

glp_ipt_col_dual - retrieve column dual value (interior point) .

SYNOPSIS

double glp_ipt_col_dual(glp_prob *lp, int j);

RETURNS

The routine glp_ipt_col_dual returns dual value (i.e. reduced cost) of the structural variable associated with j-th column.

Definition at line 1297 of file GLPK.cs.

◆ glp_ipt_col_prim()

static double org.gnu.glpk.GLPK.glp_ipt_col_prim ( glp_prob  P,
int  j 
)
inlinestatic

glp_ipt_col_prim - retrieve column primal value (interior point) .

SYNOPSIS

double glp_ipt_col_prim(glp_prob *lp, int j);

RETURNS

The routine glp_ipt_col_prim returns primal value of the structural variable associated with j-th column.

Definition at line 1283 of file GLPK.cs.

◆ glp_ipt_obj_val()

static double org.gnu.glpk.GLPK.glp_ipt_obj_val ( glp_prob  P)
inlinestatic

glp_ipt_obj_val - retrieve objective value (interior point) .

SYNOPSIS

double glp_ipt_obj_val(glp_prob *lp);

RETURNS

The routine glp_ipt_obj_val returns value of the objective function for interior-point solution.

Definition at line 1241 of file GLPK.cs.

◆ glp_ipt_row_dual()

static double org.gnu.glpk.GLPK.glp_ipt_row_dual ( glp_prob  P,
int  i 
)
inlinestatic

glp_ipt_row_dual - retrieve row dual value (interior point) .

SYNOPSIS

double glp_ipt_row_dual(glp_prob *lp, int i);

RETURNS

The routine glp_ipt_row_dual returns dual value (i.e. reduced cost) of the auxiliary variable associated with i-th row.

Definition at line 1269 of file GLPK.cs.

◆ glp_ipt_row_prim()

static double org.gnu.glpk.GLPK.glp_ipt_row_prim ( glp_prob  P,
int  i 
)
inlinestatic

glp_ipt_row_prim - retrieve row primal value (interior point) .

SYNOPSIS

double glp_ipt_row_prim(glp_prob *lp, int i);

RETURNS

The routine glp_ipt_row_prim returns primal value of the auxiliary variable associated with i-th row.

Definition at line 1255 of file GLPK.cs.

◆ glp_ipt_status()

static int org.gnu.glpk.GLPK.glp_ipt_status ( glp_prob  P)
inlinestatic

glp_ipt_status - retrieve status of interior-point solution .

SYNOPSIS

int glp_ipt_status(glp_prob *lp);

RETURNS

The routine glp_ipt_status reports the status of solution found by the interior-point solver as follows:

GLP_UNDEF - interior-point solution is undefined; GLP_OPT - interior-point solution is optimal; GLP_INFEAS - interior-point solution is infeasible; GLP_NOFEAS - no feasible solution exists.

Definition at line 1227 of file GLPK.cs.

◆ glp_load_matrix()

static void org.gnu.glpk.GLPK.glp_load_matrix ( glp_prob  P,
int  ne,
SWIGTYPE_p_int  ia,
SWIGTYPE_p_int  ja,
SWIGTYPE_p_double  ar 
)
inlinestatic

glp_load_matrix - load (replace) the whole constraint matrix .

SYNOPSIS

void glp_load_matrix(glp_prob *lp, int ne, const int ia[], const int ja[], const double ar[]);

DESCRIPTION

The routine glp_load_matrix loads the constraint matrix passed in the arrays ia, ja, and ar into the specified problem object. Before loading the current contents of the constraint matrix is destroyed.

Constraint coefficients (elements of the constraint matrix) must be specified as triplets (ia[k], ja[k], ar[k]) for k = 1, ..., ne, where ia[k] is the row index, ja[k] is the column index, ar[k] is a numeric value of corresponding constraint coefficient. The parameter ne specifies the total number of (non-zero) elements in the matrix to be loaded. Coefficients with identical indices are not allowed. Zero coefficients are allowed, however, they are not stored in the constraint matrix.

If the parameter ne is zero, the parameters ia, ja, and ar can be specified as NULL.

Definition at line 430 of file GLPK.cs.

◆ glp_maxflow_lp()

static void org.gnu.glpk.GLPK.glp_maxflow_lp ( glp_prob  P,
glp_graph  G,
int  names,
int  s,
int  t,
int  a_cap 
)
inlinestatic

glp_maxflow_lp - convert maximum flow problem to LP .

SYNOPSIS

void glp_maxflow_lp(glp_prob *lp, glp_graph *G, int names, int s, int t, int a_cap);

DESCRIPTION

The routine glp_maxflow_lp builds an LP problem, which corresponds to the maximum flow problem on the specified network G.

Definition at line 3069 of file GLPK.cs.

◆ glp_mem_limit()

static void org.gnu.glpk.GLPK.glp_mem_limit ( int  limit)
inlinestatic

glp_mem_limit - set memory usage limit .

SYNOPSIS

void glp_mem_limit(int limit);

DESCRIPTION

The routine glp_mem_limit limits the amount of memory available for dynamic allocation (in GLPK routines) to limit megabytes.

Definition at line 2815 of file GLPK.cs.

◆ glp_mem_usage()

static void org.gnu.glpk.GLPK.glp_mem_usage ( SWIGTYPE_p_int  count,
SWIGTYPE_p_int  cpeak,
SWIGTYPE_p_size_t  total,
SWIGTYPE_p_size_t  tpeak 
)
inlinestatic

glp_mem_usage - get memory usage information .

SYNOPSIS

void glp_mem_usage(int *count, int *cpeak, size_t *total, size_t *tpeak);

DESCRIPTION

The routine glp_mem_usage reports some information about utilization of the memory by GLPK routines. Information is stored to locations specified by corresponding parameters (see below). Any parameter can be specified as NULL, in which case its value is not stored.

*count is the number of the memory blocks currently allocated by the routines glp_malloc and glp_calloc (one call to glp_malloc or glp_calloc results in allocating one memory block).

*cpeak is the peak value of *count reached since the initialization of the GLPK library environment.

*total is the total amount, in bytes, of the memory blocks currently allocated by the routines glp_malloc and glp_calloc.

*tpeak is the peak value of *total reached since the initialization of the GLPK library envirionment.

Definition at line 2832 of file GLPK.cs.

◆ glp_mincost_lp()

static void org.gnu.glpk.GLPK.glp_mincost_lp ( glp_prob  P,
glp_graph  G,
int  names,
int  v_rhs,
int  a_low,
int  a_cap,
int  a_cost 
)
inlinestatic

glp_mincost_lp - convert minimum cost flow problem to LP .

SYNOPSIS

void glp_mincost_lp(glp_prob *lp, glp_graph *G, int names, int v_rhs, int a_low, int a_cap, int a_cost);

DESCRIPTION

The routine glp_mincost_lp builds an LP problem, which corresponds to the minimum cost flow problem on the specified network G.

Definition at line 3038 of file GLPK.cs.

◆ glp_mip_col_val()

static double org.gnu.glpk.GLPK.glp_mip_col_val ( glp_prob  P,
int  j 
)
inlinestatic

glp_mip_col_val - retrieve column value (MIP solution) .

SYNOPSIS

double glp_mip_col_val(glp_prob *mip, int j);

RETURNS

The routine glp_mip_col_val returns value of the structural variable associated with j-th column.

Definition at line 1434 of file GLPK.cs.

◆ glp_mip_obj_val()

static double org.gnu.glpk.GLPK.glp_mip_obj_val ( glp_prob  P)
inlinestatic

glp_mip_obj_val - retrieve objective value (MIP solution) .

SYNOPSIS

double glp_mip_obj_val(glp_prob *mip);

RETURNS

The routine glp_mip_obj_val returns value of the objective function for MIP solution.

Definition at line 1406 of file GLPK.cs.

◆ glp_mip_row_val()

static double org.gnu.glpk.GLPK.glp_mip_row_val ( glp_prob  P,
int  i 
)
inlinestatic

glp_mip_row_val - retrieve row value (MIP solution) .

SYNOPSIS

double glp_mip_row_val(glp_prob *mip, int i);

RETURNS

The routine glp_mip_row_val returns value of the auxiliary variable associated with i-th row.

Definition at line 1420 of file GLPK.cs.

◆ glp_mip_status()

static int org.gnu.glpk.GLPK.glp_mip_status ( glp_prob  P)
inlinestatic

glp_mip_status - retrieve status of MIP solution .

SYNOPSIS

int glp_mip_status(glp_prob *mip);

RETURNS

The routine lpx_mip_status reports the status of MIP solution found by the branch-and-bound solver as follows:

GLP_UNDEF - MIP solution is undefined; GLP_OPT - MIP solution is integer optimal; GLP_FEAS - MIP solution is integer feasible but its optimality (or non-optimality) has not been proven, perhaps due to premature termination of the search; GLP_NOFEAS - problem has no integer feasible solution (proven by the solver).

Definition at line 1392 of file GLPK.cs.

◆ glp_open_tee()

static int org.gnu.glpk.GLPK.glp_open_tee ( string  name)
inlinestatic

glp_open_tee - start copying terminal output to text file .

SYNOPSIS

int glp_open_tee(const char *name);

DESCRIPTION

The routine glp_open_tee starts copying all the terminal output to an output text file, whose name is specified by the character string name.

RETURNS

0 - operation successful 1 - copying terminal output is already active 2 - unable to create output file

Definition at line 2690 of file GLPK.cs.

◆ glp_prim_rtest()

static int org.gnu.glpk.GLPK.glp_prim_rtest ( glp_prob  P,
int  len,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val,
int  dir,
double  eps 
)
inlinestatic

glp_prim_rtest - perform primal ratio test .

SYNOPSIS

int glp_prim_rtest(glp_prob *P, int len, const int ind[], const double val[], int dir, double eps);

DESCRIPTION

The routine glp_prim_rtest performs the primal ratio test using an explicitly specified column of the simplex table.

The current basic solution associated with the LP problem object must be primal feasible.

The explicitly specified column of the simplex table shows how the basic variables xB depend on some non-basic variable x (which is not necessarily presented in the problem object):

xB[1] = ... + alfa[1] * x + ... xB[2] = ... + alfa[2] * x + ... (*) . . . . . . . . xB[m] = ... + alfa[m] * x + ...

The column (*) is specifed on entry to the routine using the sparse format. Ordinal numbers of basic variables xB[i] should be placed in locations ind[1], ..., ind[len], where ordinal number 1 to m denote auxiliary variables, and ordinal numbers m+1 to m+n denote structural variables. The corresponding non-zero coefficients alfa[i] should be placed in locations val[1], ..., val[len]. The arrays ind and val are not changed on exit.

The parameter dir specifies direction in which the variable x changes on entering the basis: +1 means increasing, -1 means decreasing.

The parameter eps is an absolute tolerance (small positive number) used by the routine to skip small alfa[j] of the row (*).

The routine determines which basic variable (among specified in ind[1], ..., ind[len]) should leave the basis in order to keep primal feasibility.

RETURNS

The routine glp_prim_rtest returns the index piv in the arrays ind and val corresponding to the pivot element chosen, 1 <= piv <= len. If the adjacent basic solution is primal unbounded and therefore the choice cannot be made, the routine returns zero.

COMMENTS

If the non-basic variable x is presented in the LP problem object, the column (*) can be computed with the routine glp_eval_tab_col; otherwise it can be computed with the routine glp_transform_col.

Definition at line 1925 of file GLPK.cs.

◆ glp_printf()

static void org.gnu.glpk.GLPK.glp_printf ( string  fmt)
inlinestatic

glp_printf - write formatted output on terminal .

SYNOPSIS

void glp_printf(const char *fmt, ...);

DESCRIPTION

The routine glp_printf uses the format control string fmt to format its parameters and writes the formatted output on the terminal.

Definition at line 2629 of file GLPK.cs.

◆ glp_puts()

static void org.gnu.glpk.GLPK.glp_puts ( string  s)
inlinestatic

glp_puts - write string on terminal .

SYNOPSIS

void glp_puts(const char *s);

The routine glp_puts writes the string s on the terminal.

Definition at line 2616 of file GLPK.cs.

◆ glp_read_asnprob()

static int org.gnu.glpk.GLPK.glp_read_asnprob ( glp_graph  G,
int  v_set,
int  a_cost,
string  fname 
)
inlinestatic

glp_read_asnprob - read assignment problem data in DIMACS format .

SYNOPSIS

int glp_read_asnprob(glp_graph *G, int v_set, int a_cost, const char *fname);

DESCRIPTION

The routine glp_read_asnprob reads assignment problem data in DIMACS format from a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3225 of file GLPK.cs.

◆ glp_read_ccdata()

static int org.gnu.glpk.GLPK.glp_read_ccdata ( glp_graph  G,
int  v_wgt,
string  fname 
)
inlinestatic

glp_read_ccdata - read graph in DIMACS clique/coloring format .

SYNOPSIS

int glp_read_ccdata(glp_graph *G, int v_wgt, const char *fname);

DESCRIPTION

The routine glp_read_ccdata reads an (undirected) graph in DIMACS clique/coloring format from a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3257 of file GLPK.cs.

◆ glp_read_graph()

static int org.gnu.glpk.GLPK.glp_read_graph ( glp_graph  G,
string  fname 
)
inlinestatic

glp_read_graph - read graph from plain text file .

SYNOPSIS

int glp_read_graph(glp_graph *G, const char *fname);

DESCRIPTION

The routine glp_read_graph reads a graph from a plain text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3008 of file GLPK.cs.

◆ glp_read_ipt()

static int org.gnu.glpk.GLPK.glp_read_ipt ( glp_prob  P,
string  fname 
)
inlinestatic

glp_read_ipt - read interior-point solution from text file .

SYNOPSIS

int glp_read_ipt(glp_prob *lp, const char *fname);

DESCRIPTION

The routine glp_read_ipt reads interior-point solution from a text file whose name is specified by the parameter fname into the problem object.

For the file format see description of the routine glp_write_ipt.

RETURNS

On success the routine returns zero, otherwise non-zero.

Definition at line 1523 of file GLPK.cs.

◆ glp_read_maxflow()

static int org.gnu.glpk.GLPK.glp_read_maxflow ( glp_graph  G,
SWIGTYPE_p_int  s,
SWIGTYPE_p_int  t,
int  a_cap,
string  fname 
)
inlinestatic

glp_read_maxflow - read maximum flow problem data in DIMACS format .

SYNOPSIS

int glp_read_maxflow(glp_graph *G, int *s, int *t, int a_cap, const char *fname);

DESCRIPTION

The routine glp_read_maxflow reads maximum flow problem data in DIMACS format from a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3193 of file GLPK.cs.

◆ glp_read_mincost()

static int org.gnu.glpk.GLPK.glp_read_mincost ( glp_graph  G,
int  v_rhs,
int  a_low,
int  a_cap,
int  a_cost,
string  fname 
)
inlinestatic

glp_read_mincost - read min-cost flow problem data in DIMACS format .

SYNOPSIS

int glp_read_mincost(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, const char *fname);

DESCRIPTION

The routine glp_read_mincost reads minimum cost flow problem data in DIMACS format from a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3161 of file GLPK.cs.

◆ glp_read_mip()

static int org.gnu.glpk.GLPK.glp_read_mip ( glp_prob  P,
string  fname 
)
inlinestatic

glp_read_mip - read MIP solution from text file .

SYNOPSIS

int glp_read_mip(glp_prob *mip, const char *fname);

DESCRIPTION

The routine glp_read_mip reads MIP solution from a text file whose name is specified by the parameter fname into the problem object.

For the file format see description of the routine glp_write_mip.

RETURNS

On success the routine returns zero, otherwise non-zero.

Definition at line 1569 of file GLPK.cs.

◆ glp_read_prob()

static int org.gnu.glpk.GLPK.glp_read_prob ( glp_prob  P,
int  flags,
string  fname 
)
inlinestatic

glp_read_prob - read problem data in GLPK format .

SYNOPSIS

int glp_read_prob(glp_prob *P, int flags, const char *fname);

The routine glp_read_prob reads problem data in GLPK LP/MIP format from a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 2421 of file GLPK.cs.

◆ glp_read_sol()

static int org.gnu.glpk.GLPK.glp_read_sol ( glp_prob  P,
string  fname 
)
inlinestatic

glp_read_sol - read basic solution from text file .

SYNOPSIS

int glp_read_sol(glp_prob *lp, const char *fname);

DESCRIPTION

The routine glp_read_sol reads basic solution from a text file whose name is specified by the parameter fname into the problem object.

For the file format see description of the routine glp_write_sol.

RETURNS

On success the routine returns zero, otherwise non-zero.

Definition at line 1468 of file GLPK.cs.

◆ glp_scale_prob()

static void org.gnu.glpk.GLPK.glp_scale_prob ( glp_prob  P,
int  flags 
)
inlinestatic

glp_scale_prob - scale problem data .

SYNOPSIS

void glp_scale_prob(glp_prob *lp, int flags);

DESCRIPTION

The routine glp_scale_prob performs automatic scaling of problem data for the specified problem object.

The parameter flags specifies scaling options used by the routine. Options can be combined with the bitwise OR operator and may be the following:

GLP_SF_GM perform geometric mean scaling; GLP_SF_EQ perform equilibration scaling; GLP_SF_2N round scale factors to nearest power of two; GLP_SF_SKIP skip scaling, if the problem is well scaled.

The parameter flags may be specified as GLP_SF_AUTO, in which case the routine chooses scaling options automatically.

Definition at line 899 of file GLPK.cs.

◆ glp_set_bfcp()

static void org.gnu.glpk.GLPK.glp_set_bfcp ( glp_prob  P,
glp_bfcp  parm 
)
inlinestatic

glp_set_bfcp - change basis factorization control parameters .

SYNOPSIS

void glp_set_bfcp(glp_prob *lp, const glp_bfcp *parm);

DESCRIPTION

The routine glp_set_bfcp changes control parameters, which are used by internal GLPK routines in computing and updating the basis factorization associated with the specified problem object.

New values of the control parameters should be passed in a structure glp_bfcp, which the parameter parm points to.

The parameter parm can be specified as NULL, in which case all control parameters are reset to their default values.

Definition at line 1656 of file GLPK.cs.

◆ glp_set_col_bnds()

static void org.gnu.glpk.GLPK.glp_set_col_bnds ( glp_prob  P,
int  j,
int  type,
double  lb,
double  ub 
)
inlinestatic

glp_set_col_bnds - set (change) column bounds .

SYNOPSIS

void glp_set_col_bnds(glp_prob *lp, int j, int type, double lb, double ub);

DESCRIPTION

The routine glp_set_col_bnds sets (changes) the type and bounds of j-th column (structural variable) of the specified problem object.

Parameters type, lb, and ub specify the type, lower bound, and upper bound, respectively, as follows:

Type Bounds Comments

GLP_FR -inf < x < +inf Free variable GLP_LO lb <= x < +inf Variable with lower bound GLP_UP -inf < x <= ub Variable with upper bound GLP_DB lb <= x <= ub Double-bounded variable GLP_FX x = lb Fixed variable

where x is the structural variable associated with j-th column.

If the column has no lower bound, the parameter lb is ignored. If the column has no upper bound, the parameter ub is ignored. If the column is of fixed type, only the parameter lb is used while the parameter ub is ignored.

Definition at line 370 of file GLPK.cs.

◆ glp_set_col_kind()

static void org.gnu.glpk.GLPK.glp_set_col_kind ( glp_prob  P,
int  j,
int  kind 
)
inlinestatic

glp_set_col_kind - set (change) column kind .

SYNOPSIS

void glp_set_col_kind(glp_prob *mip, int j, int kind);

DESCRIPTION

The routine glp_set_col_kind sets (changes) the kind of j-th column (structural variable) as specified by the parameter kind:

GLP_CV - continuous variable; GLP_IV - integer variable; GLP_BV - binary variable.

Definition at line 1312 of file GLPK.cs.

◆ glp_set_col_name()

static void org.gnu.glpk.GLPK.glp_set_col_name ( glp_prob  P,
int  j,
string  name 
)
inlinestatic

glp_set_col_name - assign (change) column name .

SYNOPSIS

void glp_set_col_name(glp_prob *lp, int j, const char *name);

DESCRIPTION

The routine glp_set_col_name assigns a given symbolic name (1 up to 255 characters) to j-th column (structural variable) of the specified problem object.

If the parameter name is NULL or empty string, the routine erases an existing name of j-th column.

Definition at line 332 of file GLPK.cs.

◆ glp_set_col_stat()

static void org.gnu.glpk.GLPK.glp_set_col_stat ( glp_prob  P,
int  j,
int  stat 
)
inlinestatic

glp_set_col_stat - set (change) column status .

SYNOPSIS

void glp_set_col_stat(glp_prob *lp, int j, int stat);

DESCRIPTION

The routine glp_set_col_stat sets (changes) status of the structural variable associated with j-th column.

The new status of the structural variable should be specified by the parameter stat as follows:

GLP_BS - basic variable; GLP_NL - non-basic variable; GLP_NU - non-basic variable on its upper bound; if the variable is not double-bounded, this means the same as GLP_NL (only in case of this routine); GLP_NF - the same as GLP_NL (only in case of this routine); GLP_NS - the same as GLP_NL (only in case of this routine).

Definition at line 943 of file GLPK.cs.

◆ glp_set_graph_name()

static void org.gnu.glpk.GLPK.glp_set_graph_name ( glp_graph  G,
string  name 
)
inlinestatic

glp_set_graph_name - assign (change) graph name .

SYNOPSIS

void glp_set_graph_name(glp_graph *G, const char *name);

DESCRIPTION

The routine glp_set_graph_name assigns a symbolic name specified by the character string name (1 to 255 chars) to the graph.

If the parameter name is NULL or an empty string, the routine erases the existing symbolic name of the graph.

Definition at line 2878 of file GLPK.cs.

◆ glp_set_mat_col()

static void org.gnu.glpk.GLPK.glp_set_mat_col ( glp_prob  P,
int  j,
int  len,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_set_mat_col - set (replace) column of the constraint matrix .

SYNOPSIS

void glp_set_mat_col(glp_prob *lp, int j, int len, const int ind[], const double val[]);

DESCRIPTION

The routine glp_set_mat_col stores (replaces) the contents of j-th column of the constraint matrix of the specified problem object.

Row indices and numeric values of new column elements must be placed in locations ind[1], ..., ind[len] and val[1], ..., val[len], where 0 <= len <= m is the new length of j-th column, m is the current number of rows in the problem object. Elements with identical column indices are not allowed. Zero elements are allowed, but they are not stored in the constraint matrix.

If the parameter len is zero, the parameters ind and/or val can be specified as NULL.

Definition at line 415 of file GLPK.cs.

◆ glp_set_mat_row()

static void org.gnu.glpk.GLPK.glp_set_mat_row ( glp_prob  P,
int  i,
int  len,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_set_mat_row - set (replace) row of the constraint matrix .

SYNOPSIS

void glp_set_mat_row(glp_prob *lp, int i, int len, const int ind[], const double val[]);

DESCRIPTION

The routine glp_set_mat_row stores (replaces) the contents of i-th row of the constraint matrix of the specified problem object.

Column indices and numeric values of new row elements must be placed in locations ind[1], ..., ind[len] and val[1], ..., val[len], where 0 <= len <= n is the new length of i-th row, n is the current number of columns in the problem object. Elements with identical column indices are not allowed. Zero elements are allowed, but they are not stored in the constraint matrix.

If the parameter len is zero, the parameters ind and/or val can be specified as NULL.

Definition at line 400 of file GLPK.cs.

◆ glp_set_obj_coef()

static void org.gnu.glpk.GLPK.glp_set_obj_coef ( glp_prob  P,
int  j,
double  coef 
)
inlinestatic

glp_set_obj_coef - set (change) obj.

coefficient or constant term

SYNOPSIS

void glp_set_obj_coef(glp_prob *lp, int j, double coef);

DESCRIPTION

The routine glp_set_obj_coef sets (changes) objective coefficient at j-th column (structural variable) of the specified problem object.

If the parameter j is 0, the routine sets (changes) the constant term ("shift") of the objective function.

Definition at line 385 of file GLPK.cs.

◆ glp_set_obj_dir()

static void org.gnu.glpk.GLPK.glp_set_obj_dir ( glp_prob  P,
int  dir 
)
inlinestatic

glp_set_obj_dir - set (change) optimization direction flag .

SYNOPSIS

void glp_set_obj_dir(glp_prob *lp, int dir);

DESCRIPTION

The routine glp_set_obj_dir sets (changes) optimization direction flag (i.e. "sense" of the objective function) as specified by the parameter dir:

GLP_MIN - minimization; GLP_MAX - maximization.

Definition at line 270 of file GLPK.cs.

◆ glp_set_obj_name()

static void org.gnu.glpk.GLPK.glp_set_obj_name ( glp_prob  P,
string  name 
)
inlinestatic

glp_set_obj_name - assign (change) objective function name .

SYNOPSIS

void glp_set_obj_name(glp_prob *lp, const char *name);

DESCRIPTION

The routine glp_set_obj_name assigns a given symbolic name (1 up to 255 characters) to the objective function of the specified problem object.

If the parameter name is NULL or empty string, the routine erases an existing name of the objective function.

Definition at line 256 of file GLPK.cs.

◆ glp_set_prob_name()

static void org.gnu.glpk.GLPK.glp_set_prob_name ( glp_prob  P,
string  name 
)
inlinestatic

glp_set_prob_name - assign (change) problem name .

SYNOPSIS

void glp_set_prob_name(glp_prob *lp, const char *name);

DESCRIPTION

The routine glp_set_prob_name assigns a given symbolic name (1 up to 255 characters) to the specified problem object.

If the parameter name is NULL or empty string, the routine erases an existing symbolic name of the problem object.

Definition at line 242 of file GLPK.cs.

◆ glp_set_rii()

static void org.gnu.glpk.GLPK.glp_set_rii ( glp_prob  P,
int  i,
double  rii 
)
inlinestatic

glp_set_rii - set (change) row scale factor .

SYNOPSIS

void glp_set_rii(glp_prob *lp, int i, double rii);

DESCRIPTION

The routine glp_set_rii sets (changes) the scale factor r[i,i] for i-th row of the specified problem object.

Definition at line 842 of file GLPK.cs.

◆ glp_set_row_bnds()

static void org.gnu.glpk.GLPK.glp_set_row_bnds ( glp_prob  P,
int  i,
int  type,
double  lb,
double  ub 
)
inlinestatic

glp_set_row_bnds - set (change) row bounds .

SYNOPSIS

void glp_set_row_bnds(glp_prob *lp, int i, int type, double lb, double ub);

DESCRIPTION

The routine glp_set_row_bnds sets (changes) the type and bounds of i-th row (auxiliary variable) of the specified problem object.

Parameters type, lb, and ub specify the type, lower bound, and upper bound, respectively, as follows:

Type Bounds Comments

GLP_FR -inf < x < +inf Free variable GLP_LO lb <= x < +inf Variable with lower bound GLP_UP -inf < x <= ub Variable with upper bound GLP_DB lb <= x <= ub Double-bounded variable GLP_FX x = lb Fixed variable

where x is the auxiliary variable associated with i-th row.

If the row has no lower bound, the parameter lb is ignored. If the row has no upper bound, the parameter ub is ignored. If the row is an equality constraint (i.e. the corresponding auxiliary variable is of fixed type), only the parameter lb is used while the parameter ub is ignored.

Definition at line 351 of file GLPK.cs.

◆ glp_set_row_name()

static void org.gnu.glpk.GLPK.glp_set_row_name ( glp_prob  P,
int  i,
string  name 
)
inlinestatic

glp_set_row_name - assign (change) row name .

SYNOPSIS

void glp_set_row_name(glp_prob *lp, int i, const char *name);

DESCRIPTION

The routine glp_set_row_name assigns a given symbolic name (1 up to 255 characters) to i-th row (auxiliary variable) of the specified problem object.

If the parameter name is NULL or empty string, the routine erases an existing name of i-th row.

Definition at line 318 of file GLPK.cs.

◆ glp_set_row_stat()

static void org.gnu.glpk.GLPK.glp_set_row_stat ( glp_prob  P,
int  i,
int  stat 
)
inlinestatic

glp_set_row_stat - set (change) row status .

SYNOPSIS

void glp_set_row_stat(glp_prob *lp, int i, int stat);

DESCRIPTION

The routine glp_set_row_stat sets (changes) status of the auxiliary variable associated with i-th row.

The new status of the auxiliary variable should be specified by the parameter stat as follows:

GLP_BS - basic variable; GLP_NL - non-basic variable; GLP_NU - non-basic variable on its upper bound; if the variable is not double-bounded, this means the same as GLP_NL (only in case of this routine); GLP_NF - the same as GLP_NL (only in case of this routine); GLP_NS - the same as GLP_NL (only in case of this routine).

Definition at line 928 of file GLPK.cs.

◆ glp_set_sjj()

static void org.gnu.glpk.GLPK.glp_set_sjj ( glp_prob  P,
int  j,
double  sjj 
)
inlinestatic

glp_set sjj - set (change) column scale factor .

SYNOPSIS

void glp_set_sjj(glp_prob *lp, int j, double sjj);

DESCRIPTION

The routine glp_set_sjj sets (changes) the scale factor s[j,j] for j-th column of the specified problem object.

Definition at line 855 of file GLPK.cs.

◆ glp_sort_matrix()

static void org.gnu.glpk.GLPK.glp_sort_matrix ( glp_prob  P)
inlinestatic

glp_sort_matrix - sort elements of the constraint matrix .

SYNOPSIS

void glp_sort_matrix(glp_prob *P);

DESCRIPTION

The routine glp_sort_matrix sorts elements of the constraint matrix rebuilding its row and column linked lists. On exit from the routine the constraint matrix is not changed, however, elements in the row linked lists become ordered by ascending column indices, and the elements in the column linked lists become ordered by ascending row indices.

Definition at line 466 of file GLPK.cs.

◆ glp_std_basis()

static void org.gnu.glpk.GLPK.glp_std_basis ( glp_prob  P)
inlinestatic

glp_std_basis - construct standard initial LP basis .

SYNOPSIS

void glp_std_basis(glp_prob *lp);

DESCRIPTION

The routine glp_std_basis builds the "standard" (trivial) initial basis for the specified problem object.

In the "standard" basis all auxiliary variables are basic, and all structural variables are non-basic.

Definition at line 957 of file GLPK.cs.

◆ glp_strong_comp()

static int org.gnu.glpk.GLPK.glp_strong_comp ( glp_graph  G,
int  v_num 
)
inlinestatic

glp_strong_comp - find all strongly connected components of graph .

SYNOPSIS

int glp_strong_comp(glp_graph *G, int v_num);

DESCRIPTION

The routine glp_strong_comp finds all strongly connected components of the specified graph.

The parameter v_num specifies an offset of the field of type int in the vertex data block, to which the routine stores the number of a strongly connected component containing that vertex. If v_num < 0, no component numbers are stored.

The components are numbered in arbitrary order from 1 to nc, where nc is the total number of components found, 0 <= nc <= |V|. However, the component numbering has the property that for every arc (i->j) in the graph the condition num(i) >= num(j) holds.

RETURNS

The routine returns nc, the total number of components found.

Definition at line 3344 of file GLPK.cs.

◆ glp_term_hook()

static void org.gnu.glpk.GLPK.glp_term_hook ( SWIGTYPE_p_f_p_void_p_q_const__char__int  func,
SWIGTYPE_p_void  info 
)
inlinestatic

glp_term_hook - install hook to intercept terminal output .

SYNOPSIS

void glp_term_hook(int (*func)(void *info, const char *s), void *info);

DESCRIPTION

The routine glp_term_hook installs a user-defined hook routine to intercept all terminal output performed by glpk routines.

This feature can be used to redirect the terminal output to other destination, for example to a file or a text window.

The parameter func specifies the user-defined hook routine. It is called from an internal printing routine, which passes to it two parameters: info and s. The parameter info is a transit pointer, specified in the corresponding call to the routine glp_term_hook; it may be used to pass some information to the hook routine. The parameter s is a pointer to the null terminated character string, which is intended to be written to the terminal. If the hook routine returns zero, the printing routine writes the string s to the terminal in a usual way; otherwise, if the hook routine returns non-zero, no terminal output is performed.

To uninstall the hook routine the parameters func and info should be specified as NULL.

Definition at line 2675 of file GLPK.cs.

Here is the caller graph for this function:

◆ glp_term_out()

static int org.gnu.glpk.GLPK.glp_term_out ( int  flag)
inlinestatic

glp_term_out - enable/disable terminal output .

SYNOPSIS

int glp_term_out(int flag);

DESCRIPTION

Depending on the parameter flag the routine glp_term_out enables or disables terminal output performed by glpk routines:

GLP_ON - enable terminal output; GLP_OFF - disable terminal output.

RETURNS

The routine glp_term_out returns the previous value of the terminal output flag.

Definition at line 2658 of file GLPK.cs.

◆ glp_transform_col()

static int org.gnu.glpk.GLPK.glp_transform_col ( glp_prob  P,
int  len,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_transform_col - transform explicitly specified column .

SYNOPSIS

int glp_transform_col(glp_prob *P, int len, int ind[], double val[]);

DESCRIPTION

The routine glp_transform_col performs the same operation as the routine glp_eval_tab_col with exception that the column to be transformed is specified explicitly as a sparse vector.

The explicitly specified column may be thought as if it were added to the original system of equality constraints:

x[1] = a[1,1]*x[m+1] + ... + a[1,n]*x[m+n] + a[1]*x x[2] = a[2,1]*x[m+1] + ... + a[2,n]*x[m+n] + a[2]*x (1) . . . . . . . . . . . . . . . x[m] = a[m,1]*x[m+1] + ... + a[m,n]*x[m+n] + a[m]*x

where x[i] are auxiliary variables, x[m+j] are structural variables, x is a structural variable for the explicitly specified column, a[i] are constraint coefficients for x.

On entry row indices and numerical values of non-zero elements of the column should be stored in locations ind[1], ..., ind[len] and val[1], ..., val[len], where len is the number of non-zero elements.

This routine uses the system of equality constraints and the current basis in order to express the current basic variables through the structural variable x in (1) (as if the transformed column were added to the problem object and the variable x were non-basic), i.e. the resultant column has the form:

xB[1] = ... + alfa[1]*x xB[2] = ... + alfa[2]*x (2) . . . . . . xB[m] = ... + alfa[m]*x

where xB are basic (auxiliary and structural) variables, m is the number of rows in the problem object.

On exit the routine stores indices and numerical values of non-zero elements of the resultant column (2) in locations ind[1], ..., ind[len'] and val[1], ..., val[len'], where 0 <= len' <= m is the number of non-zero element in the resultant column returned by the routine. Note that indices (numbers) of basic variables stored in the array ind correspond to original ordinal numbers of variables: indices 1 to m mean auxiliary variables and indices m+1 to m+n mean structural ones.

RETURNS

The routine returns len', which is the number of non-zero elements in the resultant column stored in the arrays ind and val.

BACKGROUND

The explicitly specified column (1) is transformed in the same way as any other column of the constraint matrix using the formula:

alfa = inv(B) * a, (3)

where alfa is the resultant column computed by the routine.

Definition at line 1900 of file GLPK.cs.

◆ glp_transform_row()

static int org.gnu.glpk.GLPK.glp_transform_row ( glp_prob  P,
int  len,
SWIGTYPE_p_int  ind,
SWIGTYPE_p_double  val 
)
inlinestatic

glp_transform_row - transform explicitly specified row .

SYNOPSIS

int glp_transform_row(glp_prob *P, int len, int ind[], double val[]);

DESCRIPTION

The routine glp_transform_row performs the same operation as the routine glp_eval_tab_row with exception that the row to be transformed is specified explicitly as a sparse vector.

The explicitly specified row may be thought as a linear form:

x = a[1]*x[m+1] + a[2]*x[m+2] + ... + a[n]*x[m+n], (1)

where x is an auxiliary variable for this row, a[j] are coefficients of the linear form, x[m+j] are structural variables.

On entry column indices and numerical values of non-zero elements of the row should be stored in locations ind[1], ..., ind[len] and val[1], ..., val[len], where len is the number of non-zero elements.

This routine uses the system of equality constraints and the current basis in order to express the auxiliary variable x in (1) through the current non-basic variables (as if the transformed row were added to the problem object and its auxiliary variable were basic), i.e. the resultant row has the form:

x = alfa[1]*xN[1] + alfa[2]*xN[2] + ... + alfa[n]*xN[n], (2)

where xN[j] are non-basic (auxiliary or structural) variables, n is the number of columns in the LP problem object.

On exit the routine stores indices and numerical values of non-zero elements of the resultant row (2) in locations ind[1], ..., ind[len'] and val[1], ..., val[len'], where 0 <= len' <= n is the number of non-zero elements in the resultant row returned by the routine. Note that indices (numbers) of non-basic variables stored in the array ind correspond to original ordinal numbers of variables: indices 1 to m mean auxiliary variables and indices m+1 to m+n mean structural ones.

RETURNS

The routine returns len', which is the number of non-zero elements in the resultant row stored in the arrays ind and val.

BACKGROUND

The explicitly specified row (1) is transformed in the same way as it were the objective function row.

From (1) it follows that:

x = aB * xB + aN * xN, (3)

where xB is the vector of basic variables, xN is the vector of non-basic variables.

The simplex table, which corresponds to the current basis, is:

xB = [-inv(B) * N] * xN. (4)

Therefore substituting xB from (4) to (3) we have:

x = aB * [-inv(B) * N] * xN + aN * xN = (5) = rho * (-N) * xN + aN * xN = alfa * xN,

where:

rho = inv(B') * aB, (6)

and

alfa = aN + rho * (-N) (7)

is the resultant row computed by the routine.

Definition at line 1872 of file GLPK.cs.

◆ glp_unscale_prob()

static void org.gnu.glpk.GLPK.glp_unscale_prob ( glp_prob  P)
inlinestatic

glp_unscale_prob - unscale problem data .

SYNOPSIS

void glp_unscale_prob(glp_prob *lp);

DESCRIPTION

The routine glp_unscale_prob performs unscaling of problem data for the specified problem object.

"Unscaling" means replacing the current scaling matrices R and S by unity matrices that cancels the scaling effect.

Definition at line 913 of file GLPK.cs.

◆ glp_version()

static string org.gnu.glpk.GLPK.glp_version ( )
inlinestatic

glp_version - determine library version .

SYNOPSIS

const char *glp_version(void);

RETURNS

The routine glp_version returns a pointer to a null-terminated character string, which specifies the version of the GLPK library in the form "X.Y", where X is the major version number, and Y is the minor version number, for example, "4.16".

Definition at line 2579 of file GLPK.cs.

◆ glp_vprintf()

static void org.gnu.glpk.GLPK.glp_vprintf ( string  fmt,
SWIGTYPE_p_va_list  arg 
)
inlinestatic

glp_vprintf - write formatted output on terminal .

SYNOPSIS

void glp_vprintf(const char *fmt, va_list arg);

DESCRIPTION

The routine glp_vprintf uses the format control string fmt to format its parameters specified by the list arg and writes the formatted output on the terminal.

Definition at line 2642 of file GLPK.cs.

◆ glp_warm_up()

static int org.gnu.glpk.GLPK.glp_warm_up ( glp_prob  P)
inlinestatic

glp_warm_up - "warm up" LP basis .

SYNOPSIS

int glp_warm_up(glp_prob *P);

DESCRIPTION

The routine glp_warm_up "warms up" the LP basis for the specified problem object using current statuses assigned to rows and columns (that is, to auxiliary and structural variables).

This operation includes computing factorization of the basis matrix (if it does not exist), computing primal and dual components of basic solution, and determining the solution status.

RETURNS

0 The operation has been successfully performed.

GLP_EBADB The basis matrix is invalid, i.e. the number of basic (auxiliary and structural) variables differs from the number of rows in the problem object.

GLP_ESING The basis matrix is singular within the working precision.

GLP_ECOND The basis matrix is ill-conditioned.

Definition at line 1762 of file GLPK.cs.

◆ glp_weak_comp()

static int org.gnu.glpk.GLPK.glp_weak_comp ( glp_graph  G,
int  v_num 
)
inlinestatic

glp_weak_comp - find all weakly connected components of graph .

SYNOPSIS

int glp_weak_comp(glp_graph *G, int v_num);

DESCRIPTION

The routine glp_weak_comp finds all weakly connected components of the specified graph.

The parameter v_num specifies an offset of the field of type int in the vertex data block, to which the routine stores the number of a (weakly) connected component containing that vertex. If v_num < 0, no component numbers are stored.

The components are numbered in arbitrary order from 1 to nc, where nc is the total number of components found, 0 <= nc <= |V|.

RETURNS

The routine returns nc, the total number of components found.

Definition at line 3326 of file GLPK.cs.

◆ glp_write_asnprob()

static int org.gnu.glpk.GLPK.glp_write_asnprob ( glp_graph  G,
int  v_set,
int  a_cost,
string  fname 
)
inlinestatic

glp_write_asnprob - write assignment problem data in DIMACS format .

SYNOPSIS

int glp_write_asnprob(glp_graph *G, int v_set, int a_cost, const char *fname);

DESCRIPTION

The routine glp_write_asnprob writes assignment problem data in DIMACS format to a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3241 of file GLPK.cs.

◆ glp_write_ccdata()

static int org.gnu.glpk.GLPK.glp_write_ccdata ( glp_graph  G,
int  v_wgt,
string  fname 
)
inlinestatic

glp_write_ccdata - write graph in DIMACS clique/coloring format .

SYNOPSIS

int glp_write_ccdata(glp_graph *G, int v_wgt, const char *fname);

DESCRIPTION

The routine glp_write_ccdata writes the specified graph in DIMACS clique/coloring format to a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3273 of file GLPK.cs.

◆ glp_write_graph()

static int org.gnu.glpk.GLPK.glp_write_graph ( glp_graph  G,
string  fname 
)
inlinestatic

glp_write_graph - write graph to plain text file .

SYNOPSIS

int glp_write_graph(glp_graph *G, const char *fname).

DESCRIPTION

The routine glp_write_graph writes the specified graph to a plain text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3024 of file GLPK.cs.

◆ glp_write_ipt()

static int org.gnu.glpk.GLPK.glp_write_ipt ( glp_prob  P,
string  fname 
)
inlinestatic

glp_write_ipt - write interior-point solution to text file .

SYNOPSIS

int glp_write_ipt(glp_prob *lp, const char *fname);

DESCRIPTION

The routine glp_write_ipt writes the current interior-point solution to a text file whose name is specified by the parameter fname. This file can be read back with the routine glp_read_ipt.

RETURNS

On success the routine returns zero, otherwise non-zero.

FILE FORMAT

The file created by the routine glp_write_ipt is a plain text file, which contains the following information:

m n stat obj_val r_prim[1] r_dual[1] . . . r_prim[m] r_dual[m] c_prim[1] c_dual[1] . . . c_prim[n] c_dual[n]

where: m is the number of rows (auxiliary variables); n is the number of columns (structural variables); stat is the solution status (GLP_UNDEF = 1 or GLP_OPT = 5); obj_val is the objective value; r_prim[i], i = 1,...,m, is the primal value of i-th row; r_dual[i], i = 1,...,m, is the dual value of i-th row; c_prim[j], j = 1,...,n, is the primal value of j-th column; c_dual[j], j = 1,...,n, is the dual value of j-th column.

Definition at line 1543 of file GLPK.cs.

◆ glp_write_maxflow()

static int org.gnu.glpk.GLPK.glp_write_maxflow ( glp_graph  G,
int  s,
int  t,
int  a_cap,
string  fname 
)
inlinestatic

glp_write_maxflow - write maximum flow problem data in DIMACS format .

SYNOPSIS

int glp_write_maxflow(glp_graph *G, int s, int t, int a_cap, const char *fname);

DESCRIPTION

The routine glp_write_maxflow writes maximum flow problem data in DIMACS format to a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3209 of file GLPK.cs.

◆ glp_write_mincost()

static int org.gnu.glpk.GLPK.glp_write_mincost ( glp_graph  G,
int  v_rhs,
int  a_low,
int  a_cap,
int  a_cost,
string  fname 
)
inlinestatic

glp_write_mincost - write min-cost flow problem data in DIMACS format .

SYNOPSIS

int glp_write_mincost(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, const char *fname);

DESCRIPTION

The routine glp_write_mincost writes minimum cost flow problem data in DIMACS format to a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 3177 of file GLPK.cs.

◆ glp_write_mip()

static int org.gnu.glpk.GLPK.glp_write_mip ( glp_prob  P,
string  fname 
)
inlinestatic

glp_write_mip - write MIP solution to text file .

SYNOPSIS

int glp_write_mip(glp_prob *mip, const char *fname);

DESCRIPTION

The routine glp_write_mip writes the current MIP solution to a text file whose name is specified by the parameter fname. This file can be read back with the routine glp_read_mip.

RETURNS

On success the routine returns zero, otherwise non-zero.

FILE FORMAT

The file created by the routine glp_write_sol is a plain text file, which contains the following information:

m n stat obj_val r_val[1] . . . r_val[m] c_val[1] . . . c_val[n]

where: m is the number of rows (auxiliary variables); n is the number of columns (structural variables); stat is the solution status (GLP_UNDEF = 1, GLP_FEAS = 2, GLP_NOFEAS = 4, or GLP_OPT = 5); obj_val is the objective value; r_val[i], i = 1,...,m, is the value of i-th row; c_val[j], j = 1,...,n, is the value of j-th column.

Definition at line 1589 of file GLPK.cs.

◆ glp_write_prob()

static int org.gnu.glpk.GLPK.glp_write_prob ( glp_prob  P,
int  flags,
string  fname 
)
inlinestatic

glp_write_prob - write problem data in GLPK format .

SYNOPSIS

int glp_write_prob(glp_prob *P, int flags, const char *fname);

The routine glp_write_prob writes problem data in GLPK LP/MIP format to a text file.

RETURNS

If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.

Definition at line 2436 of file GLPK.cs.

◆ glp_write_sol()

static int org.gnu.glpk.GLPK.glp_write_sol ( glp_prob  P,
string  fname 
)
inlinestatic

glp_write_sol - write basic solution to text file .

SYNOPSIS

int glp_write_sol(glp_prob *lp, const char *fname);

DESCRIPTION

The routine glp_write_sol writes the current basic solution to a text file whose name is specified by the parameter fname. This file can be read back with the routine glp_read_sol.

RETURNS

On success the routine returns zero, otherwise non-zero.

FILE FORMAT

The file created by the routine glp_write_sol is a plain text file, which contains the following information:

m n p_stat d_stat obj_val r_stat[1] r_prim[1] r_dual[1] . . . r_stat[m] r_prim[m] r_dual[m] c_stat[1] c_prim[1] c_dual[1] . . . c_stat[n] c_prim[n] c_dual[n]

where: m is the number of rows (auxiliary variables); n is the number of columns (structural variables); p_stat is the primal status of the basic solution (GLP_UNDEF = 1, GLP_FEAS = 2, GLP_INFEAS = 3, or GLP_NOFEAS = 4); d_stat is the dual status of the basic solution (GLP_UNDEF = 1, GLP_FEAS = 2, GLP_INFEAS = 3, or GLP_NOFEAS = 4); obj_val is the objective value; r_stat[i], i = 1,...,m, is the status of i-th row (GLP_BS = 1, GLP_NL = 2, GLP_NU = 3, GLP_NF = 4, or GLP_NS = 5); r_prim[i], i = 1,...,m, is the primal value of i-th row; r_dual[i], i = 1,...,m, is the dual value of i-th row; c_stat[j], j = 1,...,n, is the status of j-th column (GLP_BS = 1, GLP_NL = 2, GLP_NU = 3, GLP_NF = 4, or GLP_NS = 5); c_prim[j], j = 1,...,n, is the primal value of j-th column; c_dual[j], j = 1,...,n, is the dual value of j-th column.

Definition at line 1488 of file GLPK.cs.

◆ intArray_getitem()

static int org.gnu.glpk.GLPK.intArray_getitem ( SWIGTYPE_p_int  ary,
int  index 
)
inlinestatic

Retrieves an element of an array of int.

BEWARE: The validity of the index is not checked.

Parameters
aryarray
indexindex of the element
Returns
array element

Definition at line 114 of file GLPK.cs.

◆ intArray_setitem()

static void org.gnu.glpk.GLPK.intArray_setitem ( SWIGTYPE_p_int  ary,
int  index,
int  value 
)
inlinestatic

Sets the value of an element of an array of int.

BEWARE: The validity of the index is not checked.

Parameters
aryarray
indexindex of the element
valuenew value

Definition at line 129 of file GLPK.cs.

◆ new_doubleArray()

static SWIGTYPE_p_double org.gnu.glpk.GLPK.new_doubleArray ( int  nelements)
inlinestatic

Creates a new array of double.

The memory is allocated with calloc(). To free the memory you will have to call delete&#95;doubleArray.

An OutOfMemoryError error indicates that the C-runtime heap of the process (not the Java object heap) is full.

Parameters
nelementsnumber of elements
Returns
array

Definition at line 26 of file GLPK.cs.

◆ new_intArray()

static SWIGTYPE_p_int org.gnu.glpk.GLPK.new_intArray ( int  nelements)
inlinestatic

Creates a new array of int.

The memory is allocated with calloc(). To free the memory you will have to call delete&#95;intArray.

An OutOfMemoryError error indicates that the C-runtime heap of the process (not the Java object heap) is full.

Parameters
nelementsnumber of elements
Returns
array

Definition at line 86 of file GLPK.cs.


The documentation for this class was generated from the following file: