Class: Gnm::Solver
- Inherits:
-
Object
- Object
- Gnm::Solver
- Defined in:
- (unknown)
Direct Known Subclasses
Class Method Summary collapse
-
.db_get ⇒ GLib::SList<Gnm::SolverFactory>
registered solver factories.
- .db_register(factory) ⇒ nil
- .db_unregister(factory) ⇒ nil
- .debug ⇒ Boolean
Instance Method Summary collapse
- #cell_index(cell) ⇒ Integer
- #check_constraints ⇒ Boolean
- #check_timeout ⇒ Boolean
-
#compute_gradient(xs) ⇒ Gnm::gnm_float
function takes the flip-sign property into account.
-
#compute_hessian(xs) ⇒ Gnm::Matrix
function takes the flip-sign property into account.
- #create_report(name) ⇒ nil
- #elapsed ⇒ Float
-
#endtime ⇒ Float
Endtime.
- #endtime=(endtime) ⇒ Float
- #finished ⇒ Boolean
- #flip_sign=(flip_sign) ⇒ Boolean
-
#flip_sign? ⇒ Boolean
Flip-sign.
-
#get_lp_coeffs(ycell, x1, x2) ⇒ Gnm::gnm_float
Note: this function is not affected by the flip-sign property, even if ycell happens to coincide with the solver target cell.
-
#has_analytic_gradient ⇒ Boolean
True if the gradient can be computed analytically.
-
#has_analytic_hessian ⇒ Boolean
True if the Hessian can be computed analytically.
- #has_solution ⇒ Boolean
-
#line_search(x0, dir, try_reverse, step, max_step, eps, py) ⇒ Gnm::gnm_float
Optimal step size.
-
#params ⇒ Gnm::SolverParameters
Params.
- #params=(params) ⇒ Gnm::SolverParameters
-
#pick_lp_coords(px1, px2) ⇒ nil
Pick two good values for each coordinate.
-
#prepare(wbc) ⇒ Boolean
Prepare for solving.
-
#reason ⇒ String
Reason.
- #reason=(reason) ⇒ String
- #restore_vars(vals) ⇒ nil
-
#result ⇒ Gnm::SolverResult
Result.
- #result=(result) ⇒ Gnm::SolverResult
- #save_vars ⇒ Array<Gnm::Value>
- #saveas(wbc, fs, templ, filename) ⇒ Boolean
-
#sensitivity ⇒ Gnm::SolverSensitivity
Sensitivity.
- #sensitivity=(sensitivity) ⇒ Gnm::SolverSensitivity
- #set_var(i, x) ⇒ nil
-
#start(wbc) ⇒ Boolean
Start the solving process.
-
#starttime ⇒ Float
Starttime.
- #starttime=(starttime) ⇒ Float
-
#status ⇒ Gnm::SolverStatus
Status.
- #status=(status) ⇒ Gnm::SolverStatus
-
#stop ⇒ Boolean
Terminate the currently-running solver.
- #store_result ⇒ nil
-
#target_value ⇒ Gnm::gnm_float
flipped.
- #vars=(xs) ⇒ nil
Class Method Details
.db_get ⇒ GLib::SList<Gnm::SolverFactory>
registered solver factories.
.db_register(factory) ⇒ nil
.db_unregister(factory) ⇒ nil
.debug ⇒ Boolean
Instance Method Details
#cell_index(cell) ⇒ Integer
#check_constraints ⇒ Boolean
#check_timeout ⇒ Boolean
#compute_gradient(xs) ⇒ Gnm::gnm_float
function takes the flip-sign property into account. This will use analytic gradient, if possible, and a numerical approximation otherwise.
#compute_hessian(xs) ⇒ Gnm::Matrix
function takes the flip-sign property into account.
#create_report(name) ⇒ nil
#elapsed ⇒ Float
#endtime ⇒ Float
Returns endtime.
#endtime=(endtime) ⇒ Float
#finished ⇒ Boolean
#flip_sign=(flip_sign) ⇒ Boolean
#flip_sign? ⇒ Boolean
Returns flip-sign.
#get_lp_coeffs(ycell, x1, x2) ⇒ Gnm::gnm_float
Note: this function is not affected by the flip-sign property, even if ycell happens to coincide with the solver target cell.
#has_analytic_gradient ⇒ Boolean
Returns true if the gradient can be computed analytically.
#has_analytic_hessian ⇒ Boolean
Returns true if the Hessian can be computed analytically.
#has_solution ⇒ Boolean
#line_search(x0, dir, try_reverse, step, max_step, eps, py) ⇒ Gnm::gnm_float
Returns optimal step size.
#params ⇒ Gnm::SolverParameters
Returns params.
#params=(params) ⇒ Gnm::SolverParameters
#pick_lp_coords(px1, px2) ⇒ nil
Pick two good values for each coordinate. We prefer 0 and 1 when they are valid.
#prepare(wbc) ⇒ Boolean
Prepare for solving. Preparation need not do anything, but may include such tasks as checking that the model is valid for the solver and locating necessary external programs.
#reason ⇒ String
Returns reason.
#reason=(reason) ⇒ String
#restore_vars(vals) ⇒ nil
#result ⇒ Gnm::SolverResult
Returns result.
#result=(result) ⇒ Gnm::SolverResult
#save_vars ⇒ Array<Gnm::Value>
#saveas(wbc, fs, templ, filename) ⇒ Boolean
#sensitivity ⇒ Gnm::SolverSensitivity
Returns sensitivity.
#sensitivity=(sensitivity) ⇒ Gnm::SolverSensitivity
#set_var(i, x) ⇒ nil
#start(wbc) ⇒ Boolean
Start the solving process. If needed, the solver will be prepared first.
#starttime ⇒ Float
Returns starttime.
#starttime=(starttime) ⇒ Float
#status ⇒ Gnm::SolverStatus
Returns status.
#status=(status) ⇒ Gnm::SolverStatus
#stop ⇒ Boolean
Terminate the currently-running solver.
#store_result ⇒ nil
#target_value ⇒ Gnm::gnm_float
flipped.