2017-07-15 5 views
0

私は変数X [i] [j] [k]を持っています。このデータをCPLEXの.datファイルに入力するにはどうすればよいですか?CPLEX OPLの3つのインデックスパラメータのデータを入力する方法は?

仮定するI = 2、J = 2、K = 3

サプライヤー1(I)成分1(J)20 30 40 成分2 50 20 10 サプライヤー2成分1(J)20 80ます40 あなたがの.modに表示されます例

CPLEX_Studio127\opl\examples\opl\models\YieldStochastic 

を見てすることができます2 10 20 10

答えて

0

コンポーネント

{string} classes = {"First", "Business", "Economy"}; 
int capacity[classes] = [37, 38, 47]; 

// Planned periods 
range periods = 1..3; 

// 3 scenarios are studied with their corresponding probability 
range scenarios = 1..3; 
float probaScenarios[scenarios] = [0.1, 0.7, 0.2]; 

// 3 pricing options for each class and period 
range options = 1..3; 
int priceOptions[periods][classes][options] = ...; 
.DAT

priceOptions = 
    [[[1200,1000,950], 
    [900,800,600], 
    [500,300,200]], 
    [[1400,1300,1150], 
    [1100,900,750], 
    [700,400,350]], 
    [[1500,900,850], 
    [820,800,500], 
    [480,470,450]]]; 

に関して

、次いで

関連する問題