mathprog

    0熱度

    1回答

    我無法運行通過apt-get安裝的名爲dist的GLPK解算器(glpsol)。它拋出以下: $ glpsol dist.mod GLPSOL: GLPK LP/MIP Solver, v4.60 Parameter(s) specified in the command line: dist.mod Reading problem data from 'dist.mod'... dis

    0熱度

    1回答

    我是新來這個節目叫gusek,我試圖運行下一個公式: Maximize objekt: 3x + 2y Subject To objekt1: 2x + y <= 100 objekt2: x + y <= 80 Bounds x >= 0 x <= 40 y >= 0 End 它給了我「or_vaja.mod:1:結腸失蹤,其中預期「錯誤。 任何幫助?

    0熱度

    1回答

    我是GLPK和線性編程的新手。我試圖將一些數據輸出到一個.csv文件,並將它輸出到文件,但它不會用逗號分隔數據。 set I; /*equipments */ set J; /* maintenance plans */ param cost{I}; /* failure cost for equip i in I */ param maint{J}; param prob{I, J};

    1熱度

    1回答

    我試圖儘量減少有三個參數的目標函數:I,P,J是這樣的: param mlu{i in I, p in P, j in out[p]} := traffic[i,p]/capacity[j]; minimize MAXLU{i in I, p in P, j in out[p]}: mlu[i,p,j] * x[i,p,j]; 但目標函數必須是大於0,否則就是擊敗了我最小化的目的。 ,我試圖

    1熱度

    1回答

    我的簡化數據在GNU MathProg設定爲如下,Verts是用於頂點一組索引和coords是這些頂點的座標的表: data; set Indices := X Y; set Verts := 1 2 3 4; param Coords : X Y := 1 1.2 0.3 2 4.2 13.0 3 1.5 1.0 4 0.5 0.8; end; 這工作,但如果我取代綠黨的定

    1熱度

    1回答

    我有以下MILP問題,相關的代碼部分: param n, integer, >= 0; set jobs := 1..n; param P{i in jobs, j in jobs}, binary; var s{i in jobs}, integer, >=0; var e{i in jobs}, integer, >=0; var Cmax, integer, >=0; mi

    0熱度

    1回答

    我有一個AMPL模型文件,我正在將其轉換爲GLPK。它開始: param n; # The number of nodes in the graph set V := {1 .. n}; # The set of vertices in the graph set E within V cross V; # The set of edges in the graph set NE with

    1熱度

    1回答

    我收到以下域外錯誤,請參閱下文。事情是,在被引用的行中,q來自Qualities集,它甚至不包含LAT值。我如何防止這種情況發生,並將所有數據保存在一張表中?我一直在嘗試使用單獨的latdata表來解決它,但這對我來說看起來很醜陋。 $ glpsol -m ron.mod GLPSOL: GLPK LP/MIP Solver, v4.60 Parameter(s) specified in t

    1熱度

    1回答

    我一直在試圖用mathprog方法做一個問題,但是當我使用R讀取txt文件時遇到了麻煩。 我想我知道我有問題,但我不知道如何解決它。 這裏是整個代碼,但問題是在結束的時候我在PARAM一個和param TC使用3個變量: set I; /* plants*/ set J; /* customers*/ set T; /* types*/ set S; /* modes*/

    0熱度

    1回答

    MathProg中有沒有一種方法讓字符串與可用於輸出標籤的整數相關聯? 例如,下面的代碼無法正常工作,但希望傳達我想要做的事: # attempt via set results in error, "mylabels cannot be subscripted": set mylabels := "label1" "label2" "label3"; printf "first label: