[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Test a model with random data on GLPK
From: |
Shaghayegh Mokarami |
Subject: |
[Help-glpk] Test a model with random data on GLPK |
Date: |
Tue, 21 Jul 2015 23:12:42 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hi
Im new on GLPK, I want to test my simple model, I use this comment to
generate different random data:
param seed:=gmtime();
param u{(i,j) in E}:=(round(seed*Uniform01())) mod 40 ;
and I want to solve model for 100 times and obtain the average value of
optimal value of objective function.
I don't know how to code iterated expression to repeat solving model in .mod
file. Could you please help me?
This is my model:
### VARIABLES ###
var x{(i,j) in E} >= 0, <= u[i,j];
### OBJECTIVE ###
maximize Val: sum {(1,j) in E} x[1,j];
### CONSTRAINTS ###
subject to Balance {i in V diff {1,n}}:
sum {(j,i) in E} x[j,i] = sum {(i,k) in E} x[i,k];
solve;
- [Help-glpk] Test a model with random data on GLPK,
Shaghayegh Mokarami <=