![]() For this reason, there are relatively few results about endomorphisms of symbolic flows other than full shifts. However, the combinatorial structure of a symbolic flow is, in general, not susceptible to the kind of analysis done in. His proofs are based on the very nice combinatorial properties of the full shift. The properties of endomorphisms of the full shift dynamical system are described by Hedlund in. X prob.ChgBounds(1, jArray, boundtype, ub) If (boundViolations(j) 0) Then ' Get bounds ' Apply relaxation If (constraintViolations(i) > 0) ThenĮnd If Next ' Apply changes to columns For j = 0 To x prob.OriginalCols - 1 If (constraintViolations(i) 0) Then ' Get bounds the values of the feasibility breakers after a repairinfeas call) Public Sub GetInfeasibilityBreakers( ByRef xprob As XPRSprob, ByVal x As Double(), ByVal slacks As Double(), ByRef constraints As Double(), ByRef bounds As Double(), ByVal tolerance As Double)ĭim i As Integer, j As Integer Dim rhs(1) As Double Dim activity As Double Dim lb(1) As Double, ub(1) As Double ' check constraints For i = 0 To x prob.OriginalRows - 1Ĭonstraints(i) = activity - ub(0) ' a positive value indicates that the upper bound is relaxed ElseĮnd If Next ' check bounds For j = 0 To x prob.OriginalCols - 1Įnd If Next End Sub ' This function just converts a double to a string for reporting, converting infinity values as "NONE" Public Function BoundToString( ByVal bound As Double) As String If (bound > XPRS.MINUSINFINITY And bound = 0) ThenīoundToString = String.Format( " ", numInf)Įnd Sub ' Relaxes the problem given the values of the feasibility breakers Public Sub ApplyRepairInfeasResultToProblem( ByRef xprob As XPRSprob, ByVal constraintViolations As Double(), ByVal boundViolations As Double())ĭim i As Integer, j As Integer Dim lb(1) As Double, ub(1) As Double, boundtype(1) As Char, jArray(1) As Integer ' Apply changes to rows For i = 0 To x prob.OriginalRows - 1 Log.WriteLine( "(Please note that this matrix might show slightly different behaviour then the repairinfeas problem)")įinally ' Destroy the problem If ( Not xprob Is Nothing) ThenĮnd If End Try End Sub ' This routine returns the lower and upper bounds for a row Public Sub GetRowBounds( ByRef xprob As XPRSprob, ByVal i As Integer, ByRef dlb As Double, ByRef dub As Double)ĭim rowtype(1) As Char Dim rhs(1) As Double Dim range(1) As Double ' The bounds are calculated using the RHS, the range, and the type of the rowĭub = XPRS.PLUSINFINITY End Select End Sub ' This routine sets new lower and upper bounds for a row Public Sub SetRowBounds( ByRef xprob As XPRSprob, ByVal i As Integer, ByVal dlb As Double, ByVal dub As Double)ĭim lb(1) As Double Dim ub(1) As Double Dim iArray(1) As IntegerĮnd If End Sub ' This routine calculates the infeasibilities of a solution (i.e. Log.WriteLine( "Repaired problem is written as repaired.lp.") GenerateInfeasibilityReport(Log, xprob, constraintViolations, boundViolations)ĪpplyRepairInfeasResultToProblem(xprob, constraintViolations, boundViolations) GetInfeasibilityBreakers(xprob, x, slacks, constraintViolations, boundViolations, 0.000001) ' NOTE: For MIPs, use xprob.GetMIPSol instead ' Get the values of the breaker variables X prob.GetLpSol(x, slacks, Nothing, Nothing) Log.WriteLine( "Solution of the relaxed problem regarding the original objective is nonoptimal") Log.WriteLine( "Relaxed problem is unbounded") Log.WriteLine( "Relaxed problem is infeasible") X prob.RepairWeightedInfeas(Status, lrp_array, grp_array, lbp_array, ubp_array, "n", 0.001, "") Next ' Call Repairinfeas Dim Status As Integer = -1 ![]() Next For j = 0 To x prob.OriginalCols - 1 ' Allocate preference arrays Dim lrp_array(x prob.Rows) As Double Dim grp_array(x prob.Rows) As Double Dim lbp_array(x prob.Cols) As Double Dim ubp_array(x prob.Cols) As Double ' Allocate arrays for the solution and the infeasibility breakers Dim x(x prob.Cols) As Double Dim slacks(x prob.Rows) As Double Dim boundViolations(x prob.Cols) As Double Dim constraintViolations(x prob.Rows) As Double ' Set relaxation values Dim i As Integer, j As Integer For i = 0 To x prob.OriginalRows - 1 X prob.ReadProb(frmMain.sDataDirPath & "/" & sProblem) Xprob = New XPRSprob ' Forward messages to log Const sProblem As String = "infeas.lp" Public Sub GetBreakers( ByVal Log As TextWriter)ĭim xprob As XPRSprob = Nothing Try ' Initialize optimizer XPRS.Init()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |