get_sensitivity_rhs, get_ptr_sensitivity_rhs, get_dual_solution, get_ptr_dual_solution, get_var_dualresultReturns the sensitivity of the constraints and the variables. unsigned char get_sensitivity_rhs(lprec *lp, REAL *duals, REAL *dualsfrom, REAL *dualstill); unsigned char get_ptr_sensitivity_rhs(lprec *lp, REAL **ptr_duals, REAL **ptr_dualsfrom, REAL **ptr_dualstill); unsigned char get_dual_solution(lprec *lp, REAL *duals); unsigned char get_ptr_dual_solution(lprec *lp, REAL **ptr_duals); REAL get_var_dualresult(lprec *lp, int index); Return Value get_sensitivity_rhs, get_ptr_sensitivity_rhs, get_dual_solution,
get_ptr_dual_solution return TRUE (1) if the operation was successful.
A return value of FALSE (0) indicates an error. Parameters lp Pointer to previously created lp model. See return value of make_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI duals An array that will contain the values of the dual variables aka reduced costs. ptr_duals The address of a pointer that will point to an array that will contain the values of the dual variables aka reduced costs. dualsfrom An array that will contain the values of the lower limits on the dual variables aka reduced costs. ptr_dualsfrom The address of a pointer that will point to an array that will contain the values of the lower limits of the dual variables aka reduced costs. dualstill An array that will contain the values of the upper limits on the dual variables aka reduced costs. ptr_dualstill The address of a pointer that will point to an array that will contain the values of the upper limits of the dual variables aka reduced costs. index The column of the variable for which the reduced cost is required. Note that this is the column number before presolve was done, if active. If index is 0, then the value of the objective function is returned by get_var_dualresult Remarks The get_sensitivity_rhs, get_ptr_sensitivity_rhs functions return
the values of the dual variables aka reduced costs and their limits. Note that get_ptr_sensitivity_rhs and get_ptr_dual_solution return a pointer to memory allocated and maintained by lp_solve. Be careful what you do with it. Don't modify its contents or free the memory. Unexpected behaviour would occur. Also note that this memory pointer is only guaranteed to remain constant until a next lp_solve API call is done. You should call this function again to make sure you have again the correct pointer. Otherwise, this pointer could point to invalid memory. This should not be a problem since this call is very efficient. Example
See Also make_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, is_feasible, get_objective, get_working_objective, get_variables, get_ptr_variables, get_primal_solution, get_ptr_primal_solution, get_var_primalresult, get_sensitivity_obj, get_ptr_sensitivity_obj, get_sensitivity_objex, get_ptr_sensitivity_objex, |