Question

#mod reset; param T > 0, integer; set IND := 1..T; set END := 0..T+1; param...

#mod

reset;

param T > 0, integer;
set IND := 1..T;
set END := 0..T+1;
param a >= 0;
param b >= a;
param c <= a;
param r >= 0;
param s >= 0;
param d {IND} >= 0;
var X {IND} >= 0, <= r;
var Y {IND} >= 0, <= s;
var Z {END} >= 0;

minimize COST: sum {i in IND} (a * X[i] + b * Y[i] + c * Z[i]);

subject to BAL {i in END}: Z[i-1]+X[i]+Y[i] = d[i]+Z[i];

subject to INIT0: Z[0] = 0;

subject to INITE: Z[4] = 0;

#Data

param T := 5;
param a := 5;
param b := 10;
param c := 1
param r := 100;
param s := 200;
param d := 1 85 2 120 3 150 4 90 5 120 6 80;

Find the error and fix it

Homework Answers

Answer #1

Note: You gave T=5 but d in set IND which has T elements but d has 12 values so I think it should be T=12 and at the place of Z[4] it should be Z[13]. If you put question also here, then I can understand easily. By the way, I have corrected it by assuming above things. Please comment your question if you have any query.

.mod file:

param T;
set IND := 1..T;
set END := 0..T+1;
param a;
param b;
param c;
param r;
param s;
param d {IND} >= 0;
var X {IND} >= 0, <= r;
var Y {IND} >= 0, <= s;
var Z {END} >= 0;

minimize COST: sum {i in IND} (a * X[i] + b * Y[i] + c * Z[i]);

subject to BAL {i in END: 1<=i<=12 }: Z[i-1]+X[i]+Y[i] = d[i]+Z[i];

subject to INIT0: Z[0] = 0;

subject to INITE: Z[13] = 0;

.dat file:

param T := 12;
param a := 5;
param b := 10;
param c := 1;
param r := 100;
param s := 200;
param d :=
1 1
2 85
3 2
4 120
5 3
6 150
7 4
8 90
9 5
10 120
11 6
12 80;

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using Chinese Remainder Theorem solve for X: x = 2 (mod 3) x = 4 (mod...
Using Chinese Remainder Theorem solve for X: x = 2 (mod 3) x = 4 (mod 5) x = 5 (mod 8) I have the answer the professor gave me, but I can`t understand what`s going on. So if you could please go over the answer and explain, it would help a lot. x = 2 (mod 3) x = 3a + 2 3a + 2 = 4 (mod 5) (2) 3a = 2 (2) (mod 5) -----> why number...
1. Let W be the set of all [x y z}^t in R^3 such that xyz...
1. Let W be the set of all [x y z}^t in R^3 such that xyz = 0. Is W a subspace of R^3? 2. Let C^0 (R) denote the space of all continuous real-valued functions f(x) of x in R. Let W be the set of all continuous functions f(x) such that f(1) = 0. Is W a subspace of C^0(R)?
1. A function + : S × S → S for a set S is said...
1. A function + : S × S → S for a set S is said to provide an associative binary operation on S if r + (s + t) = (r + s) +t for all r, s, t ∈ S. Show that any associative binary operation + on a set S can have at most one “unit” element, i.e. an element u ∈ S such that (*) s + u = s = u + s for all...
x y s t P 1 -3 1 0 0 12 1 2 0 1 0...
x y s t P 1 -3 1 0 0 12 1 2 0 1 0 3 -6 -4 0 0 1 0 The pivot element for the initial simplex tableau show is the red 1. So we need to zero out the other elements of column x. What is the formula used to zero out row 1 and column x? Multiply Row _____by_______ and then add the result to Row_____ What is the formula used to zero out row...
1. Set L = 5 mH, C = 8 µF, R = 0 Ω, and Q...
1. Set L = 5 mH, C = 8 µF, R = 0 Ω, and Q = 2E-6 C. Measure the maximum current through the circuit, and the period of the oscillation. Now increase the inductance of the inductor by 50% to 7.5 mH calculate max current = ________ A   period T = ________ s. 2. Reset to L = 5 mH, C = 8 µF, keep R = 0 Ω, and Q = 2E-6 C. Keeping the charge on the...
Given the set S = {(u,v): 0<= u<=4 and 0<= v<=3} and the transformation T(u, v)...
Given the set S = {(u,v): 0<= u<=4 and 0<= v<=3} and the transformation T(u, v) = (x(u, v), y(u, v)) where x(u, v) = 4u + 5v and y(u, v) = 2u -3v, graph the image R of S under the transformation T in the xy-plan and find the area of region R
5. Prove or disprove the following statements: (a) Let R be a relation on the set...
5. Prove or disprove the following statements: (a) Let R be a relation on the set Z of integers such that xRy if and only if xy ≥ 1. Then, R is irreflexive. (b) Let R be a relation on the set Z of integers such that xRy if and only if x = y + 1 or x = y − 1. Then, R is irreflexive. (c) Let R and S be reflexive relations on a set A. Then,...
Exercise1.2.1: Prove that if t > 0 (t∈R), then there exists an n∈N such that 1/n^2...
Exercise1.2.1: Prove that if t > 0 (t∈R), then there exists an n∈N such that 1/n^2 < t. Exercise1.2.2: Prove that if t ≥ 0(t∈R), then there exists an n∈N such that n−1≤ t < n. Exercise1.2.8: Show that for any two real numbers x and y such that x < y, there exists an irrational number s such that x < s < y. Hint: Apply the density of Q to x/(√2) and y/(√2).
(1 point) If C is the curve given by r(t)=(1+5sint)i+(1+2sin2t)j+(1+3sin3t)k, 0≤t≤π2 and F is the radial...
(1 point) If C is the curve given by r(t)=(1+5sint)i+(1+2sin2t)j+(1+3sin3t)k, 0≤t≤π2 and F is the radial vector field F(x,y,z)=xi+yj+zk, compute the work done by F on a particle moving along C.
1. Consider an economy with the given equations. Y=C+I+GY=C+I+G C=112+0.6(Y−T)C=112+0.6(Y−T) I=120−10rI=120−10r (MP)d=Y−15r(MP)d=Y−15r G=$35G=$35 T=$45T=$45 M=$1200M=$1200 P=3.0...
1. Consider an economy with the given equations. Y=C+I+GY=C+I+G C=112+0.6(Y−T)C=112+0.6(Y−T) I=120−10rI=120−10r (MP)d=Y−15r(MP)d=Y−15r G=$35G=$35 T=$45T=$45 M=$1200M=$1200 P=3.0 a. Use the relevant set of equations to derive the IS curve and graph it. b. What is the equation for the IS curve? Y = c. Use the relevant set of equations to derive the LM curve. d. Calculate the equilibrium level of income (Y) and the equilibrium interest rate (r). Y= r (%)= e. Use the relevant set of equations to derive...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT