Solve the factory production scheduling problem, no error after running without solving

26 views
Skip to first unread message

by chen

unread,
Apr 12, 2020, 9:45:36 PM4/12/20
to YALMIP
Dear John:
    
    Sorry to disturb you. Recently, I am using YALMIP to model the production scheduling problem in a factory. The factory is powered by the power grid and the boiler is provided with heat. The goal is to minimize the operating cost of 24 hours a day. But when I add an upper bound constraint on the value of buying electricity from the grid, running this program in MATLAB has no response. Remove this constraint and the model can be solved. The specific code is in the attachment. 
    

     Thank you in advance.
CODE.m

Johan Löfberg

unread,
Apr 13, 2020, 2:42:50 AM4/13/20
to YALMIP
First, your objective is a vector. Not what you intended I guess

I get the same (in 12.8), likely bug in cplex. Works without problems in gurobi in 20s

by chen

unread,
Apr 13, 2020, 5:43:58 AM4/13/20
to YALMIP
Thank you very much, there is another question, when calling gurobi to solve, what statement should be used to change the optimization gap?

Johan Löfberg

unread,
Apr 13, 2020, 7:17:46 AM4/13/20
to YALMIP
there's a bunch of gaps

>> ops.gurobi

ans = 

  struct with fields:

         BarIterLimit: Inf
               Cutoff: Inf
       IterationLimit: Inf
            NodeLimit: Inf
        SolutionLimit: Inf
            TimeLimit: Inf
           BarConvTol: 1.0000e-08
        BarQCPConvTol: 1.0000e-06
       FeasibilityTol: 1.0000e-06
           IntFeasTol: 1.0000e-06
         MarkowitzTol: 0.0078
               MIPGap: 1.0000e-04
            MIPGapAbs: 1.0000e-10
        OptimalityTol: 1.0000e-06
               PSDTol: 1.0000e-06
          InfUnbdInfo: 0
           NormAdjust: -1
             ObjScale: 0
         PerturbValue: 2.0000e-04
                 Quad: -1
            ScaleFlag: 1
              Sifting: -1
           SiftMethod: -1
       SimplexPricing: -1
        BarCorrectors: -1
       BarHomogeneous: -1
             BarOrder: -1
            Crossover: -1
       CrossoverBasis: 0
              QCPDual: 0
            BranchDir: 0
        ConcurrentMIP: 1
           Heuristics: 0.0500
      ImproveStartGap: 0
    ImproveStartNodes: Inf
     ImproveStartTime: Inf
          MinRelNodes: 0
             MIPFocus: 0
          MIQCPMethod: -1
          NodefileDir: '.'
        NodefileStart: Inf
           NodeMethod: 1
           PumpPasses: 0
                 RINS: -1
       SolutionNumber: 0
          SubMIPNodes: 500
             Symmetry: -1
            VarBranch: -1
         ZeroObjNodes: 0
           TuneOutput: 2
          TuneResults: -1
        TuneTimeLimit: -1
           TuneTrials: 2
                 Cuts: -1
           CliqueCuts: -1
            CoverCuts: -1
        FlowCoverCuts: -1
         FlowPathCuts: -1
         GUBCoverCuts: -1
          ImpliedCuts: -1
           MIPSepCuts: -1
              MIRCuts: -1
             ModKCuts: -1
          NetworkCuts: -1
           SubMIPCuts: -1
         ZeroHalfCuts: -1
         CutAggPasses: -1
            CutPasses: -1
         GomoryPasses: -1
              AggFill: 10
            Aggregate: 1
      DisplayInterval: 5
       DualReductions: 1
        FeasRelaxBigM: 1000000
            IISMethod: -1
              LogFile: ''
               Method: -1
         NumericFocus: 0
             PreCrush: 0
            PreDepRow: -1
              PreDual: -1
        PreQLinearize: -1
            PrePasses: -1
             Presolve: -1
          PreSparsify: 0
           ResultFile: ''
              Threads: 0

by chen

unread,
Apr 13, 2020, 8:20:22 AM4/13/20
to YALMIP
Thank you very much for your reply. I would like to ask what command should be used to change the value of MIPGAP?

Johan Löfberg

unread,
Apr 13, 2020, 9:04:32 AM4/13/20
to YALMIP
I just showed you all the available options, I don't know of any more
Reply all
Reply to author
Forward
0 new messages